ZF-1004: Add support for stream context in the Socket adapter
Description
Currently, the default Socket adapter does not support stream contexts - for example, there is no way to set a local certificate for HTTPS connections (might be important for PayPal access for example)
We should either improve the socket adapter to support this or create a new adapter based on stream_socket_client() instead of fsockopen().
Comments
Posted by Shahar Evron (shahar) on 2007-03-02T07:29:14.000+0000
apparently, stream_context_set_params() can be used on sockets created by fsockopen as well - so there is not much rewriting to be done here. This can be done using a new configuration option and a call to stream_context_set_params() on the socket after opening the connection.
Posted by Alex Adriaanse (alexadriaanse) on 2007-07-30T21:37:39.000+0000
I have attached a patch that changes the Socket adapter to use stream_context_create() instead of fsockopen(), and adds 'sslcert' and 'sslpassphrase' options to allow client SSL certificates to be used. Although the conversion from fsockopen() to stream_socket_client() may not have been needed, it only required changes in a few lines of code and as far as I can tell does not have any drawbacks.
Posted by Shahar Evron (shahar) on 2007-07-31T10:38:02.000+0000
Hi Alex,
Thanks for the patch, it looks great! One question: Did you sign your CLA yet? I can only apply the patch if you signed the Framework CLA: http://framework.zend.com/wiki/display/…
Posted by Alex Adriaanse (alexadriaanse) on 2007-07-31T10:55:12.000+0000
You're welcome. Yes, I signed the CLA back in November 2006.
Posted by Shahar Evron (shahar) on 2007-08-20T11:28:54.000+0000
Patch applied in revision 6146.
Posted by Shahar Evron (shahar) on 2007-09-16T07:32:06.000+0000
Fixed for both 1.1.0 and 1.0.2
Posted by Wil Sinclair (wil) on 2008-01-23T18:42:10.000+0000
Updating Fix Version to follow issue tracker conventions.