diff options
-rw-r--r-- | cryptography/hazmat/bindings/openssl/ssl.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cryptography/hazmat/bindings/openssl/ssl.py b/cryptography/hazmat/bindings/openssl/ssl.py index 1a2a69e9..d4671a5c 100644 --- a/cryptography/hazmat/bindings/openssl/ssl.py +++ b/cryptography/hazmat/bindings/openssl/ssl.py @@ -364,12 +364,14 @@ SSL_CIPHER *sk_SSL_CIPHER_value(Cryptography_STACK_OF_SSL_CIPHER *, int); """ CUSTOMIZATIONS = """ -/* Secure renegotiation is supported in OpenSSL >= 0.9.8m */ -#if OPENSSL_VERSION_NUMBER < 0x009080dfL +/** Secure renegotiation is supported in OpenSSL >= 0.9.8m + * But some Linux distributions have back ported some features. + */ +#ifndef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION static const long Cryptography_HAS_SECURE_RENEGOTIATION = 0; -long SSL_get_secure_renegotiation_support(SSL *) = 0; -static const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = 0; -static const SSL_OP_LEGACY_SERVER_CONNECT = 0; +long (*SSL_get_secure_renegotiation_support)(SSL *) = NULL; +const long SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = 0; +const long SSL_OP_LEGACY_SERVER_CONNECT = 0; #else static const long Cryptography_HAS_SECURE_RENEGOTIATION = 1; #endif |