gpgsm: Fix the previous commit.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-03-27 19:41:03 +09:00
parent 49ea53b755
commit e06a8e3e87
1 changed files with 5 additions and 5 deletions

View File

@ -731,20 +731,20 @@ proc_parameters (ctrl_t ctrl, struct para_data_s *para,
"(6:genkey(3:rsa(5:nbits%d:%s)))",
(int)strlen (numbuf), numbuf);
}
else if (algo == GCRY_PK_ECC || algo == GCRY_PK_EDDSA)
else if (algo == GCRY_PK_ECC)
{
const char *curve = get_parameter_value (para, pKEYCURVE, 0);
const char *flags;
if (algo == GCRY_PK_EDDSA)
flags = "(flags eddsa)";
if (!strcmp (curve, "Ed25519"))
flags = "(5:flags5:eddsa)";
else if (!strcmp (curve, "Curve25519"))
flags = "(flags djb-tweak)";
flags = "(5:flags9:djb-tweak)";
else
flags = "";
snprintf ((char*)keyparms, DIM (keyparms),
"(genkey(ecc(curve %zu:%s)%s))",
"(6:genkey(3:ecc(5:curve%zu:%s)%s))",
strlen (curve), curve, flags);
}
else