Add EVP_PKEY_DHX (#3388)

* Add EVP_PKEY_DHX

* Add Cryptography_HAS_EVP_PKEY_DHX to _conditional.py
This commit is contained in:
Aviv Palivoda 2017-02-13 02:59:16 +02:00 committed by Paul Kehrer
parent f99e3f5c38
commit 84cdca7aec
2 changed files with 12 additions and 0 deletions

View file

@ -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;

View file

@ -307,4 +307,7 @@ CONDITIONAL_NAMES = {
"Cryptography_DTLSv1_get_timeout",
"DTLSv1_handle_timeout",
],
"Cryptography_HAS_EVP_PKEY_DHX": [
"EVP_PKEY_DHX",
],
}