summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-10-06 19:53:55 +0200
committerSergei Golubchik <sergii@pisem.net>2014-10-06 19:53:55 +0200
commit1ddfce4840994b6b79a3f426fcedf8f0469334ac (patch)
tree4a5700c90dacb63f00a8d130e94ba0398b2ee371 /sql-common
parentc0977073e18d070810c20026defc63794154e288 (diff)
parent3139aa87b4f215418740939cc8d156150c355823 (diff)
downloadmariadb-git-1ddfce4840994b6b79a3f426fcedf8f0469334ac.tar.gz
mysql-5.5.40
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 782c4281c03..69387391e6d 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1906,6 +1906,12 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
DBUG_RETURN(1);
}
+ if (X509_V_OK != SSL_get_verify_result(ssl))
+ {
+ *errptr= "Failed to verify the server certificate";
+ X509_free(server_cert);
+ DBUG_RETURN(1);
+ }
/*
We already know that the certificate exchanged was valid; the SSL library
handled that. Now we need to verify that the contents of the certificate