From: Matt Caswell Date: Thu, 1 Oct 2020 16:17:58 +0000 (+0100) Subject: Fix the decoder start type handling X-Git-Tag: openssl-3.0.0-alpha7~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df38dcfcd5c3e264e449589ef0b9fce8ce6e428c;p=thirdparty%2Fopenssl.git Fix the decoder start type handling If an explicit decoder start type was provided then it wasn't being handled correctly in all cases. Specifically if a PEM start type was provided then the decoder would fail. Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/13050) --- diff --git a/crypto/encode_decode/decoder_lib.c b/crypto/encode_decode/decoder_lib.c index ab7c5370382..e44ca8cbd4e 100644 --- a/crypto/encode_decode/decoder_lib.c +++ b/crypto/encode_decode/decoder_lib.c @@ -259,7 +259,7 @@ int OSSL_DECODER_CTX_add_extra(OSSL_DECODER_CTX *ctx, * on top of this one, so we don't. */ if (ctx->start_input_type != NULL - && strcasecmp(ctx->start_input_type, input_type) != 0) + && strcasecmp(ctx->start_input_type, input_type) == 0) continue; ERR_set_mark();