PROV: Re-implement all the keypair decoders
authorRichard Levitte <levitte@openssl.org>
Mon, 26 Oct 2020 12:22:54 +0000 (13:22 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 11 Nov 2020 10:42:06 +0000 (11:42 +0100)
commit2c090c1d1b00fe49dd2911674e26c629f123c44f
tree6966886dfcde93a1ea601c5a13af79c7f3aa6041
parentde5008a4076e36f7038180d60ae1521afb524d68
PROV: Re-implement all the keypair decoders

The base functionality to implement the keypair decoders 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 expected as input, the input type ("DER", "PEM", ...) and the
outermost input 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: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13248)
providers/baseprov.c
providers/decoders.inc
providers/defltprov.c
providers/implementations/encode_decode/decode_der2key.c
providers/implementations/encode_decode/decode_ms2key.c
providers/implementations/encode_decode/decode_pem2der.c
providers/implementations/include/prov/implementations.h
providers/implementations/storemgmt/file_store_der2obj.c