Hazelcast C++ Client
Public Member Functions | List of all members
hazelcast::client::config::SSLConfig Class Reference

Contains configuration parameters for client network related behaviour. More...

#include <SSLConfig.h>

Public Member Functions

 SSLConfig ()
 Default protocol is tlsv12 and ssl is disabled by default.
 
bool isEnabled () const
 Returns if this configuration is enabled. More...
 
SSLConfigsetEnabled (bool enabled)
 Enables and disables this configuration. More...
 
SSLConfigsetProtocol (SSLProtocol protocol)
 Sets the ssl protocol to be used for this SSL socket. More...
 
SSLProtocol getProtocol () const
 
const std::vector< std::string > & getVerifyFiles () const
 
SSLConfigaddVerifyFile (const std::string &filename)
 This API calls the OpenSSL SSL_CTX_load_verify_locations method underneath while starting the client with this configuration. More...
 
const std::string & getCipherList () const
 
SSLConfigsetCipherList (const std::string &ciphers)
 

Detailed Description

Contains configuration parameters for client network related behaviour.

Member Function Documentation

◆ addVerifyFile()

SSLConfig & hazelcast::client::config::SSLConfig::addVerifyFile ( const std::string &  filename)

This API calls the OpenSSL SSL_CTX_load_verify_locations method underneath while starting the client with this configuration.

The validity of the files are checked only when the client starts. Hence, this call will not do any error checking. Error checking is performed only when the certificates are actually loaded during client start.

Parameters
filenamethe name of a file containing certification authority certificates in PEM format.

◆ getCipherList()

const std::string & hazelcast::client::config::SSLConfig::getCipherList ( ) const
Returns
Returns the use configured cipher list string.

◆ getProtocol()

SSLProtocol hazelcast::client::config::SSLConfig::getProtocol ( ) const
Returns
The configured SSL protocol

◆ getVerifyFiles()

const std::vector< std::string > & hazelcast::client::config::SSLConfig::getVerifyFiles ( ) const
Returns
The list of all configured certificate verify files for the client.

◆ isEnabled()

bool hazelcast::client::config::SSLConfig::isEnabled ( ) const

Returns if this configuration is enabled.

Returns
true if enabled, false otherwise

◆ setCipherList()

SSLConfig & hazelcast::client::config::SSLConfig::setCipherList ( const std::string &  ciphers)
Parameters
ciphersThe list of ciphers to be used. During client start, if this API was set then the SSL_CTX_set_cipher_list (https://www.openssl.org/docs/man1.0.2/ssl/SSL_set_cipher_list.html) is called with the provided ciphers string. The values and the format of the ciphers are described here: https://www.openssl.org/docs/man1.0.2/apps/ciphers.html Some examples values for the string are: "HIGH", "MEDIUM", "LOW", etc.

If non of the provided ciphers could be selected the client initialization will fail.

◆ setEnabled()

SSLConfig & hazelcast::client::config::SSLConfig::setEnabled ( bool  enabled)

Enables and disables this configuration.

Parameters
enabledtrue to enable, false to disable

◆ setProtocol()

SSLConfig & hazelcast::client::config::SSLConfig::setProtocol ( SSLProtocol  protocol)

Sets the ssl protocol to be used for this SSL socket.

Parameters
protocolOne of the supported protocols

The documentation for this class was generated from the following files: