Skip to content

Commit

Permalink
Add compatibility for deprecated TLS methods
Browse files Browse the repository at this point in the history
  • Loading branch information
neheb committed Jun 8, 2019
1 parent 1215fa3 commit d1803e0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/_cffi_src/openssl/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
static const long Cryptography_HAS_TLS_ST;
static const long Cryptography_HAS_SSL2;
static const long Cryptography_HAS_SSL3_METHOD;
static const long Cryptography_HAS_TLSv1;
static const long Cryptography_HAS_TLSv1_1;
static const long Cryptography_HAS_TLSv1_2;
static const long Cryptography_HAS_TLSv1_3;
Expand Down Expand Up @@ -634,8 +635,34 @@
static const long Cryptography_HAS_TLSEXT_STATUS_REQ_TYPE = 1;
static const long Cryptography_HAS_RELEASE_BUFFERS = 1;
static const long Cryptography_HAS_OP_NO_COMPRESSION = 1;
$ifdef OPENSSL_NO_TLS1_METHID
static const long Cryptography_HAS_TLSv1 = 0;
SSL_METHOD* (*TLSv1_method)(void) = NULL;
SSL_METHOD* (*TLSv1_server_method)(void) = NULL;
SSL_METHOD* (*TLSv1_client_method)(void) = NULL;
#else
static const long Cryptography_HAS_TLSv1 = 1;
#endif
#ifdef OPENSSL_NO_TLS1_1_METHOD
static const long Cryptography_HAS_TLSv1_1 = 0;
SSL_METHOD* (*TLSv1_1_method)(void) = NULL;
SSL_METHOD* (*TLSv1_1_server_method)(void) = NULL;
SSL_METHOD* (*TLSv1_1_client_method)(void) = NULL;
#else
static const long Cryptography_HAS_TLSv1_1 = 1;
#endif
#ifdef OPENSSL_NO_TLS1_2_METHOD
static const long Cryptography_HAS_TLSv1_2 = 0;
SSL_METHOD* (*TLSv1_2_method)(void) = NULL;
SSL_METHOD* (*TLSv1_2_server_method)(void) = NULL;
SSL_METHOD* (*TLSv1_2_client_method)(void) = NULL;
#else
static const long Cryptography_HAS_TLSv1_2 = 1;
#endif
static const long Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING = 1;
static const long Cryptography_HAS_SSL_OP_NO_TICKET = 1;
static const long Cryptography_HAS_SSL_SET_SSL_CTX = 1;
Expand Down

0 comments on commit d1803e0

Please sign in to comment.