diff options
author | unknown <msvensson@neptunus.(none)> | 2006-04-07 11:26:21 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-04-07 11:26:21 +0200 |
commit | 80eccf26cdd469440ac2fb47bf897df89f0ce8af (patch) | |
tree | 6cc47e2021ddf59b75c5caa841415df76472f1b7 /sql-common | |
parent | 07302c60078b21b90d00b80677beced5de521f10 (diff) | |
download | mariadb-git-80eccf26cdd469440ac2fb47bf897df89f0ce8af.tar.gz |
Add new function mysql_get_ssl_cipher to libmysl and use it from client to avoid dependency on SSL libs from mysql client.
include/mysql.h:
Add new function mysql_get_ssl_cipher
sql-common/client.c:
Add new function mysql_get_ssl_cipher, will return the cipher used for the current connection to the server.
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 cd50960164b..a923e22a74a 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1535,6 +1535,27 @@ mysql_ssl_free(MYSQL *mysql __attribute__((unused))) mysql->connector_fd = 0; 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) + SSL_get_cipher_name((SSL*)mysql->net.vio->ssl_arg); + DBUG_RETURN(NULL); +} + #endif /* HAVE_OPENSSL */ |