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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index da18a0fdea1..e2d4a0949df 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1821,7 +1821,8 @@ 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, 0, 0, 0) != 1;
+ ret_validation= X509_check_host(server_cert, server_hostname,
+ strlen(server_hostname), 0, 0) != 1;
#else
subject= X509_get_subject_name(server_cert);
cn_loc= X509_NAME_get_index_by_NID(subject, NID_commonName, -1);