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

capture_peer_cert for SSL context does not have any effect #2156

Closed
rmccue opened this issue Mar 23, 2014 · 3 comments
Closed

capture_peer_cert for SSL context does not have any effect #2156

rmccue opened this issue Mar 23, 2014 · 3 comments

Comments

@rmccue
Copy link

rmccue commented Mar 23, 2014

As far as I can tell, setting the capture_peer_cert option on the SSL stream context does not appear to have any effect. The peer_certificate option is not populated after the request is made, so it's impossible to parse this out.

To reproduce:

$context = stream_context_create(['ssl' => ['verify_peer' => true, 'capture_peer_cert' => true]]);

$connection = stream_socket_client('ssl://httpbin.org:443', $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $context);

var_dump(stream_context_get_options($context));
@rmccue
Copy link
Author

rmccue commented Mar 23, 2014

Looks like this is probably the reason test/zend/bad/ext/openssl/tests/sni_001.php is marked bad too.

rmccue added a commit to WordPress/Requests that referenced this issue Mar 23, 2014
@scannell
Copy link
Contributor

scannell commented Apr 2, 2014

Thanks for reporting this. Feel free to submit a PR if you (or someone else reading this) gets to this before we do.

@Orvid
Copy link
Contributor

Orvid commented Apr 29, 2016

Looks to be fixed: https://3v4l.org/RUU3g

@Orvid Orvid closed this as completed Apr 29, 2016
facebook-github-bot pushed a commit that referenced this issue Mar 12, 2024
Summary: Pull Request resolved: facebook/folly#2156

Reviewed By: Gownta

Differential Revision: D54646817

Pulled By: Orvid

fbshipit-source-id: b693692932ef4e68cfdcdddbbbdf089841b53d88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants