mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
* keygen.c (do_add_key_flags): The spec says that all primary keys MUST be
able to certify. Force the certify flag on for primaries (and off for subkeys).
This commit is contained in:
parent
65ec9772a7
commit
aa50dcff2f
@ -1,5 +1,9 @@
|
|||||||
2004-10-10 David Shaw <dshaw@jabberwocky.com>
|
2004-10-10 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* keygen.c (do_add_key_flags): The spec says that all primary keys
|
||||||
|
MUST be able to certify. Force the certify flag on for primaries
|
||||||
|
(and off for subkeys).
|
||||||
|
|
||||||
* keygen.c (generate_keypair): Fix generating keys with the auth
|
* keygen.c (generate_keypair): Fix generating keys with the auth
|
||||||
flag.
|
flag.
|
||||||
|
|
||||||
|
12
g10/keygen.c
12
g10/keygen.c
@ -185,13 +185,13 @@ do_add_key_flags (PKT_signature *sig, unsigned int use)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
|
|
||||||
|
/* The spec says that all primary keys MUST be able to certify. */
|
||||||
|
if(sig->sig_class!=0x18)
|
||||||
|
buf[0] |= 0x01;
|
||||||
|
|
||||||
if (use & PUBKEY_USAGE_SIG)
|
if (use & PUBKEY_USAGE_SIG)
|
||||||
{
|
buf[0] |= 0x02;
|
||||||
if(sig->sig_class==0x18)
|
|
||||||
buf[0] |= 0x02; /* Don't set the certify flag for subkeys */
|
|
||||||
else
|
|
||||||
buf[0] |= 0x01 | 0x02;
|
|
||||||
}
|
|
||||||
if (use & PUBKEY_USAGE_ENC)
|
if (use & PUBKEY_USAGE_ENC)
|
||||||
buf[0] |= 0x04 | 0x08;
|
buf[0] |= 0x04 | 0x08;
|
||||||
if (use & PUBKEY_USAGE_AUTH)
|
if (use & PUBKEY_USAGE_AUTH)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user