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

getinfo with OpenSSL backend - No connection information available #234

Closed
dkjjr89 opened this issue Apr 22, 2015 · 5 comments
Closed

getinfo with OpenSSL backend - No connection information available #234

dkjjr89 opened this issue Apr 22, 2015 · 5 comments
Assignees
Labels

Comments

@dkjjr89
Copy link

dkjjr89 commented Apr 22, 2015

My understanding of OpenSSL (granted is limited) is that with a connection structure you can obtain the context that created the connection. I am not aware of a way to obtain an existing connection from a context structure. In version libcurl 7.41.0 I changed line 310 of lib/getino.c from:

internals = conn->ssl[sockindex].ctx;

To:

internals = conn->ssl[sockindex].handle;
@jay jay added the TLS label Apr 22, 2015
@bagder
Copy link
Member

bagder commented Apr 26, 2015

This may be the right thing to do, yes. It also struck me that since we do not at all document what sort of internal handle you get back, no application can reliably use this anyway. We should fix that too.

@bagder bagder self-assigned this Apr 26, 2015
@bagder
Copy link
Member

bagder commented Apr 26, 2015

I took the question to the list just to see if there's anyone with thoughts (like for example Christian who brought the feature initially): http://curl.haxx.se/mail/lib-2015-04/0149.html

@bagder
Copy link
Member

bagder commented Apr 26, 2015

I'm reluctant to change the existing code since it has been like this for a while already and there may be apps using it.

@dkjjr89
Copy link
Author

dkjjr89 commented Apr 27, 2015

I understand. Thanks!

@bagder bagder closed this as completed May 10, 2015
jay added a commit that referenced this issue Feb 24, 2016
The two options are almost the same, except in the case of OpenSSL:

CURLINFO_TLS_SESSION OpenSSL session internals is SSL_CTX *.

CURLINFO_TLS_SSL_PTR OpenSSL session internals is SSL *.

For backwards compatibility we couldn't modify CURLINFO_TLS_SESSION to
return an SSL pointer for OpenSSL.

Also, add support for the 'internals' member to point to SSL object for
the other backends axTLS, PolarSSL, Secure Channel, Secure Transport and
wolfSSL.

Bug: #234
Reported-by: dkjjr89@users.noreply.github.com

Bug: https://curl.haxx.se/mail/lib-2015-09/0127.html
Reported-by: Michael König
@jay
Copy link
Member

jay commented Feb 24, 2016

@dkjjr89 I've added CURLINFO_TLS_SSL_PTR which should do what you want, please see 332414a. The option name is subject to change. Barring anything unforeseen it will be in the next version of curl, 7.48.0.

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants