![]() |
PahoMqttCpp
MQTT C++ Client for POSIX and Windows
|
#include <ssl_options.h>
Public Types | |
using | self = ssl_options_builder |
Public Member Functions | |
ssl_options_builder () | |
auto | trust_store (const string &store) -> self & |
auto | key_store (const string &store) -> self & |
auto | private_key (const string &key) -> self & |
auto | private_keypassword (const string &passwd) -> self & |
auto | enabled_cipher_suites (const string &suites) -> self & |
auto | enable_server_cert_auth (bool on) -> self & |
auto | ssl_version (int ver) -> self & |
auto | verify (bool on=true) -> self & |
auto | ca_path (const string &path) -> self & |
auto | error_handler (ssl_options::error_handler cb) -> self & |
auto | psk_handler (ssl_options::psk_handler cb) -> self & |
auto | alpn_protos (const std::vector< string > &protos) -> self & |
ssl_options | finalize () |
Class to build the SSL options for connections.
This class
|
inline |
Default constructor.
Sets the file containing the public digital certificates trusted by the client.
store | The file in PEM format containing the public digital certificates trusted by the client. |
Sets the file containing the public certificate chain of the client.
store | The file in PEM format containing the public certificate chain of the client. It may also include the client's private key. |
Sets the file containing the client's private key.
key | If not included in the sslKeyStore, this is the file in PEM format containing the client's private key. |
Sets the password to load the client's privateKey if encrypted.
passwd | The password to load the privateKey if encrypted. |
Sets the list of cipher suites that the client will present to the server during the SSL handshake.
suites | The list of cipher suites that the client will present to the server during the SSL handshake. For a full explanation of the cipher list format, please see the OpenSSL on-line documentation: http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT If this setting is omitted, its default value will be "ALL", that is, all the cipher suites -excluding those offering no encryption- will be considered. This setting can be used to set an SSL anonymous connection (empty string value, for instance). |
|
inline |
Enables or disables verification of the server certificate.
on | enable/disable verification of the server certificate |
|
inline |
Set the SSL/TLS version to use.
ver | The desired SSL/TLS version. Specify one of:
|
|
inline |
Sets whether it should carry out post-connect checks, including that a certificate matches the given host name.
on | Whether it should carry out post-connect checks. |
Sets the path to a directory containing CA certificates in PEM format.
path | Path to a directory containing CA certificates in PEM format. |
|
inline |
Registers an error callback handler.
cb | The callback to receive error messages. |
|
inline |
Registers a callback handler to set the TLS-PSK options. See: OpenSSL SSL_CTX_set_psk_client_callback()
cb | The callback. |
Sets the list of supported ALPN protocols.
protos | The list of ALPN protocols to be negotiated. |
|
inline |
Finish building the options and return them.