aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2014-01-17 10:56:55 -0800
committerDonald Stufft <donald@stufft.io>2014-01-17 10:56:55 -0800
commit16168d0023e00b4465cce46efa6e17895d4d112d (patch)
treed59fddd66991dc3df3ca7ed4973b59d3e7664f7d
parent29faafe7418dcb837ad9cddfbf57bddba681a22c (diff)
parent78de94dc4e016beecaeed13aecc98ee6bde28115 (diff)
downloadcryptography-16168d0023e00b4465cce46efa6e17895d4d112d.tar.gz
cryptography-16168d0023e00b4465cce46efa6e17895d4d112d.tar.bz2
cryptography-16168d0023e00b4465cce46efa6e17895d4d112d.zip
Merge pull request #477 from alex/expose-ecdhe-name
Expose a name needed for ECDHE -- the NIDs are always available
-rw-r--r--cryptography/hazmat/bindings/openssl/ec.py19
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",
],
}