mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
Merge branch 'PHP-5.6'
* PHP-5.6: Wildcards should only be used in the first name component; fixed comment style
This commit is contained in:
commit
0120a9ca4b
@ -276,11 +276,12 @@ static zend_bool matches_wildcard_name(const char *subjectname, const char *cert
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!(wildcard = strchr(certname, '*'))) {
|
||||
/* wildcard, if present, must only be present in the left-most component */
|
||||
if (!(wildcard = strchr(certname, '*')) || memchr(certname, '.', wildcard - certname)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 1) prefix, if not empty, must match subject
|
||||
/* 1) prefix, if not empty, must match subject */
|
||||
prefix_len = wildcard - certname;
|
||||
if (prefix_len && strncasecmp(subjectname, certname, prefix_len) != 0) {
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user