|[ Index ]||
|[ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] [ Statistics ]|
SSL utilities for Requests
|File Size:||152 lines (4 kb)|
|Included or required:||0 times|
|Includes or requires:||0 files|
|verify_certificate($host, $cert) X-Ref|
|Verify the certificate against common name and subject alternative names|
Unfortunately, PHP doesn't check the certificate against the alternative
names, leading things like 'https://www.github.com/' to be invalid.
param: string $host Host name to verify against
param: array $cert Certificate data from openssl_x509_parse()
|Verify that a reference name is valid|
Verifies a dNSName for HTTPS usage, (almost) as per Firefox's rules:
- Wildcards can only occur in a name with more than 3 components
- Wildcards can only occur as the last character in the first
- Wildcards may be preceded by additional characters
We modify these rules to be a bit stricter and only allow the wildcard
character to be the full first component; that is, with the exclusion of
the third rule.
param: string $reference Reference dNSName
return: boolean Is the name valid?
|match_domain($host, $reference) X-Ref|
|Match a hostname against a dNSName reference|
param: string $host Requested host
param: string $reference dNSName to match against
return: boolean Does the domain match?
|Generated: Tue May 19 15:51:04 2020||Cross-referenced by PHPXref 0.7.1|