|
| context (std::nullptr_t) |
|
| context (context &&other) |
|
context & | operator= (context &&other) |
|
| operator bool () const noexcept |
|
bool | operator! () const noexcept |
|
void | verify_mode (verify_t flags) |
| Overrides the verification mode for this context.
|
|
template<typename PasswordCallback > |
void | password_callback (PasswordCallback callback) |
| Overrides the callback to obtain the password for encrypted PEM files.
|
|
void | password (std::string password) |
| Overrides the callback to obtain the password for encrypted PEM files with a function that always returns password .
|
|
void * | native_handle () const noexcept |
| Retrieves the native handle from the context.
|
|
expected< connection > | new_connection (stream_socket fd) |
| Creates a new SSL connection on fd .
|
|
expected< connection > | new_connection (stream_socket fd, close_on_shutdown_t) |
| Creates a new SSL connection on fd .
|
|
bool | enable_default_verify_paths () |
| Configure the context to use the default locations for loading CA certificates.
|
|
bool | add_verify_path (const char *path) |
| Configures the context to load CA certificate from a directory.
|
|
bool | add_verify_path (const std::string &path) |
| Configures the context to load CA certificate from a directory.
|
|
bool | load_verify_file (const char *path) |
| Loads a CA certificate file.
|
|
bool | load_verify_file (const std::string &path) |
| Loads a CA certificate file.
|
|
bool | use_certificate_file (const char *path, format file_format) |
| Loads the first certificate found in given file.
|
|
bool | use_certificate_file (const std::string &path, format file_format) |
| Loads the first certificate found in given file.
|
|
bool | use_certificate_chain_file (const char *path) |
| Loads a certificate chain from a PEM-formatted file.
|
|
bool | use_certificate_chain_file (const std::string &path) |
| Loads a certificate chain from a PEM-formatted file.
|
|
bool | use_private_key_file (const char *path, format file_format) |
| Loads the first private key found in given file.
|
|
bool | use_private_key_file (const std::string &path, format file_format) |
| Loads the first private key found in given file.
|
|
|
static expected< void > | enable (bool flag) |
| Starting point for chaining expected<T>::and_then() invocations, whereas the next function in the chain should create the SSL context depending on the value of flag .
|
|
static expected< context > | make (tls min_version, tls max_version=tls::any) |
| Returns a generic SSL context with TLS.
|
|
static expected< context > | make_server (tls min_version, tls max_version=tls::any) |
| Returns a SSL context with TLS for a server role.
|
|
static expected< context > | make_client (tls min_version, tls max_version=tls::any) |
| Returns a SSL context with TLS for a client role.
|
|
static expected< context > | make (dtls min_version, dtls max_version=dtls::any) |
| Returns a generic SSL context with DTLS.
|
|
static expected< context > | make_server (dtls min_version, dtls max_version=dtls::any) |
| Returns a SSL context with DTLS for a server role.
|
|
static expected< context > | make_client (dtls min_version, dtls max_version=dtls::any) |
| Returns a SSL context with TLS for a client role.
|
|
static context | from_native (void *native_handle) |
| Reinterprets native_handle as the native implementation type and takes ownership of the handle.
|
|
static std::string | next_error_string () |
| Retrieves a human-readable error description for a preceding call to another member functions and removes that error from the thread-local error queue.
|
|
static void | append_next_error_string (std::string &buf) |
| Retrieves a human-readable error description for a preceding call to another member functions, appends the generated string to buf and removes that error from the thread-local error queue.
|
|
static std::string | last_error_string () |
| Convenience function for calling next_error_string repeatedly until has_error returns false .
|
|
static bool | has_error () noexcept |
| Queries whether the thread-local error stack has at least one entry.
|
|
static error | last_error () |
| Retrieves all errors from the thread-local error queue and assembles them into a single error string.
|
|
static error | last_error_or (error default_error) |
| Returns last_error or default_error if the former is default-constructed.
|
|
static error | last_error_or_unexpected (std::string_view description) |
| Returns last_error or an error that represents an unexpected failure if the former is default-constructed.
|
|
SSL state, shared by multiple connections.