ENCODER: Add output structure support for EVP_PKEY encoding
authorRichard Levitte <levitte@openssl.org>
Sat, 17 Oct 2020 06:23:43 +0000 (08:23 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 11 Nov 2020 11:43:27 +0000 (12:43 +0100)
commitb9a2afdfe68a5212dc2352a574a6ca98d8cf5140
tree1f399dba2607d07779eeb57419d9bc2484d3a135
parentcd861ab73d57ea21dd7342b13f4a733da229e15e
ENCODER: Add output structure support for EVP_PKEY encoding

OSSL_ENCODER_CTX_new_by_EVP_PKEY() takes one more argument to express
the desired outermost structure for the output.

This also adds OSSL_ENCODER_CTX_prune_encoders(), which is used to
reduce the stack of encoders found according to criteria formed from
the combination of desired selection, output type and output
structure.

squash! ENCODER: Add output structure support for EVP_PKEY encoding

Replace the paragraph talking about OSSL_ENCODER_CTX_prune_encoders() with:

The encoding processor encoder_process() is enhanced with better
analysis of the stack of encoder implementations.  To avoid having to
keep an on the side array of information, it uses recursion.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13167)
crypto/encode_decode/encoder_lib.c
crypto/encode_decode/encoder_pkey.c
doc/man3/OSSL_ENCODER_CTX_new_by_EVP_PKEY.pod
include/openssl/encoder.h