diff options
author | Aviv Palivoda <palaviv@gmail.com> | 2017-02-13 02:59:16 +0200 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-02-13 08:59:16 +0800 |
commit | 84cdca7aecd84878c4650214c3222f7c805d8763 (patch) | |
tree | 9bde93b77b312fcd9f527d0595eb254e56f8bfb3 /src | |
parent | f99e3f5c383c08858fa6be84ff104ef23345c86e (diff) | |
download | cryptography-84cdca7aecd84878c4650214c3222f7c805d8763.tar.gz cryptography-84cdca7aecd84878c4650214c3222f7c805d8763.tar.bz2 cryptography-84cdca7aecd84878c4650214c3222f7c805d8763.zip |
Add EVP_PKEY_DHX (#3388)
* Add EVP_PKEY_DHX
* Add Cryptography_HAS_EVP_PKEY_DHX to _conditional.py
Diffstat (limited to 'src')
-rw-r--r-- | src/_cffi_src/openssl/evp.py | 9 | ||||
-rw-r--r-- | src/cryptography/hazmat/bindings/openssl/_conditional.py | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/evp.py b/src/_cffi_src/openssl/evp.py index a5032d1f..6582882e 100644 --- a/src/_cffi_src/openssl/evp.py +++ b/src/_cffi_src/openssl/evp.py @@ -19,6 +19,7 @@ typedef ... EVP_PKEY_CTX; static const int EVP_PKEY_RSA; static const int EVP_PKEY_DSA; static const int EVP_PKEY_DH; +static const int EVP_PKEY_DHX; static const int EVP_PKEY_EC; static const int EVP_MAX_MD_SIZE; static const int EVP_CTRL_GCM_SET_IVLEN; @@ -29,6 +30,7 @@ static const int Cryptography_HAS_GCM; static const int Cryptography_HAS_PBKDF2_HMAC; static const int Cryptography_HAS_PKEY_CTX; static const int Cryptography_HAS_SCRYPT; +static const int Cryptography_HAS_EVP_PKEY_DHX; """ FUNCTIONS = """ @@ -183,6 +185,13 @@ const long EVP_CTRL_GCM_SET_IVLEN = -1; const long Cryptography_HAS_PBKDF2_HMAC = 1; const long Cryptography_HAS_PKEY_CTX = 1; +#ifdef EVP_PKEY_DHX +const long Cryptography_HAS_EVP_PKEY_DHX = 1; +#else +const long Cryptography_HAS_EVP_PKEY_DHX = 0; +const long EVP_PKEY_DHX = -1; +#endif + #ifdef OPENSSL_NO_EC int (*EVP_PKEY_assign_EC_KEY)(EVP_PKEY *, EC_KEY *) = NULL; EC_KEY *(*EVP_PKEY_get1_EC_KEY)(EVP_PKEY *) = NULL; diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py index 291cea8c..5d377d18 100644 --- a/src/cryptography/hazmat/bindings/openssl/_conditional.py +++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py @@ -307,4 +307,7 @@ CONDITIONAL_NAMES = { "Cryptography_DTLSv1_get_timeout", "DTLSv1_handle_timeout", ], + "Cryptography_HAS_EVP_PKEY_DHX": [ + "EVP_PKEY_DHX", + ], } |