summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-05-12 17:20:23 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-05-12 17:20:23 +0200
commitc51f85f8823a845cd4a6aa1b2aa5af18484b2ab0 (patch)
tree65c45f6100c13dad90c33b86dc68be268139b0b8 /sql-common
parenta89f199c64a1d2339de7c167ce64ec148061a4d3 (diff)
parent8ce702aa90c174566f4ac950e85cc7570bf9b647 (diff)
downloadmariadb-git-c51f85f8823a845cd4a6aa1b2aa5af18484b2ab0.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql-common')
-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);