note 110473 modified in function.curl-setopt by rdlowrey
| From: | rdlowrey@php.net | Date: | Mon, 24 Feb 2014 22:37:51 +0000 |
| Subject: | note 110473 modified in function.curl-setopt by rdlowrey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-198656@lists.php.net to get a copy of this message | ||
Be careful when changing CURLOPT_SSL_VERIFYHOST or other options to true (boolean). It may cause
insecure behavior [1]
This is because boolean true casts into integer 1, and CURLOPT_SSL_VERIFYHOST = 1 is not secure
behavior.
The *correct* value here is CURLOPT_SSL_VERIFYHOST = 2. By setting this value equal to 1 the peer
certificate must contain a Common Name field, but it doesn't matter what name it says.
[1] Martin Georgiev and Subodh Iyengar and Suman Jana and Rishita Anubhai and Dan Boneh and Vitaly
Shmatikov, The most dangerous code in the world: validating SSL certificates in non-browser
software, ACM CCS '12, pp. 38-49, 2012
--was--
Be careful when changing CURLOPT_SSL_VERIFYHOST or other options to true (boolean). It may cause
insecure behavior [1]
This is because boolean true casts into integer 1, and CURLOPT_SSL_VERIFYHOST = 1 is not secure
behavior.
[1] Martin Georgiev and Subodh Iyengar and Suman Jana and Rishita Anubhai and Dan Boneh and Vitaly
Shmatikov, The most dangerous code in the world: validating SSL certificates in non-browser
software, ACM CCS '12, pp. 38-49, 2012
http://php.net/manual/en/function.curl-setopt.php