diff options
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pem_pkey.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 01877057dc..ca6b2a2132 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -23,6 +23,7 @@ #include <openssl/decoder.h> #include <openssl/ui.h> #include "crypto/asn1.h" +#include "crypto/x509.h" #include "crypto/evp.h" #include "pem_local.h" @@ -157,9 +158,10 @@ static EVP_PKEY *pem_read_bio_key_legacy(BIO *bp, EVP_PKEY **x, ameth = EVP_PKEY_asn1_find_str(NULL, nm, slen); if (ameth == NULL || ameth->old_priv_decode == NULL) goto p8err; - ret = d2i_PrivateKey(ameth->pkey_id, x, &p, len); + ret = ossl_d2i_PrivateKey_legacy(ameth->pkey_id, x, &p, len, libctx, + propq); } else if (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) { - ret = d2i_PUBKEY(x, &p, len); + ret = ossl_d2i_PUBKEY_legacy(x, &p, len); } else if ((slen = ossl_pem_check_suffix(nm, "PARAMETERS")) > 0) { ret = EVP_PKEY_new(); if (ret == NULL) |