summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-05-26 10:05:01 +0200
committerRichard Levitte <levitte@openssl.org>2020-05-27 12:42:20 +0200
commitf7f53d7d61bba235b8babf4cf580114d74183e3e (patch)
treed282c6aec62e24f1d4bf6d7399d2afa2049a9623 /providers
parente978ab7894e966579fcd372d7cba9e051ba90150 (diff)
PROV: Use rsa_padding_add_PKCS1_OAEP_mgf1_with_libctx() in RSA-OAEP
Fixes #11904 Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/11959)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/asymciphers/rsa_enc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/providers/implementations/asymciphers/rsa_enc.c b/providers/implementations/asymciphers/rsa_enc.c
index 1f9ded4a65..db89de8a26 100644
--- a/providers/implementations/asymciphers/rsa_enc.c
+++ b/providers/implementations/asymciphers/rsa_enc.c
@@ -138,11 +138,13 @@ static int rsa_encrypt(void *vprsactx, unsigned char *out, size_t *outlen,
PROVerr(0, ERR_R_INTERNAL_ERROR);
return 0;
}
- ret = RSA_padding_add_PKCS1_OAEP_mgf1(tbuf, rsasize, in, inlen,
- prsactx->oaep_label,
- prsactx->oaep_labellen,
- prsactx->oaep_md,
- prsactx->mgf1_md);
+ ret =
+ rsa_padding_add_PKCS1_OAEP_mgf1_with_libctx(prsactx->libctx, tbuf,
+ rsasize, in, inlen,
+ prsactx->oaep_label,
+ prsactx->oaep_labellen,
+ prsactx->oaep_md,
+ prsactx->mgf1_md);
if (!ret) {
OPENSSL_free(tbuf);