bagder/curl — pull request #93 by d235j (2014-02-23 16:37:03+00:00)
Title: Output a warning as CN validation is disabled for SSL with an IP address on Mac OS X.

On OS X, curl does not output any sort of warning or error if an https request is made with an IP address rather than a hostname, no matter what the CN field in the SSL certificate is. This is because the SSLSetPeerDomainName() call is required even for basic hostname checking. It also performs SNI checking if available.

This fix prints a warning but allows the connection to go through, which matches curl's behaviour when compiled on Windows with SChannel. Most of the other SSL backends do verify the IP address with the CN field. If this is preferred, changing the behaviour here to be consistent would be trivial.