mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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: 0988e49c45
This commit is contained in:
parent
727e125a4d
commit
8833a34bf0
2 changed files with 7 additions and 4 deletions
|
@ -2438,6 +2438,7 @@ ask_key_flags_with_mask (int algo, int subkey, unsigned int current,
|
|||
* below for a workaround. */
|
||||
possible = (openpgp_pk_algo_usage (algo) & mask);
|
||||
possible &= ~PUBKEY_USAGE_RENC;
|
||||
possible &= ~PUBKEY_USAGE_GROUP;
|
||||
if (algo == PUBKEY_ALGO_ECDH)
|
||||
possible |= (current & (PUBKEY_USAGE_ENC
|
||||
|PUBKEY_USAGE_CERT
|
||||
|
@ -4972,7 +4973,8 @@ proc_parameter_file (ctrl_t ctrl, struct para_data_s *para, const char *fname,
|
|||
else
|
||||
{
|
||||
r = get_parameter (para, pKEYUSAGE);
|
||||
if (r && (r->u.usage & ~openpgp_pk_algo_usage (algo)))
|
||||
if (r && (r->u.usage
|
||||
& ~(openpgp_pk_algo_usage (algo) | PUBKEY_USAGE_GROUP)))
|
||||
{
|
||||
log_error ("%s:%d: specified Key-Usage not allowed for algo %d\n",
|
||||
fname, r->lnr, algo);
|
||||
|
@ -5009,7 +5011,8 @@ proc_parameter_file (ctrl_t ctrl, struct para_data_s *para, const char *fname,
|
|||
else
|
||||
{
|
||||
r = get_parameter (para, pSUBKEYUSAGE);
|
||||
if (r && (r->u.usage & ~openpgp_pk_algo_usage (algo)))
|
||||
if (r && (r->u.usage
|
||||
& ~(openpgp_pk_algo_usage (algo)|PUBKEY_USAGE_GROUP)))
|
||||
{
|
||||
log_error ("%s:%d: specified Subkey-Usage not allowed"
|
||||
" for algo %d\n", fname, r->lnr, algo);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue