Bug 3091

Summary: Unable to export (EC)DSA public keys in PEM format.
Product: Portable OpenSSH Reporter: Jakub Jelen <jjelen>
Component: ssh-keygenAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: enhancement CC: djm
Priority: P5 Keywords: patch
Version: 8.1p1   
Hardware: Other   
OS: Linux   
Bug Depends on:    
Bug Blocks: 3079    
Attachments:
Description Flags
ssh-keygen: Support publickey export of ECDSA and DSA keys in PEM format none

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