aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2013-08-02 07:17:52 +0000
committerWerner Koch <[email protected]>2013-08-02 07:17:52 +0000
commita1a59e6a539e597996976d0afb6aa3062e954188 (patch)
treed3bee64d5ee6a44459bd31398178f7f03eb118bc
parentPost release updates. (diff)
downloadgnupg-a1a59e6a539e597996976d0afb6aa3062e954188.tar.gz
gnupg-a1a59e6a539e597996976d0afb6aa3062e954188.zip
gpg: No need to create a trustdb when encrypting with --always-trust.
* g10/gpg.c (main): Special case setup_trustdb for --encrypt. -- (back ported from commit 498b9a95dc65c43240835d64cc92d8fb43014d53) Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--g10/gpg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 96f908603..b310308eb 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -3318,6 +3318,12 @@ main (int argc, char **argv )
case aFixTrustDB:
case aExportOwnerTrust: rc = setup_trustdb( 0, trustdb_name ); break;
case aListTrustDB: rc = setup_trustdb( argc? 1:0, trustdb_name ); break;
+ case aEncr:
+ case aEncrFiles:
+ /* No need to create the trust model if we are using the
+ * always trust model. */
+ rc = setup_trustdb (opt.trust_model != TM_ALWAYS, trustdb_name);
+ break;
default: rc = setup_trustdb(1, trustdb_name ); break;
}
if( rc )