Re: HTTP_Reques2 socket adapter and ssl
| From: | Alexey Borzov | Date: | Mon, 14 Sep 2009 17:00:37 +0000 |
| Subject: | Re: HTTP_Reques2 socket adapter and ssl | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52829@lists.php.net to get a copy of this message | ||
Hi David,
David Jean Louis wrote:
No idea, certificate is verified by OpenSSL extension so you'll have to dig out some debug info from that.Ok, thanks for the explanation Alexey. Any idea why it didn't work in my case ? I'm not using a proxy.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.