diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-01-28 17:41:15 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-01-28 17:41:15 -0600 |
commit | 780366a3395d64aba6f09642b3ea2b6195307230 (patch) | |
tree | f60dd0f9e369e8b71305161279fc44774c6fc55d | |
parent | 3d8c66f9a01b8982902f69ae960fcc85aa43bfb8 (diff) | |
parent | 1ff8735d04f6fe5afe5bf7b516e365fbc5617918 (diff) | |
download | cryptography-780366a3395d64aba6f09642b3ea2b6195307230.tar.gz cryptography-780366a3395d64aba6f09642b3ea2b6195307230.tar.bz2 cryptography-780366a3395d64aba6f09642b3ea2b6195307230.zip |
Merge branch 'master' into pbkdf2-openssl
* master:
Fuck, fix
C is not a good programming language
This needs to be first
Doh, reorder
This type is not defined either of course
Whoops, backwards
Fixed #521 -- work on systems with no ec header at all
-rw-r--r-- | cryptography/hazmat/bindings/openssl/ec.py | 8 | ||||
-rw-r--r-- | cryptography/hazmat/bindings/openssl/ssl.py | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/cryptography/hazmat/bindings/openssl/ec.py b/cryptography/hazmat/bindings/openssl/ec.py index 9f10365a..39403ff2 100644 --- a/cryptography/hazmat/bindings/openssl/ec.py +++ b/cryptography/hazmat/bindings/openssl/ec.py @@ -12,7 +12,10 @@ # limitations under the License. INCLUDES = """ +#ifndef OPENSSL_NO_EC #include <openssl/ec.h> +#endif + #include <openssl/obj_mac.h> """ @@ -31,16 +34,17 @@ static const int NID_X9_62_prime256v1; """ FUNCTIONS = """ -EC_KEY *EC_KEY_new_by_curve_name(int); -void EC_KEY_free(EC_KEY *); """ MACROS = """ +EC_KEY *EC_KEY_new_by_curve_name(int); +void EC_KEY_free(EC_KEY *); """ CUSTOMIZATIONS = """ #ifdef OPENSSL_NO_EC static const long Cryptography_HAS_EC = 0; +typedef void EC_KEY; EC_KEY* (*EC_KEY_new_by_curve_name)(int) = NULL; void (*EC_KEY_free)(EC_KEY *) = NULL; #else diff --git a/cryptography/hazmat/bindings/openssl/ssl.py b/cryptography/hazmat/bindings/openssl/ssl.py index cd872d18..2b4e54f1 100644 --- a/cryptography/hazmat/bindings/openssl/ssl.py +++ b/cryptography/hazmat/bindings/openssl/ssl.py @@ -393,6 +393,6 @@ CONDITIONAL_NAMES = { ], "Cryptography_HAS_EC": [ - "EC_KEY_new_by_curve_name", + "SSL_CTX_set_tmp_ecdh", ] } |