openssl/crypto/encode_decode
Richard Levitte f99659535d ENCODER & DECODER: Allow decoder implementations to specify "carry on"
So far, decoder implementations would return true (1) for a successful
decode all the way, including what the callback it called returned,
and false (0) in all other cases.

This construction didn't allow to stop to decoding process on fatal
errors, nor to choose what to report in the provider code.

This is now changed so that decoders implementations are made to
return false only on errors that should stop the decoding process from
carrying on with other implementations, and return true for all other
cases, even if that didn't result in a constructed object (EVP_PKEY
for example), essentially making it OK to return "empty handed".

The success of the decoding process is now all about successfully
constructing the final object, rather than about the return value of
the decoding chain.  If no construction is attempted, the central
decoding processing code concludes that whatever the input consisted
of, it's not supported by the available decoder implementations.

Fixes #14423

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14834)
2021-04-21 10:53:03 +02:00
..
build.info CORE: Generalise internal pass phrase prompter 2020-08-24 10:02:25 +02:00
decoder_err.c ENCODER & DECODER: Allow decoder implementations to specify "carry on" 2021-04-21 10:53:03 +02:00
decoder_lib.c ENCODER & DECODER: Allow decoder implementations to specify "carry on" 2021-04-21 10:53:03 +02:00
decoder_meth.c Add OSSL_DECODER_description() and OSSL_ENCODER_description() 2021-04-02 08:57:47 +02:00
decoder_pkey.c decoder: fix Coverity 1473236 & 1473386: resource leaks 2021-03-20 10:08:00 +10:00
encoder_err.c ERR: Rebuild all generated error headers and source files 2020-11-24 15:22:33 +01:00
encoder_lib.c Update copyright year 2021-03-11 13:27:36 +00:00
encoder_local.h Update copyright year 2021-04-08 13:04:41 +01:00
encoder_meth.c Add OSSL_DECODER_description() and OSSL_ENCODER_description() 2021-04-02 08:57:47 +02:00
encoder_pkey.c Rename EVP_PKEY_get0_first_alg_name to EVP_PKEY_get0_type_name 2021-04-15 17:38:19 +02:00