aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-03-25 13:22:53 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2016-03-25 13:22:53 -0400
commit5b930bbd1283cab2f0127e792c9c6387fdbf5380 (patch)
tree5a46b835d00064389aae53e8b7c354811aa082e6
parentbdb31d40adc55cd1abbbe21c31e3f33717808f3d (diff)
parente22178914a1f354bb9fa2b46b6f132c26ab806db (diff)
downloadcryptography-5b930bbd1283cab2f0127e792c9c6387fdbf5380.tar.gz
cryptography-5b930bbd1283cab2f0127e792c9c6387fdbf5380.tar.bz2
cryptography-5b930bbd1283cab2f0127e792c9c6387fdbf5380.zip
Merge pull request #2852 from reaperhulk/oaep-bindings
add EVP_PKEY_CTX_set_rsa_oaep_md
-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",