diff options
| author | PhiBo <phibo@dinotools.org> | 2014-05-07 00:48:43 +0200 | 
|---|---|---|
| committer | PhiBo <phibo@dinotools.org> | 2014-05-07 00:48:43 +0200 | 
| commit | b6f6cdecfc7b82d15a766a13f0d5ca6c5893c82d (patch) | |
| tree | 51c9ce4fdda241ac52d73ae5f1186d8cf9814b99 | |
| parent | 5ce82d6c58d09a54b8b8faf547a5cf5fb2390f91 (diff) | |
| download | cryptography-b6f6cdecfc7b82d15a766a13f0d5ca6c5893c82d.tar.gz cryptography-b6f6cdecfc7b82d15a766a13f0d5ca6c5893c82d.tar.bz2 cryptography-b6f6cdecfc7b82d15a766a13f0d5ca6c5893c82d.zip  | |
Fix to build without secure renegotiation support
| -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  | 
