diff options
author | Richard Levitte <levitte@openssl.org> | 2020-10-17 08:34:47 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-11 12:43:27 +0100 |
commit | c319b6276bf84da2676b4b70f40f7ce897649f72 (patch) | |
tree | ab586fa1510447371e445ece2434d9c4fe6e87db /providers/baseprov.c | |
parent | 0b9f90f5043e4cb8559448fb6270b0e7dd74e4b9 (diff) |
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)
Diffstat (limited to 'providers/baseprov.c')
-rw-r--r-- | providers/baseprov.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/providers/baseprov.c b/providers/baseprov.c index 18d664aa29..c63f1fb257 100644 --- a/providers/baseprov.c +++ b/providers/baseprov.c @@ -69,15 +69,11 @@ static int base_get_params(void *provctx, OSSL_PARAM params[]) } static const OSSL_ALGORITHM base_encoder[] = { -#define ENCODER(name, _fips, _output, func_table) \ - { name, \ - "provider=base,fips=" _fips ",output=" _output, \ - (func_table) } - +#define ENCODER_PROVIDER "base" #include "encoders.inc" { NULL, NULL, NULL } +#undef ENCODER_PROVIDER }; -#undef ENCODER static const OSSL_ALGORITHM base_decoder[] = { #define DECODER_PROVIDER "base" |