Encapsulates the configuration for an TLS tunnel.
Note that when creating an TLSContext with TLSContextKind.client, the peerValidationMode will be set to TLSPeerValidationMode.trustedCert, but no trusted certificate authorities are added by default. Use useTrustedCertificateFile to add those.
|Callback function invoked to choose alpn (client side)|
|The kind of TLS context (client/server)|
|The maximum length of an accepted certificate chain.|
|An optional user callback for peer validation.|
|Specifies the validation level of remote peers.|
|The callback used to associcate host names with TLS certificates/contexts.|
|Creates a new stream associated to this context.|
|Set the list of cipher specifications to use for TLS tunnels.|
|Setter method invoked to offer ALPN (server side)|
|Set params to use for DH cipher.|
|Set the elliptic curve to use for ECDH cipher.|
|Sets a certificate file to use for authenticating to the remote peer|
|Sets the private key to use for authenticating to the remote peer based|
|Sets the list of trusted certificates for verifying peer certificates.|