diff options
author | Daniel Lowrey <rdlowrey@php.net> | 2015-01-14 18:02:50 +0100 |
---|---|---|
committer | Daniel Lowrey <rdlowrey@php.net> | 2015-01-14 18:02:50 +0100 |
commit | e2fe8e164f14054170ba8ad1f2a66ef1ef5acdfa (patch) | |
tree | 1ddac86648d0b5e6a6423dfc98cf1d0e34525797 | |
parent | ebb98e7aeb4c01f79f36556443c63d57824e4b80 (diff) | |
download | php-git-e2fe8e164f14054170ba8ad1f2a66ef1ef5acdfa.tar.gz |
Fixed bug #55618 (use case-insensitive cert name matching)
-rwxr-xr-x | ext/openssl/openssl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 05d946a548..216a56a59f 100755 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -4556,14 +4556,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, '.'); } } |