History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: ZF-1004
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Shahar Evron
Reporter: Shahar Evron
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

Add support for stream context in the Socket adapter

Created: 02/Mar/07 07:13 AM   Updated: 23/Jan/08 06:42 PM
Component/s: Zend_Http_Client
Affects Version/s: 0.8.0
Fix Version/s: 1.0.2

Time Tracking:
Not Specified

File Attachments: 1. Text File zend_http_client_sslcert.patch (3 kb)


Tags:
Participants: Alex Adriaanse, Shahar Evron and Wil Sinclair


 Description  « Hide
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().



 All   Comments   Work Log   Change History   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Shahar Evron - 02/Mar/07 07:29 AM
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.

Alex Adriaanse - 30/Jul/07 09:37 PM
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.

Shahar Evron - 31/Jul/07 10:38 AM
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/ZFPROP/Contributor+License+Agreement


Alex Adriaanse - 31/Jul/07 10:55 AM
You're welcome. Yes, I signed the CLA back in November 2006.

Shahar Evron - 20/Aug/07 11:28 AM
Patch applied in revision 6146.

Shahar Evron - 16/Sep/07 07:32 AM
Fixed for both 1.1.0 and 1.0.2

Wil Sinclair - 23/Jan/08 06:42 PM
Updating Fix Version to follow issue tracker conventions.