aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-08 11:59:30 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-08 11:59:30 -0500
commit0d5503a213f56350f555b2345cb4bbff11007307 (patch)
tree9212d763e9c66fe5f1427b07324023ec6c305619
parentfb201e9f21c19d2e31020012fafdeb85083d36c4 (diff)
downloadcryptography-0d5503a213f56350f555b2345cb4bbff11007307.tar.gz
cryptography-0d5503a213f56350f555b2345cb4bbff11007307.tar.bz2
cryptography-0d5503a213f56350f555b2345cb4bbff11007307.zip
Rearrange some EC stuff to be bound to the right ifdefs. fixes #900
-rw-r--r--cryptography/hazmat/bindings/openssl/ec.py48
1 files changed, 24 insertions, 24 deletions
diff --git a/cryptography/hazmat/bindings/openssl/ec.py b/cryptography/hazmat/bindings/openssl/ec.py
index 669490de..8ae2ae9a 100644
--- a/cryptography/hazmat/bindings/openssl/ec.py
+++ b/cryptography/hazmat/bindings/openssl/ec.py
@@ -240,9 +240,6 @@ void (*EC_GROUP_clear_free)(EC_GROUP *);
EC_GROUP *(*EC_GROUP_new_curve_GFp)(
const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *);
-EC_GROUP *(*EC_GROUP_new_curve_GF2m)(
- const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *);
-
EC_GROUP *(*EC_GROUP_new_by_curve_name)(int);
int (*EC_GROUP_set_curve_GFp)(
@@ -251,12 +248,6 @@ int (*EC_GROUP_set_curve_GFp)(
int (*EC_GROUP_get_curve_GFp)(
const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *, BN_CTX *);
-int (*EC_GROUP_set_curve_GF2m)(
- EC_GROUP *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *);
-
-int (*EC_GROUP_get_curve_GF2m)(
- const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *, BN_CTX *);
-
const EC_METHOD *(*EC_GROUP_method_of)(const EC_GROUP *) = NULL;
const EC_POINT *(*EC_GROUP_get0_generator)(const EC_GROUP *) = NULL;
int (*EC_GROUP_get_curve_name)(const EC_GROUP *) = NULL;
@@ -283,15 +274,6 @@ int (*EC_POINT_get_affine_coordinates_GFp)(const EC_GROUP *,
int (*EC_POINT_set_compressed_coordinates_GFp)(const EC_GROUP *, EC_POINT *,
const BIGNUM *, int, BN_CTX *) = NULL;
-int (*EC_POINT_set_affine_coordinates_GF2m)(const EC_GROUP *, EC_POINT *,
- const BIGNUM *, const BIGNUM *, BN_CTX *) = NULL;
-
-int (*EC_POINT_get_affine_coordinates_GF2m)(const EC_GROUP *,
- const EC_POINT *, BIGNUM *, BIGNUM *, BN_CTX *) = NULL;
-
-int (*EC_POINT_set_compressed_coordinates_GF2m)(const EC_GROUP *, EC_POINT *,
- const BIGNUM *, int, BN_CTX *) = NULL;
-
size_t (*EC_POINT_point2oct)(const EC_GROUP *, const EC_POINT *,
point_conversion_form_t,
unsigned char *, size_t, BN_CTX *) = NULL;
@@ -380,6 +362,24 @@ static const long Cryptography_HAS_EC_NISTP_64_GCC_128 = 1;
static const long Cryptography_HAS_EC2M = 0;
const EC_METHOD *(*EC_GF2m_simple_method)() = NULL;
+
+int (*EC_POINT_set_affine_coordinates_GF2m)(const EC_GROUP *, EC_POINT *,
+ const BIGNUM *, const BIGNUM *, BN_CTX *) = NULL;
+
+int (*EC_POINT_get_affine_coordinates_GF2m)(const EC_GROUP *,
+ const EC_POINT *, BIGNUM *, BIGNUM *, BN_CTX *) = NULL;
+
+int (*EC_POINT_set_compressed_coordinates_GF2m)(const EC_GROUP *, EC_POINT *,
+ const BIGNUM *, int, BN_CTX *) = NULL;
+
+int (*EC_GROUP_set_curve_GF2m)(
+ EC_GROUP *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *);
+
+int (*EC_GROUP_get_curve_GF2m)(
+ const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *, BN_CTX *);
+
+EC_GROUP *(*EC_GROUP_new_curve_GF2m)(
+ const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *);
#else
static const long Cryptography_HAS_EC2M = 1;
#endif
@@ -391,12 +391,9 @@ CONDITIONAL_NAMES = {
"EC_GROUP_free",
"EC_GROUP_clear_free",
"EC_GROUP_new_curve_GFp",
- "EC_GROUP_new_curve_GF2m",
"EC_GROUP_new_by_curve_name",
"EC_GROUP_set_curve_GFp",
"EC_GROUP_get_curve_GFp",
- "EC_GROUP_set_curve_GF2m",
- "EC_GROUP_get_curve_GF2m",
"EC_GROUP_method_of",
"EC_GROUP_get0_generator",
"EC_GROUP_get_curve_name",
@@ -431,9 +428,6 @@ CONDITIONAL_NAMES = {
"EC_POINT_set_affine_coordinates_GFp",
"EC_POINT_get_affine_coordinates_GFp",
"EC_POINT_set_compressed_coordinates_GFp",
- "EC_POINT_set_affine_coordinates_GF2m",
- "EC_POINT_get_affine_coordinates_GF2m",
- "EC_POINT_set_compressed_coordinates_GF2m",
"EC_POINT_point2oct",
"EC_POINT_oct2point",
"EC_POINT_point2bn",
@@ -473,5 +467,11 @@ CONDITIONAL_NAMES = {
"Cryptography_HAS_EC2M": [
"EC_GF2m_simple_method",
+ "EC_POINT_set_affine_coordinates_GF2m",
+ "EC_POINT_get_affine_coordinates_GF2m",
+ "EC_POINT_set_compressed_coordinates_GF2m",
+ "EC_GROUP_set_curve_GF2m",
+ "EC_GROUP_get_curve_GF2m",
+ "EC_GROUP_new_curve_GF2m",
],
}