mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
gpg: Allow creating a cert-only primary key.
* g10/keygen.c (ask_key_flags): Allow a 'c' in direct entry. -- GnuPG-bug-id: 1726
This commit is contained in:
parent
ade531acac
commit
bc8583f247
@ -1718,6 +1718,13 @@ ask_key_flags(int algo,int subkey)
|
|||||||
current |= PUBKEY_USAGE_ENC;
|
current |= PUBKEY_USAGE_ENC;
|
||||||
else if ((*s == 'a' || *s == 'A') && (possible&PUBKEY_USAGE_AUTH))
|
else if ((*s == 'a' || *s == 'A') && (possible&PUBKEY_USAGE_AUTH))
|
||||||
current |= PUBKEY_USAGE_AUTH;
|
current |= PUBKEY_USAGE_AUTH;
|
||||||
|
else if (!subkey && *s == 'c')
|
||||||
|
{
|
||||||
|
/* Accept 'c' for the primary key because USAGE_CERT
|
||||||
|
will will be set anyway. This is for folks who
|
||||||
|
want to experiment with a cert-only primary key. */
|
||||||
|
current |= PUBKEY_USAGE_CERT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user