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

Add API for getting the method of a Context object #61

Closed
lvh opened this issue Mar 11, 2014 · 6 comments
Closed

Add API for getting the method of a Context object #61

lvh opened this issue Mar 11, 2014 · 6 comments

Comments

@lvh
Copy link
Member

lvh commented Mar 11, 2014

Could be that I've missed this in the documentation, but there does not appear to be a way to access the method (as in SSLv23_METHOD) of an already existing context.

I want this for writing tests.

@exarkun
Copy link
Member

exarkun commented Mar 11, 2014

Yes. This would be nice.

@exarkun
Copy link
Member

exarkun commented Mar 11, 2014

Perhaps the reason there is not yet any binding, though, is that there is no obvious OpenSSL API for accessing this information.

@exarkun
Copy link
Member

exarkun commented Mar 11, 2014

I suppose it's possible to just reach in and inspect the method field of the structure, though.

First cryptography will need to be updated to expose some SSL_CTX guts, though.

@lvh
Copy link
Member Author

lvh commented Mar 11, 2014

Cool! I'll file a bug and link to this one.

lvh added a commit to pyca/cryptography that referenced this issue Mar 12, 2014
Partially deopaque SSL_CTX to support a pyopenssl use case

This allows PyOpenSSL to access the "method" field of the SSL_CTX struct, which allows you to see the method of an already existing context. This is useful, for example, for debugging and testing. The relevant PyOpenSSL ticket is pyca/pyopenssl#61.

Fixes #783.
@lvh
Copy link
Member Author

lvh commented Mar 12, 2014

Cryptography has now grown support for this, so we can use it as soon as we require the next version of it.

However, the cryptography project does not have unit tests for this feature since they themselves do not consume that API; so we will want them in PyOpenSSL. (We'd want them anyway, of course.)

Ivoz pushed a commit to Ivoz/cryptography.vectors that referenced this issue Mar 12, 2014
Partially deopaque SSL_CTX to support a pyopenssl use case

This allows PyOpenSSL to access the "method" field of the SSL_CTX struct, which allows you to see the method of an already existing context. This is useful, for example, for debugging and testing. The relevant PyOpenSSL ticket is pyca/pyopenssl#61.

Fixes #783.
@lvh
Copy link
Member Author

lvh commented Mar 22, 2014

See also pyca/cryptography#841 ; we will need to use a get_method API, not just context.method.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants