![]() |
Paho C++
1.0
The Paho MQTT C++ Client Library
|
Holds the set of SSL options for connection. More...
#include <ssl_options.h>
Public Types | |
| using | ptr_t = std::shared_ptr< ssl_options > |
| Smart/shared pointer to an object of this class. More... | |
| using | const_ptr_t = std::shared_ptr< const ssl_options > |
| Smart/shared pointer to a const object of this class. More... | |
Public Member Functions | |
| ssl_options () | |
| Constructs a new MqttConnectOptions object using the default values. | |
| ssl_options (const string &trustStore, const string &keyStore, const string &privateKey, const string &privateKeyPassword, const string &enabledCipherSuites, bool enableServerCertAuth) | |
| Argument constructor. More... | |
| ssl_options (const ssl_options &opt) | |
| Copy constructor. More... | |
| ssl_options (ssl_options &&opt) | |
| Move constructor. More... | |
| ssl_options & | operator= (const ssl_options &opt) |
| Copy assignment. More... | |
| ssl_options & | operator= (ssl_options &&opt) |
| Move assignment. More... | |
| string | get_trust_store () const |
| Returns the file containing the public digital certificates trusted by the client. More... | |
| string | get_key_store () const |
| Returns the file containing the public certificate chain of the client. More... | |
| string | get_private_key () const |
| Returns the file containing the client's private key. More... | |
| string | get_private_key_password () const |
| Returns the password to load the client's privateKey if encrypted. More... | |
| string | get_enabled_cipher_suites () const |
| Returns the list of cipher suites that the client will present to the server during the SSL handshake. More... | |
| bool | get_enable_server_cert_auth () const |
| Returns the true/false to enable verification of the server certificate . More... | |
| void | set_trust_store (const string &trustStore) |
| Sets the file containing the public digital certificates trusted by the client. More... | |
| void | set_key_store (const string &keyStore) |
| Sets the file containing the public certificate chain of the client. More... | |
| void | set_private_key (const string &privateKey) |
| Sets the file containing the client's private key. More... | |
| void | set_private_key_password (const string &privateKeyPassword) |
| Sets the password to load the client's privateKey if encrypted. More... | |
| void | set_enabled_cipher_suites (const string &enabledCipherSuites) |
| Sets the list of cipher suites that the client will present to the server during the SSL handshake. More... | |
| void | set_enable_server_cert_auth (bool enablServerCertAuth) |
| Enables or disables verification of the server certificate. More... | |
Friends | |
| class | connect_options |
| The connect options has special access. | |
| class | connect_options_test |
| class | ssl_options_test |
Holds the set of SSL options for connection.
| using mqtt::ssl_options::const_ptr_t = std::shared_ptr<const ssl_options> |
Smart/shared pointer to a const object of this class.
| using mqtt::ssl_options::ptr_t = std::shared_ptr<ssl_options> |
Smart/shared pointer to an object of this class.
| mqtt::ssl_options::ssl_options | ( | const string & | trustStore, |
| const string & | keyStore, | ||
| const string & | privateKey, | ||
| const string & | privateKeyPassword, | ||
| const string & | enabledCipherSuites, | ||
| bool | enableServerCertAuth | ||
| ) |
Argument constructor.
| trustStore | The file containing the public digital certificates trusted by the client. |
| keyStore | The file containing the public certificate chain of the client. |
| privateKey | The file containing the client's private key. |
| privateKeyPassword | The password to load the client's privateKey if encrypted. |
| enabledCipherSuites | The list of cipher suites that the client will present to the server during the SSL handshake. |
| enableServerCertAuth | True/False option to enable verification of the server certificate |
| mqtt::ssl_options::ssl_options | ( | const ssl_options & | opt | ) |
Copy constructor.
| opt | The other options to copy. |
| mqtt::ssl_options::ssl_options | ( | ssl_options && | opt | ) |
Move constructor.
| opt | The other options to move to this one. |
|
inline |
Returns the true/false to enable verification of the server certificate .
|
inline |
Returns the list of cipher suites that the client will present to the server during the SSL handshake.
|
inline |
Returns the file containing the public certificate chain of the client.
|
inline |
Returns the file containing the client's private key.
|
inline |
Returns the password to load the client's privateKey if encrypted.
|
inline |
Returns the file containing the public digital certificates trusted by the client.
| ssl_options& mqtt::ssl_options::operator= | ( | const ssl_options & | opt | ) |
Copy assignment.
| opt | The other options to copy. |
| ssl_options& mqtt::ssl_options::operator= | ( | ssl_options && | opt | ) |
Move assignment.
| opt | The other options to move to this one. |
| void mqtt::ssl_options::set_enable_server_cert_auth | ( | bool | enablServerCertAuth | ) |
Enables or disables verification of the server certificate.
| enablServerCertAuth | enable/disable verification of the server certificate |
| void mqtt::ssl_options::set_enabled_cipher_suites | ( | const string & | enabledCipherSuites | ) |
Sets the list of cipher suites that the client will present to the server during the SSL handshake.
| enabledCipherSuites | 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 ommitted, 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). |
| void mqtt::ssl_options::set_key_store | ( | const string & | keyStore | ) |
Sets the file containing the public certificate chain of the client.
| keyStore | The file in PEM format containing the public certificate chain of the client. It may also include the client's private key. |
| void mqtt::ssl_options::set_private_key | ( | const string & | privateKey | ) |
Sets the file containing the client's private key.
| privateKey | If not included in the sslKeyStore, this is the file in PEM format containing the client's private key. |
| void mqtt::ssl_options::set_private_key_password | ( | const string & | privateKeyPassword | ) |
Sets the password to load the client's privateKey if encrypted.
| privateKeyPassword | The password to load the privateKey if encrypted. |
| void mqtt::ssl_options::set_trust_store | ( | const string & | trustStore | ) |
Sets the file containing the public digital certificates trusted by the client.
| trustStore | The file in PEM format containing the public digital certificates trusted by the client. |