aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/keygen.c8
-rw-r--r--g10/main.h1
-rw-r--r--g10/misc.c15
3 files changed, 4 insertions, 20 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index 61682158e..447743fca 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -2048,7 +2048,7 @@ check_keygrip (ctrl_t ctrl, const char *hexgrip)
algo = get_pk_algo_from_canon_sexp (public, publiclen);
xfree (public);
- return map_pk_gcry_to_openpgp (algo);
+ return map_gcry_pk_to_openpgp (algo);
}
@@ -2309,7 +2309,7 @@ ask_algo (ctrl_t ctrl, int addmode, int *r_subkey_algo, unsigned int *r_usage,
&& !(sl->flags & GCRY_PK_USAGE_ENCR))
sl->flags = (PUBKEY_ALGO_EDDSA << 8);
else
- sl->flags |= (map_pk_gcry_to_openpgp (algoid) << 8);
+ sl->flags |= (map_gcry_pk_to_openpgp (algoid) << 8);
tty_printf (" (%d) %s %s", count, sl->d, algostr);
if ((sl->flags & GCRY_PK_USAGE_CERT))
@@ -3451,7 +3451,7 @@ parse_key_parameter_part (ctrl_t ctrl,
&& !(sl->flags & GCRY_PK_USAGE_ENCR))
algo = PUBKEY_ALGO_EDDSA;
else
- algo = map_pk_gcry_to_openpgp (algoid);
+ algo = map_gcry_pk_to_openpgp (algoid);
xfree (algostr);
xfree (keygrip);
@@ -3796,7 +3796,7 @@ get_parameter_algo (ctrl_t ctrl, struct para_data_s *para, enum para_name key,
else if (!ascii_strcasecmp (r->u.value, "ECDH"))
i = PUBKEY_ALGO_ECDH;
else
- i = map_pk_gcry_to_openpgp (gcry_pk_map_name (r->u.value));
+ i = map_gcry_pk_to_openpgp (gcry_pk_map_name (r->u.value));
if (i == PUBKEY_ALGO_RSA_E || i == PUBKEY_ALGO_RSA_S)
i = 0; /* we don't want to allow generation of these algorithms */
diff --git a/g10/main.h b/g10/main.h
index 2001c8646..ec58795b0 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -138,7 +138,6 @@ gpg_error_t openpgp_aead_algo_info (aead_algo_t algo,
enum gcry_cipher_modes *r_mode,
unsigned int *r_noncelen);
-pubkey_algo_t map_pk_gcry_to_openpgp (enum gcry_pk_algos algo);
int openpgp_pk_test_algo (pubkey_algo_t algo);
int openpgp_pk_test_algo2 (pubkey_algo_t algo, unsigned int use);
int openpgp_pk_algo_usage ( int algo );
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