mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Fix (quick) key generation with --always-trust.
* g10/keygen.c (do_generate_keypair): Only update the ownertrust if we do have a trust database. * g10/trustdb.c (have_trustdb): New function. * g10/trustdb.h (have_trustdb): New prototype. * tests/openpgp/quick-key-manipulation.scm: Remove workaround. GnuPG-bug-id: 2695 Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
d6f0f36876
commit
4735ab96aa
4 changed files with 14 additions and 6 deletions
|
@ -4791,8 +4791,9 @@ do_generate_keypair (ctrl_t ctrl, struct para_data_s *para,
|
|||
keyid_from_pk (pk, pk->main_keyid);
|
||||
register_trusted_keyid (pk->main_keyid);
|
||||
|
||||
update_ownertrust (pk, ((get_ownertrust (pk) & ~TRUST_MASK)
|
||||
| TRUST_ULTIMATE ));
|
||||
if (have_trustdb ())
|
||||
update_ownertrust (pk, ((get_ownertrust (pk) & ~TRUST_MASK)
|
||||
| TRUST_ULTIMATE ));
|
||||
|
||||
gen_standard_revoke (pk, cache_nonce);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue