NIOSSLContext

public final class NIOSSLContext

A wrapper class that encapsulates BoringSSL’s SSL_CTX * object.

This class represents configuration for a collection of TLS connections, all of which are expected to be broadly the same.

  • Initialize a context that will create multiple connections, all with the same configuration.

    Declaration

    Swift

    public convenience init(configuration: TLSConfiguration) throws
  • Initialize a context that will create multiple connections, all with the same configuration, along with a callback that will be called when needed to decrypt any encrypted private keys.

    Declaration

    Swift

    public convenience init<T: Collection>(configuration: TLSConfiguration,
                                           passphraseCallback: @escaping NIOSSLPassphraseCallback<T>) throws where T.Element == UInt8

    Parameters

    configuration

    The TLSConfiguration to use for all the connections with this NIOSSLContext.

    passphraseCallback

    The callback to use to decrypt any private keys used by this NIOSSLContext. For more details on this parameter see the documentation for NIOSSLPassphraseCallback.