aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/_cffi_src/openssl/rsa.py9
-rw-r--r--src/cryptography/hazmat/bindings/openssl/_conditional.py3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/rsa.py b/src/_cffi_src/openssl/rsa.py
index 16769504..80aa0c22 100644
--- a/src/_cffi_src/openssl/rsa.py
+++ b/src/_cffi_src/openssl/rsa.py
@@ -31,6 +31,7 @@ static const int RSA_F4;
static const int Cryptography_HAS_PSS_PADDING;
static const int Cryptography_HAS_MGF1_MD;
+static const int Cryptography_HAS_RSA_OAEP_MD;
"""
FUNCTIONS = """
@@ -65,6 +66,8 @@ MACROS = """
int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *, int);
int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *, int);
int EVP_PKEY_CTX_set_rsa_mgf1_md(EVP_PKEY_CTX *, EVP_MD *);
+
+int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *, EVP_MD *);
"""
CUSTOMIZATIONS = """
@@ -83,4 +86,10 @@ static const long Cryptography_HAS_MGF1_MD = 1;
static const long Cryptography_HAS_MGF1_MD = 0;
int (*EVP_PKEY_CTX_set_rsa_mgf1_md)(EVP_PKEY_CTX *, EVP_MD *) = NULL;
#endif
+#if defined(EVP_PKEY_CTX_set_rsa_oaep_md)
+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
"""
diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py
index b8d7e7da..5a69af5e 100644
--- a/src/cryptography/hazmat/bindings/openssl/_conditional.py
+++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py
@@ -250,6 +250,9 @@ CONDITIONAL_NAMES = {
"Cryptography_HAS_MGF1_MD": [
"EVP_PKEY_CTX_set_rsa_mgf1_md",
],
+ "Cryptography_HAS_RSA_OAEP_MD": [
+ "EVP_PKEY_CTX_set_rsa_oaep_md",
+ ],
"Cryptography_HAS_TLSv1_1": [
"SSL_OP_NO_TLSv1_1",
"TLSv1_1_method",