summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil.kalimullin@oracle.com>2017-03-10 01:19:50 +0400
committerGipson Pulla <gipson.pulla@oracle.com>2017-03-10 14:11:26 +0530
commit060b1eadf4913f7066484ea34ec62feead1bca44 (patch)
tree50788eb0f7e19ad589bdaa83fc3c721b59e9bf4f /client/mysqltest.cc
parent19150f7e7ac6e47e67b82c675f13ef1e550d429d (diff)
downloadmariadb-git-060b1eadf4913f7066484ea34ec62feead1bca44.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. (cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99)
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 79d448cf811..e5f9b11fe76 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -1,4 +1,4 @@
-/* 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
@@ -5283,7 +5283,7 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
host, port, sock, user, name, failed_attempts);
while(!mysql_connect_ssl_check(mysql, host,user, pass, db, port, sock,
CLIENT_MULTI_STATEMENTS | CLIENT_REMEMBER_OPTIONS,
- opt_ssl_required))
+ opt_ssl_mode == SSL_MODE_REQUIRED))
{
/*
Connect failed
@@ -5385,7 +5385,7 @@ int connect_n_handle_errors(struct st_command *command,
while (!mysql_connect_ssl_check(con, host, user, pass, db, port,
sock ? sock: 0, CLIENT_MULTI_STATEMENTS,
- opt_ssl_required))
+ opt_ssl_mode == SSL_MODE_REQUIRED))
{
/*
If we have used up all our connections check whether this