diff options
author | Richard Levitte <levitte@openssl.org> | 2020-12-09 11:28:35 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-12-15 14:27:23 +0100 |
commit | 542b84881c33f0c9f67aa50b46557abd1ffba801 (patch) | |
tree | 2d72cd4970dc459208eae114e97e1857aef6869a /apps/rsa.c | |
parent | Check non-option arguments (diff) | |
download | openssl-542b84881c33f0c9f67aa50b46557abd1ffba801.tar.xz openssl-542b84881c33f0c9f67aa50b46557abd1ffba801.zip |
APPS: Correct the output structure for public keys in 'openssl rsa'
'openssl rsa' would output a PKCS#1 structure when asked for a
SubjectPublicKeyInfo and vice versa.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13645)
Diffstat (limited to 'apps/rsa.c')
-rw-r--r-- | apps/rsa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/rsa.c b/apps/rsa.c index 469c09b97c..bdfbcf07b8 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -310,9 +310,9 @@ int rsa_main(int argc, char **argv) if (outformat == FORMAT_ASN1 || outformat == FORMAT_PEM) { if (pubout || pubin) { if (pubout == 2) - output_structure = "SubjectPublicKeyInfo"; - else output_structure = "pkcs1"; /* "type-specific" would work too */ + else + output_structure = "SubjectPublicKeyInfo"; } else { assert(private); if (traditional) |