]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
STORE: Use the same error avoidance criteria as for the DER->key decoder
authorRichard Levitte <levitte@openssl.org>
Wed, 17 Mar 2021 18:17:03 +0000 (19:17 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 19 Mar 2021 15:46:39 +0000 (16:46 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14314)

providers/implementations/storemgmt/file_store_der2obj.c

index 74fa40df9f2ecf5d83e6d4506441c18ac0c66df9..a36e9ab003e1a2d5c0e82d805fa9e143ab68267b 100644 (file)
@@ -101,7 +101,9 @@ static int der2obj_decode(void *provctx, OSSL_CORE_BIO *cin, int selection,
     err = ERR_peek_last_error();
     if (ERR_GET_LIB(err) == ERR_LIB_ASN1
             && (ERR_GET_REASON(err) == ASN1_R_HEADER_TOO_LONG
-                || ERR_GET_REASON(err) == ERR_R_NESTED_ASN1_ERROR))
+                || ERR_GET_REASON(err) == ASN1_R_UNSUPPORTED_TYPE
+                || ERR_GET_REASON(err) == ERR_R_NESTED_ASN1_ERROR
+                || ERR_GET_REASON(err) == ASN1_R_NOT_ENOUGH_DATA))
         ERR_pop_to_mark();
     else
         ERR_clear_last_mark();