Skip to content

Commit eaf107c

Browse files
rdlowreyJulien Pauli
authored andcommitted
Fixed bug #55618 (use case-insensitive cert name matching)
1 parent 57d4784 commit eaf107c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/openssl/openssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4619,14 +4619,14 @@ int php_openssl_apply_verification_policy(SSL *ssl, X509 *peer, php_stream *stre
46194619
return FAILURE;
46204620
}
46214621

4622-
match = strcmp(cnmatch, buf) == 0;
4622+
match = strcasecmp(cnmatch, buf) == 0;
46234623
if (!match && strlen(buf) > 3 && buf[0] == '*' && buf[1] == '.') {
46244624
/* Try wildcard */
46254625

46264626
if (strchr(buf+2, '.')) {
46274627
char *tmp = strstr(cnmatch, buf+1);
46284628

4629-
match = tmp && strcmp(tmp, buf+2) && tmp == strchr(cnmatch, '.');
4629+
match = tmp && strcasecmp(tmp, buf+2) && tmp == strchr(cnmatch, '.');
46304630
}
46314631
}
46324632

0 commit comments

Comments
 (0)