From 32f88bf63452314acdc16bcd8b612a4a7fe056c6 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 7 Sep 2017 19:05:52 +0800 Subject: add set0_rsa_oaep_label binding (#3894) --- src/_cffi_src/openssl/rsa.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/_cffi_src/openssl') 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) -- cgit v1.2.3