summaryrefslogtreecommitdiffstats
path: root/common/sexputil.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2024-10-08 07:48:47 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2024-10-08 07:58:29 +0200
commitf5703994d4692fc310292a93296626f484936b16 (patch)
treebd11c037af4ed11e70fa6525835a00487c3239fe /common/sexputil.c
parentImplement GNUPG_ASSUME_COMPLIANCE envvar for testing (diff)
downloadgnupg2-f5703994d4692fc310292a93296626f484936b16.tar.xz
gnupg2-f5703994d4692fc310292a93296626f484936b16.zip
common,gpg,scd,sm: Use openpgp_oid_or_name_to_curve to get curve.
* common/sexputil.c (pubkey_algo_string): Use openpgp_oid_or_name_to_curve. * g10/card-util.c (current_card_status, ask_card_keyattr): Likewise. * scd/app-piv.c (writekey_ecc): Likewise. * sm/fingerprint.c (gpgsm_get_key_algo_info): Likewise. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'common/sexputil.c')
-rw-r--r--common/sexputil.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/sexputil.c b/common/sexputil.c
index f9842391e..e00590ac7 100644
--- a/common/sexputil.c
+++ b/common/sexputil.c
@@ -1104,8 +1104,7 @@ pubkey_algo_string (gcry_sexp_t s_pkey, enum gcry_pk_algos *r_algoid)
else if (prefix)
{
const char *curve = gcry_pk_get_curve (s_pkey, 0, NULL);
- const char *name = openpgp_oid_to_curve
- (openpgp_curve_to_oid (curve, NULL, NULL), 0);
+ const char *name = openpgp_oid_or_name_to_curve (curve, 0);
if (name)
result = xtrystrdup (name);