gpg: Improve the new parse_subkey_algostr_usagestr fucntion.
authorWerner Koch <wk@gnupg.org>
Thu, 2 Jun 2016 15:01:54 +0000 (17:01 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 2 Jun 2016 15:06:39 +0000 (17:06 +0200)
commitdcc4cd83821667be22e502af86139bb4bd41bdf7
treef3c01b658c4db6fdd3b8d5bd8508ae0f0c17e8c4
parent8f2a053a0ffa0430d01a53b4d491a3f0fff683eb
gpg: Improve the new parse_subkey_algostr_usagestr fucntion.

* g10/keygen.c (parse_usagestr): Allow "cert".
(generate_subkeypair): Factor expire parsing out to ...
(parse_subkey_algostr_usagestr): here.  Rename to ...
(parse_algo_usage_expire): this.  Add arg 'for_subkey'.  Set CERT for
primary key and check that it is not set for subkeys.

Signed-off-by: Werner Koch <wk@gnupg.org>
g10/keygen.c