diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-03-25 15:13:16 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-04-01 09:37:50 +0200 |
commit | 9cf57d2cdc2e390b0ad77088d0f0957f8fc0e86b (patch) | |
tree | 092aba24e205e6895864610365fd648ba3a7a86e /apps | |
parent | 15dd39411f47ce5dc104a578530d50e9335d160d (diff) |
req, x509: Allow printing modulus of RSA-PSS keys
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17990)
(cherry picked from commit e4cdcb8bc44250aa4e0893dc4a7d64668f0fb949)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/req.c | 2 | ||||
-rw-r--r-- | apps/x509.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/req.c b/apps/req.c index 71a5ab20ca..23757044ab 100644 --- a/apps/req.c +++ b/apps/req.c @@ -992,7 +992,7 @@ int req_main(int argc, char **argv) goto end; } fprintf(stdout, "Modulus="); - if (EVP_PKEY_is_a(tpubkey, "RSA")) { + if (EVP_PKEY_is_a(tpubkey, "RSA") || EVP_PKEY_is_a(tpubkey, "RSA-PSS")) { BIGNUM *n = NULL; if (!EVP_PKEY_get_bn_param(tpubkey, "n", &n)) diff --git a/apps/x509.c b/apps/x509.c index f09f1d1b3b..2b9a0b6cb4 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -954,7 +954,7 @@ int x509_main(int argc, char **argv) purpose_print(out, x, X509_PURPOSE_get0(j)); } else if (i == modulus) { BIO_printf(out, "Modulus="); - if (EVP_PKEY_is_a(pkey, "RSA")) { + if (EVP_PKEY_is_a(pkey, "RSA") || EVP_PKEY_is_a(pkey, "RSA-PSS")) { BIGNUM *n = NULL; /* Every RSA key has an 'n' */ |