mysql_get_ssl_cipher — Returns the name of the currently used cipher

const char * mysql_get_ssl_cipher(MYSQL * mysql);

Returns the name of the currently used cipher of the ssl connection.

Parameters

mysql

Connection identifier, which was previously allocated by mysql_init or mysql_real_connect

Return value

Returns the name of the currently used cipher or NULL for non ssl connections.

[Note]
mysql_get_ssl_cipher can be used to detect if the current connection is a ssl connection.

See also

mysq1_ssl_set