diff options
Diffstat (limited to 'crypto/rsa')
-rw-r--r-- | crypto/rsa/rsa_ameth.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c index 720eb523dd..1c534370e8 100644 --- a/crypto/rsa/rsa_ameth.c +++ b/crypto/rsa/rsa_ameth.c @@ -1180,10 +1180,11 @@ static int rsa_pkey_export_to(const EVP_PKEY *from, void *to_keydata, return rv; } -static int rsa_pkey_import_from(const OSSL_PARAM params[], void *key) +static int rsa_pkey_import_from(const OSSL_PARAM params[], void *vpctx) { - EVP_PKEY *pkey = key; - RSA *rsa = RSA_new(); + EVP_PKEY_CTX *pctx = vpctx; + EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(pctx); + RSA *rsa = rsa_new_with_ctx(pctx->libctx); if (rsa == NULL) { ERR_raise(ERR_LIB_DH, ERR_R_MALLOC_FAILURE); |