PROV: Re-implement all the keypair encoders
authorRichard Levitte <levitte@openssl.org>
Sat, 17 Oct 2020 06:34:47 +0000 (08:34 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 11 Nov 2020 11:43:27 +0000 (12:43 +0100)
commitc319b6276bf84da2676b4b70f40f7ce897649f72
treeab586fa1510447371e445ece2434d9c4fe6e87db
parent0b9f90f5043e4cb8559448fb6270b0e7dd74e4b9
PROV: Re-implement all the keypair encoders

The base functionality to implement the keypair encoders doesn't
change much, but this results in a more massive amount of
OSSL_DISPATCH and OSSL_ALGORITHM arrays, to support a fine grained
selection of implementation based on what parts of the keypair
structure (combinations of key parameters, public key and private key)
should be output, the output type ("TEXT", "DER" or "PEM") and the
outermost output structure ("pkcs8", "SubjectPublicKeyInfo", key
type specific structures, ...).

We add support for the generic structure name "type-specific", to
allow selecting that without knowing the exact name of that structure.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13167)
providers/baseprov.c
providers/defltprov.c
providers/encoders.inc
providers/implementations/encode_decode/encode_key2any.c
providers/implementations/include/prov/implementations.h