summaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-02-09 14:00:57 +0100
committerWerner Koch <wk@gnupg.org>2020-02-09 14:04:18 +0100
commit49c891a9bfac24a1d95e76d33d44a49426247777 (patch)
tree9803fe27ec8e3f8274f16da2db1191522cea6dfa /g10/misc.c
parentcard: Support brainpool curves in the generate command. (diff)
downloadgnupg2-49c891a9bfac24a1d95e76d33d44a49426247777.tar.xz
gnupg2-49c891a9bfac24a1d95e76d33d44a49426247777.zip
common: Add OpenPGP<->Gcrypt pubkey id mapping functions.
* g10/misc.c (map_pk_gcry_to_openpgp): Move to ... * common/openpgp-oid.c (map_gcry_pk_to_openpgp): here and rename. Change all 4 callers. (map_openpgp_pk_to_gcry): New. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to '')
-rw-r--r--g10/misc.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/g10/misc.c b/g10/misc.c
index 07ce1d41d..8ace21f09 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -523,21 +523,6 @@ map_cipher_gcry_to_openpgp (enum gcry_cipher_algos algo)
}
}
-/* Map Gcrypt public key algorithm numbers to those used by OpenPGP.
- FIXME: This mapping is used at only two places - we should get rid
- of it. */
-pubkey_algo_t
-map_pk_gcry_to_openpgp (enum gcry_pk_algos algo)
-{
- switch (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;
- default: return algo < 110 ? (pubkey_algo_t)algo : 0;
- }
-}
-
/* Return the block length of an OpenPGP cipher algorithm. */
int