Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 412672 Details for
Bug 561292
app-crypt/gnupg-2.1.8 gpg-agent improperly handles ed25519 ssh keys
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix registering SSH Key of Ed25519.
0001-agent-Fix-registering-SSH-Key-of-Ed25519.patch (text/plain), 1.88 KB, created by
Łukasz Stelmach
on 2015-09-23 18:52:39 UTC
(
hide
)
Description:
Fix registering SSH Key of Ed25519.
Filename:
MIME Type:
Creator:
Łukasz Stelmach
Created:
2015-09-23 18:52:39 UTC
Size:
1.88 KB
patch
obsolete
>From 7d5999f0964c9412c0e18eb1adefdb729be68cd4 Mon Sep 17 00:00:00 2001 >From: NIIBE Yutaka <gniibe@fsij.org> >Date: Wed, 16 Sep 2015 10:37:38 +0900 >Subject: [PATCH] agent: Fix registering SSH Key of Ed25519. > >* agent/command-ssh.c (stream_read_string): Add the prefix of 0x40. > >-- > >GnuPG-bug-id: 2096 >--- > agent/command-ssh.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > >diff --git a/agent/command-ssh.c b/agent/command-ssh.c >index 8868620..8be1255 100644 >--- a/agent/command-ssh.c >+++ b/agent/command-ssh.c >@@ -580,8 +580,9 @@ stream_read_string (estream_t stream, unsigned int secure, > > > /* Read a binary string from STREAM and store it as an opaque MPI at >- R_MPI. Depending on SECURE use secure memory. If the string is >- too large for key material return an error. */ >+ R_MPI, adding 0x40 (this is the prefix for EdDSA key in OpenPGP). >+ Depending on SECURE use secure memory. If the string is too large >+ for key material return an error. */ > static gpg_error_t > stream_read_blob (estream_t stream, unsigned int secure, gcry_mpi_t *r_mpi) > { >@@ -607,9 +608,9 @@ stream_read_blob (estream_t stream, unsigned int secure, gcry_mpi_t *r_mpi) > > /* Allocate space. */ > if (secure) >- buffer = xtrymalloc_secure (length? length:1); >+ buffer = xtrymalloc_secure (length+1); > else >- buffer = xtrymalloc (length?length:1); >+ buffer = xtrymalloc (length+1); > if (!buffer) > { > err = gpg_error_from_syserror (); >@@ -617,11 +618,12 @@ stream_read_blob (estream_t stream, unsigned int secure, gcry_mpi_t *r_mpi) > } > > /* Read data. */ >- err = stream_read_data (stream, buffer, length); >+ err = stream_read_data (stream, buffer + 1, length); > if (err) > goto leave; > >- *r_mpi = gcry_mpi_set_opaque (NULL, buffer, 8*length); >+ buffer[0] = 0x40; >+ *r_mpi = gcry_mpi_set_opaque (NULL, buffer, 8*(length+1)); > buffer = NULL; > > leave: >-- >2.4.6 >
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
Actions:
View
|
Diff
Attachments on
bug 561292
: 412672