[git] GnuPG - branch, master, updated. gnupg-2.1.19-7-g0c4d062
by Justus Winter
cvs at cvs.gnupg.org
Thu Mar 2 16:28:14 CET 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via 0c4d0620d327e8a2069532a5519afefe867a47d6 (commit)
from 4735ab96aa5577d40ba7b3f72d863057198cc6a7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0c4d0620d327e8a2069532a5519afefe867a47d6
Author: Justus Winter <justus at g10code.com>
Date: Thu Mar 2 16:25:20 2017 +0100
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 <justus at g10code.com>
diff --git a/g10/gpg.c b/g10/gpg.c
index 5a880fd..654dcb9 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -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. */
diff --git a/g10/keygen.c b/g10/keygen.c
index f044257..201ebaa 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -4791,9 +4791,8 @@ do_generate_keypair (ctrl_t ctrl, struct para_data_s *para,
keyid_from_pk (pk, pk->main_keyid);
register_trusted_keyid (pk->main_keyid);
- if (have_trustdb ())
- update_ownertrust (pk, ((get_ownertrust (pk) & ~TRUST_MASK)
- | TRUST_ULTIMATE ));
+ update_ownertrust (pk, ((get_ownertrust (pk) & ~TRUST_MASK)
+ | TRUST_ULTIMATE ));
gen_standard_revoke (pk, cache_nonce);
-----------------------------------------------------------------------
Summary of changes:
g10/gpg.c | 5 +++++
g10/keygen.c | 5 ++---
2 files changed, 7 insertions(+), 3 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list