Bug 3091 - Unable to export (EC)DSA public keys in PEM format.
Summary: Unable to export (EC)DSA public keys in PEM format.
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-keygen (show other bugs)
Version: 8.1p1
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords: patch
Depends on:
Blocks: V_8_2
  Show dependency treegraph
 
Reported: 2019-11-11 22:38 AEDT by Jakub Jelen
Modified: 2021-04-23 15:10 AEST (History)
1 user (show)

See Also:


Attachments
ssh-keygen: Support publickey export of ECDSA and DSA keys in PEM format (813 bytes, patch)
2019-11-11 22:38 AEDT, Jakub Jelen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelen 2019-11-11 22:38:25 AEDT
Created attachment 3338 [details]
ssh-keygen: Support publickey export of ECDSA and DSA keys in PEM format

The ssh-keygen is missing implementation of export other public key types from RSA in pem format. The attached patch implements this missing export using OpenSSL functions.

According to the manual page of OpenSSL, PEM_write_RSAPublicKey, there is slight difference between the RSAPublicKey and RSA_PUBKEY (and the new functions used in the attached patch), but generally provide a way to export public key, which is better than not being able to do that at all.
Comment 1 Damien Miller 2020-01-24 21:58:32 AEDT
applied - thanks
Comment 2 Damien Miller 2021-04-23 15:10:24 AEST
closing resolved bugs as of 8.6p1 release