From bade58f1566683cb5b110b341e01e3d3397b972f Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 5 Jan 2018 09:58:35 -0600 Subject: just a quick confirmation that it really is an x25519 evp key (#4070) * just a quick confirmation that it really is an x25519 evp key * openssl assert. take that python -O --- src/_cffi_src/openssl/evp.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/_cffi_src/openssl/evp.py') diff --git a/src/_cffi_src/openssl/evp.py b/src/_cffi_src/openssl/evp.py index 3fcac0c2..715bfe19 100644 --- a/src/_cffi_src/openssl/evp.py +++ b/src/_cffi_src/openssl/evp.py @@ -21,6 +21,7 @@ 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_PKEY_X25519; static const int EVP_MAX_MD_SIZE; static const int EVP_CTRL_AEAD_SET_IVLEN; static const int EVP_CTRL_AEAD_GET_TAG; @@ -241,4 +242,12 @@ int (*EVP_PKEY_set1_tls_encodedpoint)(EVP_PKEY *, const unsigned char *, #if !defined(EVP_CTRL_AEAD_SET_TAG) # define EVP_CTRL_AEAD_SET_TAG EVP_CTRL_GCM_SET_TAG #endif + +/* This is tied to X25519 support so we reuse the Cryptography_HAS_X25519 + conditional to remove it. OpenSSL 1.1.0 didn't have this define, but + 1.1.1 will when it is released. We can remove this in the distant + future when we drop 1.1.0 support. */ +#ifndef EVP_PKEY_X25519 +#define EVP_PKEY_X25519 NID_X25519 +#endif """ -- cgit v1.2.3