ark::crypt::TlsContext

Defined in header “ark/crypt/tls_context.hh”.


A TLS context can be used to generate new TLS streams that all have something in common (such as common certificates or key files).

Methods

  • TlsContext(TlsContextMode mode)
    Constructor. Initializes the TLS stream.

  • ~TlsContext()
    Destructor. Cleans up context. All streams should be destroyed before this falls out of scope.

  • void set_certificate(const std::string & pem_certificate)
    Sets a new certificate (PEM-encoded) to use.

  • void set_private_key(const std::string & pem_private_key)
    Sets a private key (PEM-encoded) to use.

  • TlsStreamPtr new_stream()
    Allocates a new TLS stream.