Describes the SSL configuration of a cluster.

Functions

CassSsl *

cass_ssl_new

( )

Creates a new SSL context.

Returns:
Type Details
CassSsl *

Returns a SSL context that must be freed.

See Also:
void

cass_ssl_free

( CassSsl * ssl )

Frees a SSL context instance.

Parameters:
Name Type Details
in ssl CassSsl *
CassError

cass_ssl_add_trusted_cert

( CassSsl * ssl, CassString cert )

Adds a trusted certificate. This is used to verify the peer’s certificate.

Parameters:
Name Type Details
in ssl CassSsl *
in cert CassString

PEM formatted certificate string

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred

void

cass_ssl_set_verify_flags

( CassSsl * ssl, int flags )

Sets verifcation performed on the peer’s certificate.

CASS_SSL_VERIFY_NONE - No verification is performed CASS_SSL_VERIFY_PEER_CERT - Certificate is present and valid CASS_SSL_VERIFY_PEER_IDENTITY - IP address matches the certificate’s common name or one of its subject alternative names. This implies the certificate is also present.

Default: CASS_SSL_VERIFY_PEER_CERT

Parameters:
Name Type Details
in ssl CassSsl *
in flags int
Returns:
Type Details
void

CASS_OK if successful, otherwise an error occurred

CassError

cass_ssl_set_cert

( CassSsl * ssl, CassString cert )

Set client-side certificate chain. This is used to authenticate the client on the server-side. This should contain the entire Certificate chain starting with the certificate itself.

Parameters:
Name Type Details
in ssl CassSsl *
in cert CassString

PEM formatted certificate string

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred

CassError

cass_ssl_set_private_key

( CassSsl * ssl, CassString key, const char * password )

Set client-side private key. This is used to authenticate the client on the server-side.

Parameters:
Name Type Details
in ssl CassSsl *
in key CassString

PEM formatted key string

in password const char *

used to decrypt key

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred