mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
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)
This commit is contained in:
parent
021410ea3f
commit
542b84881c
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user