Classes

The following classes are available globally.

  • A channel handler that wraps a channel in TLS using NIOSSL. This handler can be used in channels that are acting as the client in the TLS dialog. For server connections, use the NIOSSLServerHandler.

    See more

    Declaration

    Swift

    public final class NIOSSLClientHandler : NIOSSLHandler
  • The base class for all NIOSSL handlers. This class cannot actually be instantiated by users directly: instead, users must select which mode they would like their handler to operate in, client or server.

    This class exists to deal with the reality that for almost the entirety of the lifetime of a TLS connection there is no meaningful distinction between a server and a client. For this reason almost the entirety of the implementation for the channel and server handlers in NIOSSL is shared, in the form of this parent class.

    See more

    Declaration

    Swift

    public class NIOSSLHandler : ChannelInboundHandler, ChannelOutboundHandler, RemovableChannelHandler
  • A channel handler that wraps a channel in TLS using NIOSSL. This handler can be used in channels that are acting as the server in the TLS dialog. For client connections, use the NIOSSLClientHandler.

    See more

    Declaration

    Swift

    public final class NIOSSLServerHandler : NIOSSLHandler
  • A reference to a BoringSSL Certificate object (X509 *).

    This thin wrapper class allows us to use ARC to automatically manage the memory associated with this TLS certificate. That ensures that BoringSSL will not free the underlying buffer until we are done with the certificate.

    This class also provides several convenience constructors that allow users to obtain an in-memory representation of a TLS certificate from a buffer of bytes or from a file path.

    See more

    Declaration

    Swift

    public class NIOSSLCertificate
    extension NIOSSLCertificate: Equatable
    extension NIOSSLCertificate: Hashable
    extension NIOSSLCertificate: CustomStringConvertible
  • 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.

    See more

    Declaration

    Swift

    public final class NIOSSLContext
  • A reference to an BoringSSL private key object in the form of an EVP_PKEY *.

    This thin wrapper class allows us to use ARC to automatically manage the memory associated with this key. That ensures that BoringSSL will not free the underlying buffer until we are done with the key.

    This class also provides several convenience constructors that allow users to obtain an in-memory representation of a key from a buffer of bytes or from a file path.

    See more

    Declaration

    Swift

    public class NIOSSLPrivateKey
    extension NIOSSLPrivateKey: Equatable
    extension NIOSSLPrivateKey: Hashable
  • An NIOSSLPublicKey is an abstract handle to a public key owned by BoringSSL.

    This object is of minimal utility, as it cannot be used for very many operations in NIOSSL. Its primary purpose is to allow extracting public keys from NIOSSLCertificate objects to be serialized, so that they can be passed to general-purpose cryptography libraries.

    See more

    Declaration

    Swift

    public class NIOSSLPublicKey