TlsTrust

sealed interface TlsTrust(source)

Which certificate authorities a KtorTlsConnector trusts to vouch for a server (RFC 8323 §9.1, Certificate mode). Either way the chain is validated by the platform's PKIX trust manager (signatures, validity, basic constraints, key usage), and the server must then be named by its certificate.

Inheritors

Types

Link copied to clipboard
class Anchors(certificates: List<X509Certificate>) : TlsTrust

Only certificates as trust anchors, instead of the platform store: a private CA, or a device's self-signed certificate trusted as itself.

Link copied to clipboard
data object Platform : TlsTrust

The platform trust store: the JVM's default TrustManagerFactory with its default key store, which is the JDK's cacerts unless javax.net.ssl.trustStore names another. On Android it is the system's trusted CAs as the app's network security configuration admits them for the server's host, a <domain-config>'s trust anchors and <pin-set> included: the chain is checked with the host through android.net.http.X509TrustManagerExtensions, without which a configuration with a <domain-config> refuses every chain. That path has not run on Android yet.