DECODER: check the first decoded structure name against user given structure
authorRichard Levitte <levitte@openssl.org>
Mon, 30 Aug 2021 11:16:42 +0000 (13:16 +0200)
committerRichard Levitte <levitte@openssl.org>
Sun, 5 Sep 2021 19:34:50 +0000 (21:34 +0200)
commit73dd5d67c506cfeb9bf6183f0c19832c7d3f174d
tree8aec41bac8ce11178328510ac84e235ae9aadffd
parentd7b5f06ede163851d39f5a8b507bd0670deeaa21
DECODER: check the first decoded structure name against user given structure

In a chain of decoders, the first that specifies an input structure
gets it compared with the structure specified by the user, if there is
one.  If they aren't the same, that decoder is skipped.

Because the first structure can appear anywhere along a chain of
decoders, not just the decoders associated with the resulting OpenSSL
type, the code that checked the structure name when building up the
chain of decoders is removed.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16466)
crypto/encode_decode/decoder_lib.c
crypto/encode_decode/decoder_pkey.c