diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-16 17:04:05 -0600 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-16 17:04:05 -0600 |
| commit | 162eead0c6848b8aedf326a89b1ef76c510d3096 (patch) | |
| tree | 4bf97340b094b1db2696ac3d693888ad698368df /cryptography | |
| parent | f2c5bfa982914237f930ba67daf2f29cebdcf4ad (diff) | |
| download | cryptography-162eead0c6848b8aedf326a89b1ef76c510d3096.tar.gz cryptography-162eead0c6848b8aedf326a89b1ef76c510d3096.tar.bz2 cryptography-162eead0c6848b8aedf326a89b1ef76c510d3096.zip | |
Allow these to not be defined because lololol fedora/centos
Diffstat (limited to 'cryptography')
| -rw-r--r-- | cryptography/hazmat/bindings/openssl/ec.py | 12 | ||||
| -rw-r--r-- | cryptography/hazmat/bindings/openssl/ssl.py | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/cryptography/hazmat/bindings/openssl/ec.py b/cryptography/hazmat/bindings/openssl/ec.py index 24539477..9720a60b 100644 --- a/cryptography/hazmat/bindings/openssl/ec.py +++ b/cryptography/hazmat/bindings/openssl/ec.py @@ -26,6 +26,16 @@ MACROS = """ """ CUSTOMIZATIONS = """ +#ifdef OPENSSL_NO_EC +static const long Cryptography_HAS_EC = 0; +#else +static const long Cryptography_HAS_EC = 1; +EC_KEY* (*EC_KEY_new_by_curve_name)(int) = NULL; +#endif """ -CONDITIONAL_NAMES = {} +CONDITIONAL_NAMES = { + "Cryptography_HAS_EC": [ + "EC_KEY_new_by_curve_name", + ] +} diff --git a/cryptography/hazmat/bindings/openssl/ssl.py b/cryptography/hazmat/bindings/openssl/ssl.py index ffc30963..cd872d18 100644 --- a/cryptography/hazmat/bindings/openssl/ssl.py +++ b/cryptography/hazmat/bindings/openssl/ssl.py @@ -347,6 +347,10 @@ static const long Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING = 1; static const long Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING = 0; const long SSL_OP_MSIE_SSLV2_RSA_PADDING = 0; #endif + +#ifdef OPENSSL_NO_EC +long (*SSL_CTX_set_tmp_ecdh)(SSL_CTX *, EC_KEY *) = NULL; +#endif """ CONDITIONAL_NAMES = { @@ -387,4 +391,8 @@ CONDITIONAL_NAMES = { "Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING": [ "SSL_OP_MSIE_SSLV2_RSA_PADDING", ], + + "Cryptography_HAS_EC": [ + "EC_KEY_new_by_curve_name", + ] } |
