diff options
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 13a816b05b9..9f445c02df9 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1536,6 +1536,27 @@ mysql_ssl_free(MYSQL *mysql __attribute__((unused))) DBUG_VOID_RETURN; } + +/* + Return the SSL cipher (if any) used for current + connection to the server. + + SYNOPSYS + mysql_get_ssl_cipher() + mysql pointer to the mysql connection + +*/ + +const char * STDCALL +mysql_get_ssl_cipher(MYSQL *mysql) +{ + DBUG_ENTER("mysql_get_ssl_cipher"); + if (mysql->net.vio && mysql->net.vio->ssl_arg) + DBUG_RETURN(SSL_get_cipher_name((SSL*)mysql->net.vio->ssl_arg)); + DBUG_RETURN(NULL); +} + + /* Check the server's (subject) Common Name against the hostname we connected to |