summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index ddfb52539c4..6ead479b94e 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5883,6 +5883,7 @@ void do_connect(struct st_command *command)
{
int con_port= opt_port;
char *con_options;
+ char *ssl_cipher= 0;
my_bool con_ssl= 0, con_compress= 0;
my_bool con_pipe= 0;
my_bool con_shm __attribute__ ((unused))= 0;
@@ -5971,6 +5972,11 @@ void do_connect(struct st_command *command)
length= (size_t) (end - con_options);
if (length == 3 && !strncmp(con_options, "SSL", 3))
con_ssl= 1;
+ else if (!strncmp(con_options, "SSL-CIPHER=", 11))
+ {
+ con_ssl= 1;
+ ssl_cipher=con_options + 11;
+ }
else if (length == 8 && !strncmp(con_options, "COMPRESS", 8))
con_compress= 1;
else if (length == 4 && !strncmp(con_options, "PIPE", 4))
@@ -6027,7 +6033,7 @@ void do_connect(struct st_command *command)
{
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
mysql_ssl_set(con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
- opt_ssl_capath, opt_ssl_cipher);
+ opt_ssl_capath, ssl_cipher ? ssl_cipher : opt_ssl_cipher);
#if MYSQL_VERSION_ID >= 50000
/* Turn on ssl_verify_server_cert only if host is "localhost" */
opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost");