Verify the certificate against common name and subject alternative names
Description
Unfortunately, PHP doesn’t check the certificate against the alternative names, leading things like ‘https://www.github.com/‘ to be invalid.
Instead
See also
- https://tools.ietf.org/html/rfc2818#section-3.1: RFC2818, Section 3.1
Parameters
$host
stringrequired- Host name to verify against
$context
resourcerequired- Stream context
User Contributed Notes
You must log in before being able to contribute a note or feedback.