summaryrefslogtreecommitdiffstats
path: root/crypto/encode_decode
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-10-01 17:17:58 +0100
committerMatt Caswell <matt@openssl.org>2020-10-08 12:31:00 +0100
commitdf38dcfcd5c3e264e449589ef0b9fce8ce6e428c (patch)
treee1d3a47921d7ff3fed3bdb17840581b8e8d16856 /crypto/encode_decode
parentb565a17d9fc69711813a19723a3f656ae5cd2fc9 (diff)
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)
Diffstat (limited to 'crypto/encode_decode')
-rw-r--r--crypto/encode_decode/decoder_lib.c2
1 files changed, 1 insertions, 1 deletions
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();