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

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

#include <ssl_config.h>

Public Member Functions

 ssl_config ()
 Default protocol is tlsv12 and ssl is disabled by default.
 
bool is_enabled () const
 Returns if this configuration is enabled. More...
 
ssl_configset_enabled (bool is_enabled)
 Enables and disables this configuration. More...
 
ssl_configset_protocol (ssl_protocol protocol)
 Sets the ssl protocol to be used for this SSL socket. More...
 
ssl_protocol get_protocol () const
 
const std::vector< std::string > & get_verify_files () const
 
ssl_configadd_verify_file (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 & get_cipher_list () const
 
ssl_configset_cipher_list (const std::string &ciphers)
 

Detailed Description

Contains configuration parameters for client network related behaviour.

Member Function Documentation

◆ add_verify_file()

ssl_config & hazelcast::client::config::ssl_config::add_verify_file ( 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.

◆ get_cipher_list()

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

◆ get_protocol()

ssl_protocol hazelcast::client::config::ssl_config::get_protocol ( ) const
Returns
The configured SSL protocol

◆ get_verify_files()

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

◆ is_enabled()

bool hazelcast::client::config::ssl_config::is_enabled ( ) const

Returns if this configuration is enabled.

Returns
true if enabled, false otherwise

◆ set_cipher_list()

ssl_config & hazelcast::client::config::ssl_config::set_cipher_list ( 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.

◆ set_enabled()

ssl_config & hazelcast::client::config::ssl_config::set_enabled ( bool  is_enabled)

Enables and disables this configuration.

Parameters
isEnabledtrue to enable, false to disable

◆ set_protocol()

ssl_config & hazelcast::client::config::ssl_config::set_protocol ( ssl_protocol  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: