1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg: Do not show RENC if no key capabilities are found for a key.

* g10/packet.h (PUBKEY_USAGE_BASIC_MASK): New.
* g10/getkey.c (merge_selfsigs_subkey): Mask the default.
(merge_selfsigs_main): Ditto.
This commit is contained in:
Werner Koch 2024-06-05 10:00:05 +02:00
parent f549446933
commit a2966c9d89
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 8 additions and 2 deletions

View file

@ -3090,7 +3090,8 @@ merge_selfsigs_main (ctrl_t ctrl, kbnode_t keyblock, int *r_revoked,
if (!key_usage)
{
/* No key flags at all: get it from the algo. */
key_usage = openpgp_pk_algo_usage (pk->pubkey_algo);
key_usage = (openpgp_pk_algo_usage (pk->pubkey_algo)
& PUBKEY_USAGE_BASIC_MASK);
}
else
{
@ -3364,7 +3365,8 @@ merge_selfsigs_subkey (ctrl_t ctrl, kbnode_t keyblock, kbnode_t subnode)
if (!key_usage)
{
/* No key flags at all: get it from the algo. */
key_usage = openpgp_pk_algo_usage (subpk->pubkey_algo);
key_usage = (openpgp_pk_algo_usage (subpk->pubkey_algo)
& PUBKEY_USAGE_BASIC_MASK);
}
else
{