diff options
author | Richard Levitte <levitte@openssl.org> | 2021-03-16 14:45:07 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-04-02 08:57:47 +0200 |
commit | baf02793fc5b5095ad8929b8e2aae679e113f457 (patch) | |
tree | d3b61d638752c2f8c6cfc4a440f21f2c12299bd1 /providers/fips | |
parent | 03888233290bf3b8410e8dc2acbef8950fffef60 (diff) |
APPS: Replace the use of OBJ_nid2ln() with name or description calls
With new provided algorithms added, we'd rather rely on the names and
descriptions that we get from the providers.
Specifically with the 'openssl list' command, we now display the
description of all algorithms. For '-public-key-algorithms', we
additionally print key type information a bit more like we do for
legacy methods.
We also add descriptions to all our keymgmt functions, because the
built in EVP_PKEY_ASN1_METHODs had them.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14656)
Diffstat (limited to 'providers/fips')
-rw-r--r-- | providers/fips/fipsprov.c | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c index 56892aa4c8..f6a405d58e 100644 --- a/providers/fips/fipsprov.c +++ b/providers/fips/fipsprov.c @@ -394,30 +394,40 @@ static const OSSL_ALGORITHM fips_asym_kem[] = { static const OSSL_ALGORITHM fips_keymgmt[] = { #ifndef OPENSSL_NO_DH - { "DH:dhKeyAgreement", FIPS_DEFAULT_PROPERTIES, ossl_dh_keymgmt_functions }, + { "DH:dhKeyAgreement", FIPS_DEFAULT_PROPERTIES, ossl_dh_keymgmt_functions, + "OpenSSL PKCS#3 DH FIPS implementation" }, { "DHX:X9.42 DH:dhpublicnumber", FIPS_DEFAULT_PROPERTIES, - ossl_dhx_keymgmt_functions }, + ossl_dhx_keymgmt_functions, "OpenSSL X9.42 DH FIPS implementation" }, #endif #ifndef OPENSSL_NO_DSA - { "DSA", FIPS_DEFAULT_PROPERTIES, ossl_dsa_keymgmt_functions }, + { "DSA", FIPS_DEFAULT_PROPERTIES, ossl_dsa_keymgmt_functions, + "OpenSSL DSA FIPS implementation" }, #endif { "RSA:rsaEncryption", FIPS_DEFAULT_PROPERTIES, - ossl_rsa_keymgmt_functions }, + ossl_rsa_keymgmt_functions, "OpenSSL RSA FIPS implementation" }, { "RSA-PSS:RSASSA-PSS", FIPS_DEFAULT_PROPERTIES, - ossl_rsapss_keymgmt_functions }, + ossl_rsapss_keymgmt_functions, "OpenSSL RSA-PSS FIPS implementation" }, #ifndef OPENSSL_NO_EC - { "EC:id-ecPublicKey", FIPS_DEFAULT_PROPERTIES, ossl_ec_keymgmt_functions }, - { "X25519", FIPS_DEFAULT_PROPERTIES, ossl_x25519_keymgmt_functions }, - { "X448", FIPS_DEFAULT_PROPERTIES, ossl_x448_keymgmt_functions }, - { "ED25519", FIPS_DEFAULT_PROPERTIES, ossl_ed25519_keymgmt_functions }, - { "ED448", FIPS_DEFAULT_PROPERTIES, ossl_ed448_keymgmt_functions }, + { "EC:id-ecPublicKey", FIPS_DEFAULT_PROPERTIES, ossl_ec_keymgmt_functions, + "OpenSSL EC FIPS implementation" }, + { "X25519", FIPS_DEFAULT_PROPERTIES, ossl_x25519_keymgmt_functions, + "OpenSSL X25519 FIPS implementation" }, + { "X448", FIPS_DEFAULT_PROPERTIES, ossl_x448_keymgmt_functions, + "OpenSSL X448 FIPS implementation" }, + { "ED25519", FIPS_DEFAULT_PROPERTIES, ossl_ed25519_keymgmt_functions, + "OpenSSL ED25519 FIPS implementation" }, + { "ED448", FIPS_DEFAULT_PROPERTIES, ossl_ed448_keymgmt_functions, + "OpenSSL ED448 FIPS implementation" }, #endif - { "TLS1-PRF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_keymgmt_functions }, - { "HKDF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_keymgmt_functions }, - { "HMAC", FIPS_DEFAULT_PROPERTIES, ossl_mac_legacy_keymgmt_functions }, + { "TLS1-PRF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_keymgmt_functions, + "OpenSSL TLS1-PRF via EVP_PKEY FIPS implementation" }, + { "HKDF", FIPS_DEFAULT_PROPERTIES, ossl_kdf_keymgmt_functions, + "OpenSSL HKDF via EVP_PKEY FIPS implementation" }, + { "HMAC", FIPS_DEFAULT_PROPERTIES, ossl_mac_legacy_keymgmt_functions, + "OpenSSL HMAC via EVP_PKEY FIPS implementation" }, #ifndef OPENSSL_NO_CMAC - { "CMAC", FIPS_DEFAULT_PROPERTIES, - ossl_cossl_mac_legacy_keymgmt_functions }, + { "CMAC", FIPS_DEFAULT_PROPERTIES, ossl_cossl_mac_legacy_keymgmt_functions, + "OpenSSL CMAC via EVP_PKEY FIPS implementation" }, #endif { NULL, NULL, NULL } }; |