CTConfigurationBuilder

DSL builder for CTConfiguration.

Usage:

val config = ctConfiguration {
+"*.example.com" // include host
-"internal.example.com" // exclude host
policy = ChromeCtPolicy()
failOnError = false // fail-open (default)
logger = { host, result -> println("CT: $host -> $result") }
}

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Whether to throw/fail on CT verification failure. Defaults to false (fail-open).

Link copied to clipboard
var logger: (host: String, result: VerificationResult) -> Unit?

Optional callback to log verification results.

Link copied to clipboard

Optional custom cache for the log list. If null, an in-memory cache is used.

Link copied to clipboard
var logListMaxAge: <Error class: unknown class>

Maximum age of the cached log list before refresh. Defaults to 70 days.

Link copied to clipboard

Optional custom network data source for fetching the log list.

Link copied to clipboard

URL of the CT log list JSON. Defaults to Google's V3 log list.

Link copied to clipboard

CT compliance policy. Defaults to ChromeCtPolicy.

Functions

Link copied to clipboard

Build the immutable CTConfiguration.

Link copied to clipboard
operator fun String.unaryMinus()

Exclude a host pattern from CT verification.

Link copied to clipboard
operator fun String.unaryPlus()

Include a host pattern for CT verification.

Link copied to clipboard

Use Apple's CT policy. Requires 2+ distinct operators (any). More lenient than Chrome.

Link copied to clipboard

Use Chrome's CT policy (default). Requires Google + non-Google operator diversity.