diff options
author | Richard Levitte <levitte@openssl.org> | 2020-10-26 13:22:54 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-11 11:42:06 +0100 |
commit | 2c090c1d1b00fe49dd2911674e26c629f123c44f (patch) | |
tree | 6966886dfcde93a1ea601c5a13af79c7f3aa6041 /providers/implementations/encode_decode/decode_pem2der.c | |
parent | de5008a4076e36f7038180d60ae1521afb524d68 (diff) |
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)
Diffstat (limited to 'providers/implementations/encode_decode/decode_pem2der.c')
-rw-r--r-- | providers/implementations/encode_decode/decode_pem2der.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/providers/implementations/encode_decode/decode_pem2der.c b/providers/implementations/encode_decode/decode_pem2der.c index 9ddc0ae3bb..6c8b108290 100644 --- a/providers/implementations/encode_decode/decode_pem2der.c +++ b/providers/implementations/encode_decode/decode_pem2der.c @@ -106,7 +106,11 @@ static int pem2der_pass_helper(char *buf, int num, int w, void *data) return (int)plen; } -static int pem2der_decode(void *vctx, OSSL_CORE_BIO *cin, +/* + * The selection parameter in pem2der_decode() is not used by this function + * because it's not relevant just to decode PEM to DER. + */ +static int pem2der_decode(void *vctx, OSSL_CORE_BIO *cin, int selection, OSSL_CALLBACK *data_cb, void *data_cbarg, OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg) { |