php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch php-openssl-CN_match-case-insentive.txt for OpenSSL related Bug #55618

Patch version 2011-09-06 09:06 UTC

Return to Bug #55618 | Download this patch
Patch Revisions:

Developer: fkooman@tuxed.net

Index: ext/openssl/openssl.c
===================================================================
--- ext/openssl/openssl.c	(revision 316231)
+++ ext/openssl/openssl.c	(working copy)
@@ -4404,14 +4404,14 @@
 			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, '.');
 			}
 		}
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC