TlsClientConfig
class TlsClientConfig(val trust: TlsTrust = TlsTrust.Platform, val pinner: CertificatePinner? = null, val allowsAnyPortWithoutAlpn: Boolean = false)(source)
How a KtorTlsConnector runs TLS for coaps+tcp (RFC 8323 §8.2, §9.1).
Constructors
Link copied to clipboard
constructor(trust: TlsTrust = TlsTrust.Platform, pinner: CertificatePinner? = null, allowsAnyPortWithoutAlpn: Boolean = false)
Properties
Link copied to clipboard
whether to connect to ports other than 5684 although the connector cannot offer ALPN. RFC 8323 §8.2 has a TLS client offer the ALPN protocol coap (CoapScheme.ALPN) on every port but 5684, where a server that negotiates no ALPN implies coaps+tcp, and ktor-network-tls cannot send the extension. So by default the connector refuses such a port before connecting; set this for a server known to accept clients without ALPN, as libcoap's does.
Link copied to clipboard
an extra check of the validated chain, or null for none.
Link copied to clipboard
which certificate authorities vouch for a server; TlsTrust.Platform by default.