diff options
author | Justus Winter <[email protected]> | 2017-03-02 15:25:20 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2017-03-02 15:25:20 +0000 |
commit | 0c4d0620d327e8a2069532a5519afefe867a47d6 (patch) | |
tree | fce87bc8fd4096ac942622a139f69f61033b9e59 /g10/gpg.c | |
parent | gpg: Fix (quick) key generation with --always-trust. (diff) | |
download | gnupg-0c4d0620d327e8a2069532a5519afefe867a47d6.tar.gz gnupg-0c4d0620d327e8a2069532a5519afefe867a47d6.zip |
gpg: Always initialize the trust db when generating keys.
* g10/gpg.c (main): Always initialize the trust db when generating
keys.
* g10/keygen.c (do_generate_keypair): We can now assume that there is
a trust db.
--
It is important to mark keys we create as ultimately trusted.
Fixes-commit: 4735ab96aa5577d40ba7b3f72d863057198cc6a7
GnuPG-bug-id: 2695
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'g10/gpg.c')
-rw-r--r-- | g10/gpg.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -3949,6 +3949,11 @@ main (int argc, char **argv) case aListTrustDB: rc = setup_trustdb (argc? 1:0, trustdb_name); break; + case aKeygen: + case aFullKeygen: + case aQuickKeygen: + rc = setup_trustdb (1, trustdb_name); + break; default: /* If we are using TM_ALWAYS, we do not need to create the trustdb. */ |