summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2020-11-26 11:52:47 -0600
committerGitHub <noreply@github.com>2020-11-26 12:52:47 -0500
commitd890e2a60616af098d6ec1d4e4a53cc82a335731 (patch)
tree71748d2d42f4f0b2f579fa78472ecebf5cfa7557 /src
parent417f684f6109357a97eee013de7d10fade25bdf7 (diff)
downloadcryptography-d890e2a60616af098d6ec1d4e4a53cc82a335731.tar.gz
define OAEP properties for all openssl versions (#5589)
In 3.0 these aren't macros so we can't test this way. All our supported OpenSSLs have these bindings now and LibreSSL does not.
Diffstat (limited to 'src')
-rw-r--r--src/_cffi_src/openssl/rsa.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/_cffi_src/openssl/rsa.py b/src/_cffi_src/openssl/rsa.py
index 9298226bb..92b8fa460 100644
--- a/src/_cffi_src/openssl/rsa.py
+++ b/src/_cffi_src/openssl/rsa.py
@@ -48,17 +48,13 @@ int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *, EVP_MD *);
"""
CUSTOMIZATIONS = """
-#if defined(EVP_PKEY_CTX_set_rsa_oaep_md)
+#if !CRYPTOGRAPHY_IS_LIBRESSL
static const long Cryptography_HAS_RSA_OAEP_MD = 1;
-#else
-static const long Cryptography_HAS_RSA_OAEP_MD = 0;
-int (*EVP_PKEY_CTX_set_rsa_oaep_md)(EVP_PKEY_CTX *, EVP_MD *) = NULL;
-#endif
-
-#if defined(EVP_PKEY_CTX_set0_rsa_oaep_label)
static const long Cryptography_HAS_RSA_OAEP_LABEL = 1;
#else
+static const long Cryptography_HAS_RSA_OAEP_MD = 0;
static const long Cryptography_HAS_RSA_OAEP_LABEL = 0;
+int (*EVP_PKEY_CTX_set_rsa_oaep_md)(EVP_PKEY_CTX *, EVP_MD *) = NULL;
int (*EVP_PKEY_CTX_set0_rsa_oaep_label)(EVP_PKEY_CTX *, unsigned char *,
int) = NULL;
#endif