com php-src: Fixed bug #55618 (use case-insensitive cert name matching): ext/openssl/openssl.c
| From: | rdlowrey@php.net | Date: | Wed, 14 Jan 2015 17:02:50 +0000 |
| Subject: | com php-src: Fixed bug #55618 (use case-insensitive cert name matching): ext/openssl/openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84094@lists.php.net to get a copy of this message | ||
Commit: e2fe8e164f14054170ba8ad1f2a66ef1ef5acdfa
Author: Daniel Lowrey <rdlowrey@php.net> Wed, 14 Jan 2015 18:02:50 +0100
Parents: ebb98e7aeb4c01f79f36556443c63d57824e4b80
Branches: PHP-5.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e2fe8e164f14054170ba8ad1f2a66ef1ef5acdfa
Log:
Fixed bug #55618 (use case-insensitive cert name matching)
Bugs:
https://bugs.php.net/55618
Changed paths:
M ext/openssl/openssl.c
Diff:
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 05d946a..216a56a 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, '.');
}
}