mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
agent: Fix agent_is_eddsa_key.
* agent/findkey.c (agent_is_eddsa_key): Implemented. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
c5e41f539b
commit
9c731bbedf
@ -812,14 +812,10 @@ agent_is_eddsa_key (gcry_sexp_t s_key)
|
||||
return 0;
|
||||
|
||||
if (key_parms_from_sexp (s_key, NULL, algoname, sizeof algoname, NULL, 0))
|
||||
return 0; /* Error - assume it is not an DSA key. */
|
||||
return 0; /* Error - assume it is not an EdDSA key. */
|
||||
|
||||
if (!strcmp (algoname, "dsa"))
|
||||
return GCRY_PK_DSA;
|
||||
else if (!strcmp (algoname, "ecc"))
|
||||
return GCRY_PK_ECDSA; /* FIXME: Check for the EdDSA flag. */
|
||||
else if (!strcmp (algoname, "ecdsa"))
|
||||
return GCRY_PK_ECDSA;
|
||||
if (!strcmp (algoname, "eddsa"))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user