Bugzilla – Attachment 1725 Details for
Bug 1630
ssh-keygen export of public keys (RFC4716 format) can include too-long lines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
truncate at 72 chars
keygen.diff (text/plain), 1.09 KB, created by
Damien Miller
on 2009-11-20 11:47:04 AEDT
(
hide
)
Description:
truncate at 72 chars
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2009-11-20 11:47:04 AEDT
Size:
1.09 KB
patch
obsolete
>Index: ssh-keygen.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/ssh-keygen.c,v >retrieving revision 1.175 >diff -u -p -r1.175 ssh-keygen.c >--- ssh-keygen.c 27 Aug 2009 17:33:49 -0000 1.175 >+++ ssh-keygen.c 20 Nov 2009 00:46:25 -0000 >@@ -173,6 +173,7 @@ do_convert_to_ssh2(struct passwd *pw) > Key *k; > u_int len; > u_char *blob; >+ char comment[61]; > struct stat st; > > if (!have_identity) >@@ -195,11 +196,14 @@ do_convert_to_ssh2(struct passwd *pw) > fprintf(stderr, "key_to_blob failed\n"); > exit(1); > } >- fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN); >- fprintf(stdout, >- "Comment: \"%u-bit %s, converted from OpenSSH by %s@%s\"\n", >+ /* Comment + surrounds must fit into 72 chars (RFC 4716 sec 3.3) */ >+ snprintf(comment, sizeof(comment), >+ "%u-bit %s, converted by %s@%s from OpenSSH", > key_size(k), key_type(k), > pw->pw_name, hostname); >+ >+ fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN); >+ fprintf(stdout, "Comment: \"%s\"\n", comment); > dump_base64(stdout, blob, len); > fprintf(stdout, "%s\n", SSH_COM_PUBLIC_END); > key_free(k);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 1630
:
1705
| 1725