Re: HTTP_Reques2 socket adapter and ssl
| From: | Alexey Borzov | Date: | Mon, 14 Sep 2009 15:39:01 +0000 |
| Subject: | Re: HTTP_Reques2 socket adapter and ssl | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52827@lists.php.net to get a copy of this message | ||
Hi David,
David Jean Louis wrote:
I was trying to implement ssl support in Services_Twitter (we use HTTP_Request2 with the socket adapter by default) and it wasn't working, the error I had was: ... I realized that it was because HTTP_Request2 sets ssl_verify_peer option to true by default; setting it to false in my code solved the problem. Is this deliberate or is it a bug ? because in the php documentation default is false: http://php.net/manual/en/context.ssl.phpThis is deliberate, since recent cURL versions set this to true by default and modern browsers fuss a lot about invalid certificates. I think this is rather a (lack of) documentation problem. When documentation is done, I'll also have to point that 'ssl_verify_host' in Socket adapter is effectively a no-op due to http://bugs.php.net/bug.php?id=47030 and that 'ssl_verify_peer' won't work in it when connecting through proxy.