[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-232-g498b9a9

by Werner Koch cvs at cvs.gnupg.org
Fri Aug 2 09:50:11 CEST 2013


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  498b9a95dc65c43240835d64cc92d8fb43014d53 (commit)
      from  ca6fe88c0068f8d45ef39df0fc7b161998a91fe9 (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 498b9a95dc65c43240835d64cc92d8fb43014d53
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Aug 2 09:10:17 2013 +0200

    gpg: No need to create a trustdb when encrypting with --always-trust.
    
    * g10/gpg.c (main): Special case setup_trustdb for --encrypt.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/gpg.c b/g10/gpg.c
index a141164..599948f 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -3440,7 +3440,8 @@ main (int argc, char **argv)
     ctrl = xcalloc (1, sizeof *ctrl);
     gpg_init_default_ctrl (ctrl);
 
-    switch( cmd ) {
+    switch (cmd)
+      {
       case aPrimegen:
       case aPrintMD:
       case aPrintMDs:
@@ -3449,12 +3450,24 @@ main (int argc, char **argv)
       case aEnArmor:
 	break;
       case aFixTrustDB:
-      case aExportOwnerTrust: rc = setup_trustdb( 0, trustdb_name ); break;
-      case aListTrustDB: rc = setup_trustdb( argc? 1:0, trustdb_name ); break;
-      default: rc = setup_trustdb(1, trustdb_name ); break;
-    }
-    if( rc )
-	log_error(_("failed to initialize the TrustDB: %s\n"), g10_errstr(rc));
+      case aExportOwnerTrust:
+        rc = setup_trustdb (0, trustdb_name);
+        break;
+      case aListTrustDB:
+        rc = setup_trustdb (argc? 1:0, trustdb_name);
+        break;
+      case aEncr:
+      case aEncrFiles:
+        /* If we are using TM_ALWAYS, we do not need to create the
+           trustdb.  */
+        rc = setup_trustdb (opt.trust_model != TM_ALWAYS, trustdb_name);
+        break;
+      default:
+        rc = setup_trustdb (1, trustdb_name );
+        break;
+      }
+    if (rc)
+      log_error (_("failed to initialize the TrustDB: %s\n"), g10_errstr(rc));
 
 
     switch (cmd)

-----------------------------------------------------------------------

Summary of changes:
 g10/gpg.c |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list