summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_pkey.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-11-27 08:03:23 +0100
committerRichard Levitte <levitte@openssl.org>2020-12-02 13:37:20 +0100
commitb03da688a223c18b5a10b5a66abe229bbb590133 (patch)
tree9ced964fd56b31be881234f012af7d191f41c5ef /crypto/evp/evp_pkey.c
parentcbcbac644c4679e535948e49983d335ae46c578e (diff)
Adapt everything else to the updated OSSL_ENCODER_CTX_new_by_EVP_PKEY()
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13545)
Diffstat (limited to 'crypto/evp/evp_pkey.c')
-rw-r--r--crypto/evp/evp_pkey.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c
index b049420d0b..dd20a52e7a 100644
--- a/crypto/evp/evp_pkey.c
+++ b/crypto/evp/evp_pkey.c
@@ -81,15 +81,13 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(const EVP_PKEY *pkey)
*/
if (evp_pkey_is_provided(pkey)) {
int selection = OSSL_KEYMGMT_SELECT_ALL;
- const OSSL_PROVIDER *prov = EVP_KEYMGMT_provider(pkey->keymgmt);
- OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
unsigned char *der = NULL;
size_t derlen = 0;
const unsigned char *pp;
if ((ctx = OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey, selection,
"DER", "pkcs8",
- libctx, NULL)) == NULL
+ NULL)) == NULL
|| !OSSL_ENCODER_to_data(ctx, &der, &derlen))
goto error;