mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
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)
This commit is contained in:
parent
927d0566de
commit
e4cdcb8bc4
@ -986,7 +986,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))
|
||||
|
@ -966,7 +966,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' */
|
||||
|
Loading…
Reference in New Issue
Block a user