From 6d9e045ef724df0ddc8c8f66dcfdff4f8ba0bc03 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Thu, 25 Mar 2021 16:20:48 +0100 Subject: d2i_PrivateKey_decoder(): Fix premature exit on unsuccessful OSSL_DECODER_CTX_new_for_pkey() Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14647) --- crypto/asn1/d2i_pr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/asn1') diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c index 9d9c189..94bd341 100644 --- a/crypto/asn1/d2i_pr.c +++ b/crypto/asn1/d2i_pr.c @@ -52,7 +52,7 @@ d2i_PrivateKey_decoder(int keytype, EVP_PKEY **a, const unsigned char **pp, if (a != NULL) *a = bak_a; if (dctx == NULL) - return NULL; + continue; ret = OSSL_DECODER_from_data(dctx, pp, &len); OSSL_DECODER_CTX_free(dctx); -- cgit v1.1