agent: Fix secret key import for Ed25519.

* agent/cvt-openpgp.c (convert_secret_key): Avoid adding 0x00 at the
beginning of MPI.

--

In master, we handle it as opaque MPI, but in 2.2, we use standard MPI
here.

GnuPG-bug-id: 5114
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-10-30 09:23:35 +09:00
parent 7ec56b0336
commit ba321b60bc
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ convert_secret_key (gcry_sexp_t *r_key, int pubkey_algo, gcry_mpi_t *skey,
if (!strcmp (curve, "Ed25519"))
/* Do not store the OID as name but the real name and the
EdDSA flag. */
format = "(private-key(ecc(curve %s)(flags eddsa)(q%m)(d%m)))";
format = "(private-key(ecc(curve %s)(flags eddsa)(q%m)(d%M)))";
else if (!strcmp (curve, "Curve25519"))
format = "(private-key(ecc(curve %s)(flags djb-tweak)(q%m)(d%m)))";
else