1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-14 21:47:19 +02:00

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: b7f8dec632
This commit is contained in:
Werner Koch 2025-07-08 16:34:36 +02:00
parent 7caefd1259
commit 838c1c387c
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 4 additions and 4 deletions

View file

@ -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);
}

View file

@ -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)
{