TSSLContext

Represents an OpenSSL context with certification settings, etc. and handles initialization/teardown.

OpenSSL is initialized when the first instance of this class is created and shut down when the last one is destroyed (thread-safe).

Constructors

this
this()
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

accessManager
TAccessManager accessManager()
void accessManager(TAccessManager value)

The access manager to use.

authenticate
void authenticate(bool required)

Whether peer is required to present a valid certificate.

ciphers
void ciphers(string enable)

Ciphers to be used in SSL handshake process.

createSSL
SSL* createSSL()
Undocumented in source.
getPassword
string getPassword(int size)

Override this method for custom password callback. It may be called multiple times at any time during a session as necessary.

loadCertificate
void loadCertificate(string path, string format)

Load server certificate.

loadPrivateKey
void loadPrivateKey(string path, string format)
Undocumented in source. Be warned that the author may not have intended to support it.
loadTrustedCertificates
void loadTrustedCertificates(string path)

Load trusted certificates from specified file (in PEM format).

overrideDefaultPasswordCallback
void overrideDefaultPasswordCallback()

Notifies OpenSSL to use getPassword() instead of the default password callback with getPassword().

randomize
void randomize()

Called during OpenSSL initialization to seed the OpenSSL entropy pool.

serverSide
bool serverSide()
void serverSide(bool value)

Whether to use client or server side SSL handshake protocol.

Variables

ctx_
SSL_CTX* ctx_;
Undocumented in source.

Meta