From df38dcfcd5c3e264e449589ef0b9fce8ce6e428c Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 1 Oct 2020 17:17:58 +0100 Subject: [PATCH] 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) --- crypto/encode_decode/decoder_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/encode_decode/decoder_lib.c b/crypto/encode_decode/decoder_lib.c index ab7c537038..e44ca8cbd4 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();