hamano/xtwitter — pull request #1 by hpshelton (2012-11-04 01:29:05+00:00)
Title: Correctly verify the SSL certificate presented has a CNAME matching the ...

...requested host

The cURL manual explains the correct usage of CURLOPT_SSL_VERIFYHOST as follows:

1 to check the existence of a common name in the SSL peer certificate. 2 to check the existence of a common name and also verify that it matches the hostname provided. In production environments the value of this option should be kept at 2 (default value).

See http://www.cs.utexas.edu/~shmat/shmat_ccs12.pdf for a full analysis of the security vulnerability here.