Bug 1630

Summary: ssh-keygen export of public keys (RFC4716 format) can include too-long lines
Product: Portable OpenSSH Reporter: TJ Saunders <tj>
Component: ssh-keygenAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: minor CC: djm, dtucker
Priority: P4    
Version: 5.1p1   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 1626    
Attachments:
Description Flags
ssh-keygen: wrap long comment lines
none
truncate at 72 chars dtucker: ok+

Description TJ Saunders 2009-08-06 15:25:00 AEST
When ssh-keygen -e is used to export a public key into an RFC4716 formatted file, it is possible for the Comment header line to be longer than the maximum line length required by RFC4716.  For example, I have seen Comment header lines which exceed the 72-byte line length maximum (excluding line terminators).

To handle such long Comment (or other header) values, ssh-keygen should split the header value over multiple lines using the '\' line continuation character specified in RFC4716.
Comment 1 Darren Tucker 2009-10-24 16:44:08 AEDT
Created attachment 1705 [details]
ssh-keygen: wrap long comment lines

Thanks for the report, we'll target this at 5.4.
Comment 2 Damien Miller 2009-11-20 11:47:04 AEDT
Created attachment 1725 [details]
truncate at 72 chars

As per Markus' suggestion, just truncate at 72 chars
Comment 3 Damien Miller 2010-01-11 21:51:26 AEDT
patch applied - this will be in OpenSSH 5.4
Comment 4 Darren Tucker 2010-03-26 10:51:41 AEDT
With the release of 5.4p1, this bug is now considered closed.