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
|
@ -511,6 +511,16 @@ init_trustdb (int no_create)
|
|||
}
|
||||
|
||||
|
||||
/* Check whether we have a trust database, initializing it if
|
||||
necessary if the trust model is not 'always trust'. Returns true
|
||||
if we do have a usable trust database. */
|
||||
int
|
||||
have_trustdb (void)
|
||||
{
|
||||
return init_trustdb (opt.trust_model == TM_ALWAYS) == 0;
|
||||
}
|
||||
|
||||
|
||||
/****************
|
||||
* Recreate the WoT but do not ask for new ownertrusts. Special
|
||||
* feature: In batch mode and without a forced yes, this is only done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue