[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
SSL utilities for Requests
File Size: | 144 lines (4 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Requests_SSL:: (3 methods):
verify_certificate()
verify_reference_name()
match_domain()
Class: Requests_SSL - X-Ref
SSL utilities for Requestsverify_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. return: bool param: string $host Host name to verify against param: array $cert Certificate data from openssl_x509_parse() |
verify_reference_name($reference) X-Ref |
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 component - 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. return: boolean Is the name valid? param: string $reference Reference dNSName |
match_domain($host, $reference) X-Ref |
Match a hostname against a dNSName reference return: boolean Does the domain match? param: string $host Requested host param: string $reference dNSName to match against |
Generated: Thu Dec 15 01:00:02 2022 | Cross-referenced by PHPXref 0.7.1 |