From 8833a34bf08765a71deab1efe8421a2c701f20d4 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 12 May 2025 11:54:50 +0200 Subject: gpg: Fully implement the group key flag. * g10/getkey.c (merge_selfsigs_main): Do not mask out the group bit. (merge_selfsigs_subkey): Ditto/ * g10/keygen.c (ask_key_flags_with_mask): Ditto. (proc_parameter_file): Ditto. -- Updates-commit: 0988e49c45d0fb73d0b536aa027bd114f9dc65a7 --- g10/getkey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g10/getkey.c') diff --git a/g10/getkey.c b/g10/getkey.c index 0fe17d054..e438859f4 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -3182,7 +3182,7 @@ merge_selfsigs_main (ctrl_t ctrl, kbnode_t keyblock, int *r_revoked, /* Check that the usage matches the usage as given by the algo. */ int x = openpgp_pk_algo_usage (pk->pubkey_algo); if (x) /* Mask it down to the actual allowed usage. */ - key_usage &= x; + key_usage &= (x | PUBKEY_USAGE_GROUP); } /* Whatever happens, it's a primary key, so it can certify. */ @@ -3457,7 +3457,7 @@ merge_selfsigs_subkey (ctrl_t ctrl, kbnode_t keyblock, kbnode_t subnode) /* Check that the usage matches the usage as given by the algo. */ int x = openpgp_pk_algo_usage (subpk->pubkey_algo); if (x) /* Mask it down to the actual allowed usage. */ - key_usage &= x; + key_usage &= (x | PUBKEY_USAGE_GROUP); } subpk->pubkey_usage = key_usage; -- cgit v1.2.3