summaryrefslogtreecommitdiffstats
path: root/kbx
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-05-07 12:39:43 +0200
committerWerner Koch <wk@gnupg.org>2014-05-07 12:39:43 +0200
commitbdb9c2b314400da9155b8a924e22e486793dda89 (patch)
tree17efa2ca00fa96fbd5be9dc56b5e1c71704887ab /kbx
parentagent: Remove greeting message. (diff)
downloadgnupg2-bdb9c2b314400da9155b8a924e22e486793dda89.tar.xz
gnupg2-bdb9c2b314400da9155b8a924e22e486793dda89.zip
kbx: Add experimental support for EDDSA.
* kbx/keybox-openpgp.c (parse_key): Use algo constants and add experimental support for EdDSA.
Diffstat (limited to 'kbx')
-rw-r--r--kbx/keybox-openpgp.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/kbx/keybox-openpgp.c b/kbx/keybox-openpgp.c
index 82bc93479..6ae6c44ce 100644
--- a/kbx/keybox-openpgp.c
+++ b/kbx/keybox-openpgp.c
@@ -199,23 +199,24 @@ parse_key (const unsigned char *data, size_t datalen,
switch (algorithm)
{
- case 1:
- case 2:
- case 3: /* RSA */
+ case PUBKEY_ALGO_RSA:
+ case PUBKEY_ALGO_RSA_E:
+ case PUBKEY_ALGO_RSA_S:
npkey = 2;
break;
- case 16:
- case 20: /* Elgamal */
+ case PUBKEY_ALGO_ELGAMAL_E:
+ case PUBKEY_ALGO_ELGAMAL:
npkey = 3;
break;
- case 17: /* DSA */
+ case PUBKEY_ALGO_DSA:
npkey = 4;
break;
- case 18: /* ECDH */
+ case PUBKEY_ALGO_ECDH:
npkey = 3;
is_ecc = 1;
break;
- case 19: /* ECDSA */
+ case PUBKEY_ALGO_ECDSA:
+ case PUBKEY_ALGO_EDDSA:
npkey = 2;
is_ecc = 1;
break;