Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding Context to CakeSocket #334

Closed
wants to merge 5 commits into from
Closed

Conversation

pocketcrocodile
Copy link

#2270 adding Context to CakeSocket and HTTP Socket. Changing CakeSocket

from fsockopen to stream_socket_client allows giving the connection an
context. the default behavior is: if the connection is secure we get
the certificate, parse it and deliver it with the http-response object.

cakephp#2270 adding Context to CakeSocket and HTTP Socket. Changing CakeSocket
from fsockopen to stream_socket_client allows giving the connection an
context. the default behavior is: if the connection is secure we get
the certificate, parse it and deliver it with the http-response object.
@pocketcrocodile
Copy link
Author

#2270 adding Context to CakeSocket and HTTP Socket. Changing CakeSocket
from fsockopen to stream_socket_client allows giving the connection an
context. the default behavior is: if the connection is secure we get
the certificate, parse it and deliver it with the http-response object.

@lorenzo
Copy link
Member

lorenzo commented Nov 24, 2011

I'm not sure what is this trying to fix. using the CakeSocket class with the ssl:// protocol already works. can you explain this a little bit more?

@pocketcrocodile
Copy link
Author

of course cake socket works with ssl, but it does not give the context back (esp. the ssl cert for checking if we are communicating with the right server). the change is, we now get the certificate back and deliver it in the resonse object to the application.

@pocketcrocodile
Copy link
Author

@markstory
Copy link
Member

Shouldn't you be checking for the openssl_x509_export function before trying to use it? Not all installations have openssl installed.

@pocketcrocodile
Copy link
Author

good point. i'll check this.

@pocketcrocodile
Copy link
Author

i am getting crazy, but github did not let me update my request.

@markstory
Copy link
Member

You should be able to push to the original branch you pushed to. Github will automatically update the pull request.

check if openssl is installed by if php know openssl functions.
@pocketcrocodile
Copy link
Author

don't know why the change did not appear here, but now it does (and also my earlier changes).



public function checkFingerprint($fingerprint){
if (!isset($this->request['context']['ssl']['peer_certificate']))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing braces.

added missing branches
@ghost ghost assigned markstory Oct 29, 2012
@markstory
Copy link
Member

Closing in favor of #947

@markstory markstory closed this Nov 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants