diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-17 12:02:27 -0600 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-17 12:02:27 -0600 |
commit | 78de94dc4e016beecaeed13aecc98ee6bde28115 (patch) | |
tree | d59fddd66991dc3df3ca7ed4973b59d3e7664f7d | |
parent | 29faafe7418dcb837ad9cddfbf57bddba681a22c (diff) | |
download | cryptography-78de94dc4e016beecaeed13aecc98ee6bde28115.tar.gz cryptography-78de94dc4e016beecaeed13aecc98ee6bde28115.tar.bz2 cryptography-78de94dc4e016beecaeed13aecc98ee6bde28115.zip |
Expose a name needed for ECDHE -- the NIDs are always available
-rw-r--r-- | cryptography/hazmat/bindings/openssl/ec.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/cryptography/hazmat/bindings/openssl/ec.py b/cryptography/hazmat/bindings/openssl/ec.py index c9ca388f..9f10365a 100644 --- a/cryptography/hazmat/bindings/openssl/ec.py +++ b/cryptography/hazmat/bindings/openssl/ec.py @@ -32,6 +32,7 @@ static const int NID_X9_62_prime256v1; FUNCTIONS = """ EC_KEY *EC_KEY_new_by_curve_name(int); +void EC_KEY_free(EC_KEY *); """ MACROS = """ @@ -41,14 +42,7 @@ CUSTOMIZATIONS = """ #ifdef OPENSSL_NO_EC static const long Cryptography_HAS_EC = 0; EC_KEY* (*EC_KEY_new_by_curve_name)(int) = NULL; - -static const long NID_X9_62_prime192v1 = -1; -static const long NID_X9_62_prime192v2 = -1; -static const long NID_X9_62_prime192v3 = -1; -static const long NID_X9_62_prime239v1 = -1; -static const long NID_X9_62_prime239v2 = -1; -static const long NID_X9_62_prime239v3 = -1; -static const long NID_X9_62_prime256v1 = -1; +void (*EC_KEY_free)(EC_KEY *) = NULL; #else static const long Cryptography_HAS_EC = 1; #endif @@ -57,13 +51,6 @@ static const long Cryptography_HAS_EC = 1; CONDITIONAL_NAMES = { "Cryptography_HAS_EC": [ "EC_KEY_new_by_curve_name", - - "NID_X9_62_prime192v1", - "NID_X9_62_prime192v2", - "NID_X9_62_prime192v3", - "NID_X9_62_prime239v1", - "NID_X9_62_prime239v2", - "NID_X9_62_prime239v3", - "NID_X9_62_prime256v1", + "EC_KEY_free", ], } |