summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 f2c091261b4..850daa38750 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1909,6 +1909,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