Initializerswift-nio-ssl 2.29.0NIOSSL
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
NIOSSLContext
to 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
TLSConfiguration
that was used to construct theNIOSSLContext
hascertificateVerification
set tonone
.
Other members in extension
Type members
init(context: NIOSSLContext, serverHostname: String?
) throws Construct a new
NIOSSLClientHandler
with the givencontext
and a specificserverHostname
.init(context: NIOSSLContext, serverHostname: String?, customVerificationCallback: NIOSSLCustomVerificationCallback?, configuration: Configuration
) throws Construct a new
NIOSSLClientHandler
with the givencontext
and a specificserverHostname
.