summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lowrey <rdlowrey@php.net>2015-01-14 18:02:50 +0100
committerJulien Pauli <jpauli@php.net>2015-01-21 11:22:33 +0100
commiteaf107c07824dc784aa4441b76e0b8a05031ce1c (patch)
treec53709973403fa6d313e3a54d4cc85e1f385ba00
parent57d47847ccf235b985d8b4269f14b2bf8b87754f (diff)
downloadphp-git-eaf107c07824dc784aa4441b76e0b8a05031ce1c.tar.gz
Fixed bug #55618 (use case-insensitive cert name matching)
-rw-r--r--ext/openssl/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 4a4ec6f67d..f5ac3375df 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -4619,14 +4619,14 @@ int php_openssl_apply_verification_policy(SSL *ssl, X509 *peer, php_stream *stre
return FAILURE;
}
- match = strcmp(cnmatch, buf) == 0;
+ match = strcasecmp(cnmatch, buf) == 0;
if (!match && strlen(buf) > 3 && buf[0] == '*' && buf[1] == '.') {
/* Try wildcard */
if (strchr(buf+2, '.')) {
char *tmp = strstr(cnmatch, buf+1);
- match = tmp && strcmp(tmp, buf+2) && tmp == strchr(cnmatch, '.');
+ match = tmp && strcasecmp(tmp, buf+2) && tmp == strchr(cnmatch, '.');
}
}