summaryrefslogtreecommitdiff
path: root/client/mysql.cc
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil.kalimullin@oracle.com>2017-03-10 01:19:50 +0400
committerRamil Kalimullin <ramil.kalimullin@oracle.com>2017-03-10 01:19:50 +0400
commit2531c8dcd152bedeeebfe07d5e4a29bd84357c27 (patch)
tree25a818224d40ca50d38e8971c504b64475929d8b /client/mysql.cc
parentec2a6b6035ed842e39bcecc2c62c39758bda02fb (diff)
downloadmariadb-git-2531c8dcd152bedeeebfe07d5e4a29bd84357c27.tar.gz
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
Diffstat (limited to 'client/mysql.cc')
-rw-r--r--client/mysql.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index cdc2ab0d6e0..2269563814c 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1318,7 +1318,7 @@ sig_handler handle_sigint(int sig)
kill_mysql= mysql_init(kill_mysql);
if (!mysql_connect_ssl_check(kill_mysql, current_host, current_user, opt_password,
"", opt_mysql_port, opt_mysql_unix_port, 0,
- opt_ssl_required))
+ opt_ssl_mode == SSL_MODE_REQUIRED))
{
tee_fprintf(stdout, "Ctrl-C -- sorry, cannot connect to server to kill query, giving up ...\n");
goto err;
@@ -4461,7 +4461,7 @@ sql_real_connect(char *host,char *database,char *user,char *password,
if (!mysql_connect_ssl_check(&mysql, host, user, password,
database, opt_mysql_port, opt_mysql_unix_port,
connect_flag | CLIENT_MULTI_STATEMENTS,
- opt_ssl_required))
+ opt_ssl_mode == SSL_MODE_REQUIRED))
{
if (!silent ||
(mysql_errno(&mysql) != CR_CONN_HOST_ERROR &&