Hostname validation
From OpenSSLWiki
Revision as of 17:42, 24 March 2013 by Philippe lhardy (talk | contribs)
One very common mistake made by users of OpenSSL is to assume that OpenSSL will validate the hostname in the server's certificate. Currently, it does not, although a future version (1.1.0?) will include this functionality.
Here is some sample code which shows how validating the hostname can be done. However, it does not handle wildcard certificates, so borrowing some code from cURL might be one way to go.