mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
gpgsm: Fix the previous commit.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
49ea53b755
commit
e06a8e3e87
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user