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:
Werner Koch 2014-10-03 15:05:47 +02:00
parent ade531acac
commit bc8583f247
1 changed files with 7 additions and 0 deletions

View File

@ -1718,6 +1718,13 @@ ask_key_flags(int algo,int subkey)
current |= PUBKEY_USAGE_ENC;
else if ((*s == 'a' || *s == 'A') && (possible&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;
}