Certificate Name Check Callback
Checking the certificate name is performed by a function called the certificate name check callback. The HTTPS package provides a default version of this function that compares the “Common Name” field in the certificate to the name of the host to which your application is actually connected. This default version supports the use of the * wildcard in host names. See RFC 2818 for more information.
NOTE: The HTTPS RFC states that this method of name verification is deprecated, but it is widely used on the Internet today. The HTTPS RFC recommends checking the dNSName extension of the certificate, but because few certificates have the dNSName extension, code to check it is not included.
You can change the default certificate name check callback to any function that you supply. See Supplying Your Own Callbacks for information on how to write a certificate name check callback.