diff options
author | NIIBE Yutaka <[email protected]> | 2020-03-27 10:41:03 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2020-03-27 10:42:14 +0000 |
commit | e06a8e3e87f044a5bf6ee06f92cc4fd2a0914863 (patch) | |
tree | 60c7b371e8a10891f74afc6ee690673cfde3b961 /sm/certreqgen.c | |
parent | gpgsm: Support key generation with ECC. (diff) | |
download | gnupg-e06a8e3e87f044a5bf6ee06f92cc4fd2a0914863.tar.gz gnupg-e06a8e3e87f044a5bf6ee06f92cc4fd2a0914863.zip |
gpgsm: Fix the previous commit.
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'sm/certreqgen.c')
-rw-r--r-- | sm/certreqgen.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sm/certreqgen.c b/sm/certreqgen.c index 1ca5d6f2f..404ff27e9 100644 --- a/sm/certreqgen.c +++ b/sm/certreqgen.c @@ -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 |