From ba321b60bc3bfc29dfc6fa325dcabad4fac29f9c Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 30 Oct 2020 09:23:35 +0900 Subject: 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 --- agent/cvt-openpgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/cvt-openpgp.c b/agent/cvt-openpgp.c index 758eab9ab..ff153c358 100644 --- a/agent/cvt-openpgp.c +++ b/agent/cvt-openpgp.c @@ -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 -- cgit v1.2.3