mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-09 02:00:49 +00:00
Fixed bug #55618 (use case-insensitive cert name matching)
This commit is contained in:
1 parent
57d47847cc
commit
eaf107c078
1 file changed
+2
-2
@@ -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, '.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user