summaryrefslogtreecommitdiff
path: root/sql-common/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'sql-common/client.c')
-rw-r--r--sql-common/client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 160a85fd7b5..d4ba7b6b9f5 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1832,8 +1832,10 @@ static int ssl_verify_server_cert(Vio *vio, const char* server_hostname, const c
*/
#ifdef HAVE_X509_check_host
- ret_validation= X509_check_host(server_cert, server_hostname,
- strlen(server_hostname), 0, 0) != 1;
+ ret_validation=
+ (X509_check_host(server_cert, server_hostname,
+ strlen(server_hostname), 0, 0) != 1) &&
+ (X509_check_ip_asc(server_cert, server_hostname, 0) != 1);
#else
subject= X509_get_subject_name(server_cert);
cn_loc= X509_NAME_get_index_by_NID(subject, NID_commonName, -1);