diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/_cffi_src/openssl/rsa.py | 10 | ||||
-rw-r--r-- | src/cryptography/hazmat/bindings/openssl/_conditional.py | 7 |
2 files changed, 17 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) diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py index 7f61ed42..8eb67760 100644 --- a/src/cryptography/hazmat/bindings/openssl/_conditional.py +++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py @@ -75,6 +75,12 @@ def cryptography_has_rsa_oaep_md(): ] +def cryptography_has_rsa_oaep_label(): + return [ + "EVP_PKEY_CTX_set0_rsa_oaep_label", + ] + + def cryptography_has_ssl3_method(): return [ "SSLv3_method", @@ -251,6 +257,7 @@ CONDITIONAL_NAMES = { cryptography_has_rsa_r_pkcs_decoding_error ), "Cryptography_HAS_RSA_OAEP_MD": cryptography_has_rsa_oaep_md, + "Cryptography_HAS_RSA_OAEP_LABEL": cryptography_has_rsa_oaep_label, "Cryptography_HAS_SSL3_METHOD": cryptography_has_ssl3_method, "Cryptography_HAS_ALPN": cryptography_has_alpn, "Cryptography_HAS_COMPRESSION": cryptography_has_compression, |