From: Richard Levitte Date: Wed, 17 Mar 2021 18:17:03 +0000 (+0100) Subject: STORE: Use the same error avoidance criteria as for the DER->key decoder X-Git-Tag: openssl-3.0.0-alpha14~200 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c640b687855de512138d4c4b09b71c080c0adfeb;p=thirdparty%2Fopenssl.git STORE: Use the same error avoidance criteria as for the DER->key decoder Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14314) --- diff --git a/providers/implementations/storemgmt/file_store_der2obj.c b/providers/implementations/storemgmt/file_store_der2obj.c index 74fa40df9f2..a36e9ab003e 100644 --- a/providers/implementations/storemgmt/file_store_der2obj.c +++ b/providers/implementations/storemgmt/file_store_der2obj.c @@ -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();