diff options
author | Donald Stufft <donald@stufft.io> | 2014-04-08 13:53:11 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2014-04-08 13:53:11 -0400 |
commit | b64162c9091fb91b50c19e48ddfb23d81074d4f4 (patch) | |
tree | 9212d763e9c66fe5f1427b07324023ec6c305619 | |
parent | fb201e9f21c19d2e31020012fafdeb85083d36c4 (diff) | |
parent | 0d5503a213f56350f555b2345cb4bbff11007307 (diff) | |
download | cryptography-b64162c9091fb91b50c19e48ddfb23d81074d4f4.tar.gz cryptography-b64162c9091fb91b50c19e48ddfb23d81074d4f4.tar.bz2 cryptography-b64162c9091fb91b50c19e48ddfb23d81074d4f4.zip |
Merge pull request #905 from reaperhulk/fix-900
Rearrange some EC stuff to be bound to the right ifdefs. fixes #900
-rw-r--r-- | cryptography/hazmat/bindings/openssl/ec.py | 48 |
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", ], } |