mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
gpg: Allow the use of "cv25519" and "ed25519" in the keygen parms.
* g10/keygen.c (gen_ecc): Map curve names. -- See https://lists.gnupg.org/pipermail/gnupg-users/2017-December/059619.html Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
4f88b0f561
commit
412bb7a801
@ -1581,6 +1581,13 @@ gen_ecc (int algo, const char *curve, kbnode_t pub_root,
|
||||
if (!curve || !*curve)
|
||||
return gpg_error (GPG_ERR_UNKNOWN_CURVE);
|
||||
|
||||
/* Map the displayed short forms of some curves to their canonical
|
||||
* names. */
|
||||
if (!ascii_strcasecmp (curve, "cv25519"))
|
||||
curve = "Curve25519";
|
||||
else if (!ascii_strcasecmp (curve, "ed25519"))
|
||||
curve = "Ed25519";
|
||||
|
||||
/* Note that we use the "comp" flag with EdDSA to request the use of
|
||||
a 0x40 compression prefix octet. */
|
||||
if (algo == PUBKEY_ALGO_EDDSA)
|
||||
|
Loading…
x
Reference in New Issue
Block a user