diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-11-18 17:56:58 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-11-18 17:56:58 +0100 |
commit | 386e2e52f63971d3c1f33fb6b90715549d81ed1e (patch) | |
tree | 4d1fe7bc10b434136ab0384ffd7686a1b5a48631 /client | |
parent | c8fa6f782c9e3bc7ac83b36e486e9177fa9fa18c (diff) | |
download | mariadb-git-386e2e52f63971d3c1f33fb6b90715549d81ed1e.tar.gz |
new mysqltest connect option SSL-CIPHER=xxxx
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 8 |
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"); |