[git] GpgOL - branch, master, updated. gpgol-2.3.0-80-g1b37aa0

by Andre Heinecke cvs at cvs.gnupg.org
Tue Oct 9 14:26:39 CEST 2018


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 "GnuPG extension for MS Outlook".

The branch, master has been updated
       via  1b37aa01cc67d942de06c882fd9d30d39866b111 (commit)
      from  005910cd90a86271c77816604ab4a1b8c88fc1fb (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 1b37aa01cc67d942de06c882fd9d30d39866b111
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 9 14:23:26 2018 +0200

    Make auto import from S/MIME keyserver default off
    
    * src/common_indep.h (opt.search_smime_servers): New.
    * src/main.c (read_options): Read it.
    * src/keycache.cpp (do_locate): Respect it.
    
    --
    This also does not do an external search if there
    was an OpenPGP certificate found for the recipient and
    prefer_smime is not set.

diff --git a/src/common_indep.h b/src/common_indep.h
index 73910f4..fb693ef 100644
--- a/src/common_indep.h
+++ b/src/common_indep.h
@@ -204,6 +204,8 @@ struct
   int prefer_smime;          /* S/MIME prefered when autoresolving */
   int smime_html_warn_shown; /* Flag to save if unsigned smime warning was shown */
   int autoretrieve;           /* Use --auto-key-retrieve. */
+  int search_smime_servers;  /* Search for S/MIME keys on all configured S/MIME keyservers
+                                for each new unknown mail */
 
   /* The forms revision number of the binary.  */
   int forms_revision;
diff --git a/src/keycache.cpp b/src/keycache.cpp
index f885694..523ab31 100644
--- a/src/keycache.cpp
+++ b/src/keycache.cpp
@@ -953,6 +953,8 @@ do_locate (LPVOID arg)
                  anonstr (k.primaryFingerprint()));
       KeyCache::instance ()->setPgpKey (addr, k);
     }
+  log_debug ("%s:%s pgp locate done",
+             SRCNAME, __func__);
 
   if (opt.enable_smime)
     {
@@ -966,6 +968,12 @@ do_locate (LPVOID arg)
           KeyCache::instance()->setSmimeKey (addr, candidate);
           TRETURN 0;
         }
+      if (!opt.search_smime_servers || (!k.isNull() && !opt.prefer_smime))
+        {
+          log_debug ("%s:%s Found no S/MIME key locally and external "
+                     "search is disabled.", SRCNAME, __func__);
+          TRETURN 0;
+        }
       /* Search for extern keys and import them */
       const auto externs = get_extern_smime_keys (addr, true);
       if (externs.empty())
diff --git a/src/main.c b/src/main.c
index 73d8f04..50f5061 100644
--- a/src/main.c
+++ b/src/main.c
@@ -321,6 +321,7 @@ read_options (void)
   opt.automation = get_conf_bool ("automation", 1);
   opt.autosecure = get_conf_bool ("autosecure", 1);
   opt.autotrust = get_conf_bool ("autotrust", 0);
+  opt.search_smime_servers = get_conf_bool ("searchSmimeServers", 0);
   opt.smime_html_warn_shown = get_conf_bool ("smimeHtmlWarnShown", 0);
 
   if (!opt.automation)

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

Summary of changes:
 src/common_indep.h | 2 ++
 src/keycache.cpp   | 8 ++++++++
 src/main.c         | 1 +
 3 files changed, 11 insertions(+)


hooks/post-receive
-- 
GnuPG extension for MS Outlook
http://git.gnupg.org




More information about the Gnupg-commits mailing list