aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2017-09-07 19:05:52 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2017-09-07 07:05:52 -0400
commit32f88bf63452314acdc16bcd8b612a4a7fe056c6 (patch)
tree911548c851e56720f185391d80cb0325c5232633 /src/_cffi_src
parentec0e1cc2918e2eae9c67d2ebc383d7e5a23683e1 (diff)
downloadcryptography-32f88bf63452314acdc16bcd8b612a4a7fe056c6.tar.gz
cryptography-32f88bf63452314acdc16bcd8b612a4a7fe056c6.tar.bz2
cryptography-32f88bf63452314acdc16bcd8b612a4a7fe056c6.zip
add set0_rsa_oaep_label binding (#3894)
Diffstat (limited to 'src/_cffi_src')
-rw-r--r--src/_cffi_src/openssl/rsa.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/rsa.py b/src/_cffi_src/openssl/rsa.py
index eddde84c..459d5cb9 100644
--- a/src/_cffi_src/openssl/rsa.py
+++ b/src/_cffi_src/openssl/rsa.py
@@ -21,6 +21,7 @@ static const int RSA_F4;
static const int Cryptography_HAS_PSS_PADDING;
static const int Cryptography_HAS_RSA_OAEP_MD;
+static const int Cryptography_HAS_RSA_OAEP_LABEL;
"""
FUNCTIONS = """
@@ -62,6 +63,7 @@ void RSA_get0_crt_params(const RSA *, const BIGNUM **, const BIGNUM **,
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_set0_rsa_oaep_label(EVP_PKEY_CTX *, unsigned char *, int);
int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *, EVP_MD *);
"""
@@ -76,6 +78,14 @@ 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_LABEL = 0;
+int (*EVP_PKEY_CTX_set0_rsa_oaep_label)(EVP_PKEY_CTX *, unsigned char *,
+ int) = NULL;
+#endif
+
/* These functions were added in OpenSSL 1.1.0-pre5 (beta2) */
#if CRYPTOGRAPHY_OPENSSL_LESS_THAN_110PRE5
int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)