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 <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13050)
This commit is contained in:
Matt Caswell 2020-10-01 17:17:58 +01:00
parent b565a17d9f
commit df38dcfcd5

View File

@ -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();