agent: Fix SSH public key for EdDSA.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 31 Aug 2015 06:15:03 +0000 (15:15 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 31 Aug 2015 06:15:03 +0000 (15:15 +0900)
* agent/command-ssh.c (ssh_key_to_blob): Remove the prefix 0x40.

agent/command-ssh.c

index 3d29f97..689241f 100644 (file)
@@ -1964,6 +1964,11 @@ ssh_key_to_blob (gcry_sexp_t sexp, int with_secret,
               err = gpg_error (GPG_ERR_INV_SEXP);
               goto out;
             }
+          if (*p_elems == 'q')
+            { /* Remove the prefix 0x40.  */
+              data++;
+              datalen--;
+            }
           err = stream_write_string (stream, data, datalen);
           if (err)
             goto out;