From 838c1c387c76f6c20e728c241ef4b47edfbb01bd Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 8 Jul 2025 16:34:36 +0200 Subject: gpg: Display the correct OpenPGP algo name at 3 places. * g10/card-util.c (do_change_keyattr): Replace gcry_pk_algo_name by openpgp_pk_algo_name. * g10/keyedit.c (show_key_with_all_names): Ditto. -- For RSA and and DSA the Libgcrypt and the OpenPGP identifiers are the same. But for ECC they are different and thus we need to use the respective function to avoid printing a ? for example EdDSA designated revocation keys. Updates-commit: b7f8dec6325f1c80640f878ed3080bbc194fbc78 --- g10/card-util.c | 2 +- g10/keyedit.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/g10/card-util.c b/g10/card-util.c index ab1ce159c..53584ce08 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -1614,7 +1614,7 @@ do_change_keyattr (int keyno, const struct key_attr *key_attr) else { log_error (_("public key algorithm %d (%s) is not supported\n"), - key_attr->algo, gcry_pk_algo_name (key_attr->algo)); + key_attr->algo, openpgp_pk_algo_name (key_attr->algo)); return gpg_error (GPG_ERR_PUBKEY_ALGO); } diff --git a/g10/keyedit.c b/g10/keyedit.c index eebeecfcd..b0f8ea5ed 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -4106,7 +4106,7 @@ show_key_with_all_names (ctrl_t ctrl, estream_t fp, _("The following key was revoked on" " %s by %s key %s\n"), revokestr_from_pk (pk), - gcry_pk_algo_name (pk->revoked.algo), user); + openpgp_pk_algo_name (pk->revoked.algo), user); xfree (user); } @@ -4121,14 +4121,14 @@ show_key_with_all_names (ctrl_t ctrl, estream_t fp, char *user; const char *algo; - algo = gcry_pk_algo_name (pk->revkey[i].algid); + algo = openpgp_pk_algo_name (pk->revkey[i].algid); keyid_from_fingerprint (ctrl, pk->revkey[i].fpr, pk->revkey[i].fprlen, r_keyid); user = get_user_id_string_native (ctrl, r_keyid); tty_fprintf (fp, _("This key may be revoked by %s key %s"), - algo ? algo : "?", user); + algo, user); if (pk->revkey[i].class & 0x40) { -- cgit v1.2.3