diff options
author | Richard Levitte <levitte@openssl.org> | 2019-11-18 01:56:22 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-11-29 20:55:16 +0100 |
commit | 677add38003b37cab06ebc59260c8d28745bb948 (patch) | |
tree | 18924eb82a179b335bafea3afae640bbf37709aa /providers/defltprov.c | |
parent | cb58d81e68c72ab0128e0a5fc6faa007f8632acd (diff) |
PROV SERIALIZER: add support for writing RSA keys
This also adds the missing accessor RSA_get0_pss_params(), so those
parameters can be included in the PKCS#8 data structure without
needing to know the inside of the RSA structure.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10394)
Diffstat (limited to 'providers/defltprov.c')
-rw-r--r-- | providers/defltprov.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/providers/defltprov.c b/providers/defltprov.c index 51d3d52ee9..84e580366d 100644 --- a/providers/defltprov.c +++ b/providers/defltprov.c @@ -385,6 +385,23 @@ static const OSSL_ALGORITHM deflt_keymgmt[] = { { NULL, NULL, NULL } }; +static const OSSL_ALGORITHM deflt_serializer[] = { + { "RSA", "default=yes,format=text,type=private", + rsa_priv_text_serializer_functions }, + { "RSA", "default=yes,format=text,type=public", + rsa_pub_text_serializer_functions }, + { "RSA", "default=yes,format=der,type=private", + rsa_priv_der_serializer_functions }, + { "RSA", "default=yes,format=der,type=public", + rsa_pub_der_serializer_functions }, + { "RSA", "default=yes,format=pem,type=private", + rsa_priv_pem_serializer_functions }, + { "RSA", "default=yes,format=pem,type=public", + rsa_pub_pem_serializer_functions }, + + { NULL, NULL, NULL } +}; + static const OSSL_ALGORITHM *deflt_query(OSSL_PROVIDER *prov, int operation_id, int *no_cache) @@ -407,6 +424,8 @@ static const OSSL_ALGORITHM *deflt_query(OSSL_PROVIDER *prov, return deflt_signature; case OSSL_OP_ASYM_CIPHER: return deflt_asym_cipher; + case OSSL_OP_SERIALIZER: + return deflt_serializer; } return NULL; } |