mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg: When using a parm file w/o usage don't set the RENC usage.
* g10/keygen.c (proc_parameter_file): Don't include RENC in the default usage. -- Testplan: $ gpg --gen-key --batch <<EOF Key-Type: EDDSA Key-Curve: ed448 Key-Usage: cert Name-Real: Meh Muh Name-Email: test-3@example.org Expire-Date: 2025-01-01 Passphrase: abc subkey-type: ecdh Subkey-curve: cv448 EOF and check that the R flag does not show up in the usage.
This commit is contained in:
parent
daedb3c965
commit
1a2c8267f5
@ -4220,12 +4220,13 @@ proc_parameter_file (ctrl_t ctrl, struct para_data_s *para, const char *fname,
|
||||
if (!err)
|
||||
{
|
||||
/* Default to algo capabilities if subkey-usage is not
|
||||
provided */
|
||||
provided. Take care not to include RENC. */
|
||||
r = xmalloc_clear (sizeof(*r));
|
||||
r->key = pSUBKEYUSAGE;
|
||||
r->u.usage = (is_default
|
||||
? PUBKEY_USAGE_ENC
|
||||
: openpgp_pk_algo_usage (algo));
|
||||
: (openpgp_pk_algo_usage (algo)
|
||||
& ~PUBKEY_USAGE_RENC) );
|
||||
append_to_parameter (para, r);
|
||||
}
|
||||
else if (err == -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user