summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2022-08-01 10:34:16 +0200
committerWerner Koch <wk@gnupg.org>2022-08-01 10:34:16 +0200
commit8e63e813c7404e1dae1def98e0f45d148f71082d (patch)
treeec9d6b21e657bfbd95cf683e4e785a29b3e53c16 /common
parentscd:opengpg: Minor vendor name fix (diff)
downloadgnupg2-8e63e813c7404e1dae1def98e0f45d148f71082d.tar.xz
gnupg2-8e63e813c7404e1dae1def98e0f45d148f71082d.zip
common: Add a default OpenPGP ECC mapping.
* common/openpgp-oid.c (map_gcry_pk_to_openpgp): Map ECC to ECDSA which is similar to what we do at opther places in gpg. -- GnuPG-bug-id: 5555
Diffstat (limited to 'common')
-rw-r--r--common/openpgp-oid.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/openpgp-oid.c b/common/openpgp-oid.c
index f0460b068..8b16335b0 100644
--- a/common/openpgp-oid.c
+++ b/common/openpgp-oid.c
@@ -581,6 +581,7 @@ map_gcry_pk_to_openpgp (enum gcry_pk_algos algo)
case GCRY_PK_EDDSA: return PUBKEY_ALGO_EDDSA;
case GCRY_PK_ECDSA: return PUBKEY_ALGO_ECDSA;
case GCRY_PK_ECDH: return PUBKEY_ALGO_ECDH;
+ case GCRY_PK_ECC: return PUBKEY_ALGO_ECDSA; /* Most useful mapping. */
default: return algo < 110 ? (pubkey_algo_t)algo : 0;
}
}