summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-04-22 00:48:13 +0200
committerunknown <msvensson@neptunus.(none)>2006-04-22 00:48:13 +0200
commit98a2008fd247c996c0c53cb69ac92ddc1118b109 (patch)
tree2eb5e609d509b73d85a94e2edde0ca1a50800db2 /sql-common
parenta66fc918e954b00f3f9981e8b260ce50aeccf230 (diff)
downloadmariadb-git-98a2008fd247c996c0c53cb69ac92ddc1118b109.tar.gz
Backport fix for mysql client not using SSl library directly
- Add function mysql_get_ssl_cipher - Use function mysql_get_ssl_cipher from mysql client/mysql.cc: Backport fix for mysql client not using SSl library directly include/mysql.h: Backport fix for mysql client not using SSl library directly libmysql/libmysql.def: Backport fix for mysql client not using SSl library directly libmysqld/libmysqld.def: Backport fix for mysql client not using SSl library directly sql-common/client.c: Backport fix for mysql client not using SSl library directly
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 84df31b7440..72745d72b12 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)
+ DBUG_RETURN(SSL_get_cipher_name((SSL*)mysql->net.vio->ssl_arg));
+ DBUG_RETURN(NULL);
+}
+
#endif /* HAVE_OPENSSL */