joyent/node — pull request #8321 by tlivings (2014-09-05 15:08:44+00:00)
Title: Enable override of checkServerIdentity in tls connections.

Currently TLS doesn't support overriding servername checks, only overriding all validation failures (`rejectUnauthorized:false`).

This change allows providing custom servername checks.

Reference to issue:
- http://stackoverflow.com/questions/14088787/hostname-ip-doesnt-match-certificates-altname
- http://stackoverflow.com/questions/22891228/encountering-hostname-ip-doesnt-match-certificates-altnames-on-heroku
- https://github.com/pkgcloud/pkgcloud/issues/174
- http://stackoverflow.com/questions/3048236/amazon-s3-https-ssl-is-it-possible

etc.