com php-src: Fixed bug #55618 (use case-insensitive cert name matching): ext/openssl/openssl.c

From: Date: Wed, 21 Jan 2015 10:22:33 +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-84276@lists.php.net to get a copy of this message
Commit: eaf107c07824dc784aa4441b76e0b8a05031ce1c Author: Daniel Lowrey <rdlowrey@php.net> Wed, 14 Jan 2015 18:02:50 +0100 Committer: Julien Pauli <jpauli@php.net> Wed, 21 Jan 2015 11:22:33 +0100 Parents: 57d47847ccf235b985d8b4269f14b2bf8b87754f Branches: PHP-5.5.21 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=eaf107c07824dc784aa4441b76e0b8a05031ce1c 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 4a4ec6f..f5ac337 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -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, '.'); } }

« previous php.cvs (#84276) next »