diff options
author | Matt Caswell <matt@openssl.org> | 2021-05-28 11:07:24 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-06-08 18:53:39 +0100 |
commit | b2f1b36592806afcaae79289c33756fb0af5b4ca (patch) | |
tree | 35073737fd3e45fe90a2bc3c6399d7ca61e429c7 /include/crypto | |
parent | 237cb05d342338ac42852cfdec21b900458a537c (diff) |
Actually use a legacy route in pem_read_bio_key_legacy()
The function pem_read_bio_key_legacy() is a fallback route if we
failed to load a key via a provider. We should be using the legacy
specific d2i functions to force legacy otherwise we end up using a
provider anyway
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15504)
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/asn1.h | 4 | ||||
-rw-r--r-- | include/crypto/x509.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/asn1.h b/include/crypto/asn1.h index 829c5980d2..dd0b54aad6 100644 --- a/include/crypto/asn1.h +++ b/include/crypto/asn1.h @@ -142,4 +142,8 @@ X509_ALGOR *ossl_x509_algor_mgf1_decode(X509_ALGOR *alg); int ossl_x509_algor_md_to_mgf1(X509_ALGOR **palg, const EVP_MD *mgf1md); int ossl_asn1_time_print_ex(BIO *bp, const ASN1_TIME *tm); +EVP_PKEY * ossl_d2i_PrivateKey_legacy(int keytype, EVP_PKEY **a, + const unsigned char **pp, long length, + OSSL_LIB_CTX *libctx, const char *propq); + #endif /* ndef OSSL_CRYPTO_ASN1_H */ diff --git a/include/crypto/x509.h b/include/crypto/x509.h index 936ab790de..acb1d7b64a 100644 --- a/include/crypto/x509.h +++ b/include/crypto/x509.h @@ -354,4 +354,6 @@ ECX_KEY *ossl_d2i_X448_PUBKEY(ECX_KEY **a, const unsigned char **pp, long length); int ossl_i2d_X448_PUBKEY(const ECX_KEY *a, unsigned char **pp); # endif +EVP_PKEY *ossl_d2i_PUBKEY_legacy(EVP_PKEY **a, const unsigned char **pp, + long length); #endif |