diff options
author | Laurens Van Houtven <_@lvh.cc> | 2014-03-12 09:32:06 +0100 |
---|---|---|
committer | Laurens Van Houtven <_@lvh.cc> | 2014-03-12 09:32:06 +0100 |
commit | 9b0705bc789610f598218d11da1da9711c820ed8 (patch) | |
tree | 0cea8e5597232e05e347116b5692226c5800078c /cryptography | |
parent | 80b8cfa2f31fb3a19308e7aebce58fb8d1bc0f4a (diff) | |
parent | c4d9141ea0725bf0b893b23d9a48a1cf23455331 (diff) | |
download | cryptography-9b0705bc789610f598218d11da1da9711c820ed8.tar.gz cryptography-9b0705bc789610f598218d11da1da9711c820ed8.tar.bz2 cryptography-9b0705bc789610f598218d11da1da9711c820ed8.zip |
Merge pull request #784 from reaperhulk/fix-783
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.
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/hazmat/bindings/openssl/ssl.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cryptography/hazmat/bindings/openssl/ssl.py b/cryptography/hazmat/bindings/openssl/ssl.py index ea945b8d..9735ae6a 100644 --- a/cryptography/hazmat/bindings/openssl/ssl.py +++ b/cryptography/hazmat/bindings/openssl/ssl.py @@ -123,7 +123,12 @@ typedef ... X509_STORE_CTX; static const long X509_V_OK; static const long X509_V_ERR_APPLICATION_VERIFICATION; typedef ... SSL_METHOD; -typedef ... SSL_CTX; +typedef struct ssl_st { + int version; + int type; + const SSL_METHOD *method; + ...; +} SSL_CTX; typedef struct { int master_key_length; |