init(context:serverHostname:customVerificationCallback:)
Construct a new NIOSSLClientHandler with the given context and a specific serverHostname.
convenience init(context: NIOSSLContext, serverHostname: String?, customVerificationCallback: @escaping NIOSSLCustomVerificationCallback) throws Parameters
- context
The
NIOSSLContextto use on this connection.- serverHostname
The hostname of the server we’re trying to connect to, if known. This will be used in the SNI extension, and used to validate the server certificate.
- customVerificationCallback
A callback to use that will override NIOSSL’s normal verification logic.
If set, this callback is provided the certificates presented by the peer. NIOSSL will not have pre-processed them. The callback will not be used if the
TLSConfigurationthat was used to construct theNIOSSLContexthascertificateVerificationset tonone.