diff options
author | Werner Koch <[email protected]> | 2024-06-05 08:00:05 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-06-05 08:01:44 +0000 |
commit | 8cbcac89fe846d7848a64fdf25fb64479eed8ca9 (patch) | |
tree | e737612d7547ba1d4373cf541d233c16a7a14259 /g10/getkey.c | |
parent | gpg: Print designated revokers also in a standard listing. (diff) | |
download | gnupg-8cbcac89fe846d7848a64fdf25fb64479eed8ca9.tar.gz gnupg-8cbcac89fe846d7848a64fdf25fb64479eed8ca9.zip |
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.
Diffstat (limited to 'g10/getkey.c')
-rw-r--r-- | g10/getkey.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/getkey.c b/g10/getkey.c index e3a2deaae..49ffe0adb 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -3114,7 +3114,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 { @@ -3388,7 +3389,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 { |