DECODER: Use the data structure from the last decoder to select the next
authorRichard Levitte <levitte@openssl.org>
Thu, 18 Feb 2021 12:18:53 +0000 (13:18 +0100)
committerRichard Levitte <levitte@openssl.org>
Sat, 20 Feb 2021 20:15:12 +0000 (21:15 +0100)
commitacf497b53b0a349af13ca5e89665f331e1096af8
tree4d0a4b688a10a8411cd4072ca28c0355f47ed80b
parentf16e52b67c9261bdc7e1284a50502a802921ac6d
DECODER: Use the data structure from the last decoder to select the next

Any decoder can now also declare the name of the data structure for
the object it decoded in the OSSL_PARAM array they pass back to the
decoding process.  The decoding process will use that as another
criterion to select the next decoder in the chain to consider.

Together with declaring the data type, this becomes a means to refine
how the decoded data is treated along the chain.

Fixes #13539

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14233)
crypto/encode_decode/decoder_lib.c