[git] GpgOL - branch, master, updated. gpgol-1.4.0-253-g94faa08

by Andre Heinecke cvs at cvs.gnupg.org
Mon Jan 16 15:34:41 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 "GnuPG extension for MS Outlook".

The branch, master has been updated
       via  94faa08526668e51d861d5281a8e562a5bc9b9a2 (commit)
       via  6cb234470e47364900368fbd062134206db4482c (commit)
      from  e20092844ccc46b4074d01d235f4a55788002d35 (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 94faa08526668e51d861d5281a8e562a5bc9b9a2
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Jan 16 15:33:54 2017 +0100

    Handle non trustworthy or unknown CA better
    
    * src/mail.cpp (Mail::get_crypto_details): Add handling for
    unknown validity for S/MIME

diff --git a/src/mail.cpp b/src/mail.cpp
index dd6562c..b713f3e 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -1814,7 +1814,14 @@ Mail::get_crypto_details()
                (m_sig.validity() == 0))&& !general_problem)
         {
            /* Bit of a catch all for weird results. */
-          message += _("is not certified by any trustworthy key.");
+          if (isOpenPGP)
+            {
+              message += _("is not certified by any trustworthy key.");
+            }
+          else
+            {
+              message += _("is not certified by a trustworthy Certificate Authority or the Certificate Authority is unknown.");
+            }
         }
       else if (m_uid.isRevoked())
         {

commit 6cb234470e47364900368fbd062134206db4482c
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jan 13 17:42:19 2017 +0100

    Add option to disable crypt reply selection
    
    * src/addin-options.cpp: Update accordingly.
    * src/dialogs.h, src/dialogs.rc: Add new option.
    * src/mailitem-events.cpp (EVENT_SINK_INVOKE): Handle option.
    * src/main.c (read_options, write_options): Handle new option.
    
    --
    There are some usecases e.g. when using an encryption gateway
    where choosing the reply crypto state based on the original
    message might not be welcome. So make it optional.

diff --git a/src/addin-options.cpp b/src/addin-options.cpp
index eb7d596..20d2128 100644
--- a/src/addin-options.cpp
+++ b/src/addin-options.cpp
@@ -44,6 +44,8 @@ set_labels (HWND dlg)
     { IDC_SIGN_DEFAULT,     N_("&Sign new messages by default")},
     { IDC_INLINE_PGP,       N_("&Send OpenPGP mails without "
                                "attachments as PGP/Inline")},
+    { IDC_REPLYCRYPT,       N_("S&elect crypto settings automatically "
+                               "for reply and foward.")},
 //    { IDC_AUTORRESOLVE,     N_("&Search for OpenPGP keys automatically when encrypting")},
 
 
@@ -94,6 +96,8 @@ options_window_proc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 #endif
           SendDlgItemMessage (hDlg, IDC_INLINE_PGP, BM_SETCHECK,
                               !!opt.inline_pgp, 0L);
+          SendDlgItemMessage (hDlg, IDC_REPLYCRYPT, BM_SETCHECK,
+                              !!opt.reply_crypt, 0L);
 //          SendDlgItemMessage (hDlg, IDC_AUTORRESOLVE, BM_SETCHECK,
 //                              !!opt.autoresolve, 0L);
           enable_disable_opts (hDlg);
@@ -133,6 +137,9 @@ options_window_proc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
                 opt.inline_pgp = !!SendDlgItemMessage
                   (hDlg, IDC_INLINE_PGP, BM_GETCHECK, 0, 0L);
 
+                opt.reply_crypt = !!SendDlgItemMessage
+                  (hDlg, IDC_REPLYCRYPT, BM_GETCHECK, 0, 0L);
+
 //                opt.autoresolve = !!SendDlgItemMessage
 ////                  (hDlg, IDC_AUTORRESOLVE, BM_GETCHECK, 0, 0L);
 
diff --git a/src/common_indep.h b/src/common_indep.h
index a5c04f3..7eca780 100644
--- a/src/common_indep.h
+++ b/src/common_indep.h
@@ -197,6 +197,7 @@ struct
   int mime_ui;               /* Only for Addin. Use the PGP/MIME ui */
   int inline_pgp;            /* Only for Addin. Use Inline PGP by default. */
   int autoresolve;           /* Autresolve keys with --locate-keys. */
+  int reply_crypt;           /* Only for Addin. Encrypt / Sign based on cryptostatus. */
 
   /* The compatibility flags. */
   struct
diff --git a/src/dialogs.h b/src/dialogs.h
index e6f925d..2cce4ad 100644
--- a/src/dialogs.h
+++ b/src/dialogs.h
@@ -106,6 +106,7 @@
 #define IDC_MIME_UI                     0x5133
 #define IDC_INLINE_PGP                  0x5134
 #define IDC_AUTORRESOLVE                0x5135
+#define IDC_REPLYCRYPT                  0x5136
 
 /* Ids for PNG Images */
 #define IDI_ENCRYPT_16_PNG              0x6000
diff --git a/src/dialogs.rc b/src/dialogs.rc
index 0454f19..3d27293 100644
--- a/src/dialogs.rc
+++ b/src/dialogs.rc
@@ -309,7 +309,7 @@ BEGIN
                     198, 96, 50, 14
 END
 
-IDD_ADDIN_OPTIONS DIALOGEX DISCARDABLE  300, 300, 266, 170
+IDD_ADDIN_OPTIONS DIALOGEX DISCARDABLE  300, 300, 266, 180
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT | DS_SETFONT
 CAPTION "GpgOL"
 FONT 8, "MS Shell Dlg"
@@ -333,7 +333,7 @@ BEGIN
 
     /* Send options box.  */
     GROUPBOX        "send-options", IDC_G_SEND,
-                    9, 50, 250, 50
+                    9, 50, 250, 57
 
     CONTROL         "encrypt-by-default", IDC_ENCRYPT_DEFAULT,
                     "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
@@ -347,6 +347,10 @@ BEGIN
                     "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
                     24, 82, 215, 10
 
+    CONTROL         "replycrypt", IDC_REPLYCRYPT,
+                    "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
+                    24, 93, 215, 10
+
 //    CONTROL         "autoresolve", IDC_AUTORRESOLVE,
 //                    "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
 //                    24, 93, 215, 10
@@ -354,18 +358,18 @@ BEGIN
     /* Stuff at the lower left corner.  */
     CONTROL         IDB_LOGO, IDC_BITMAP,
                     "Static", SS_BITMAP | SS_REALSIZEIMAGE,
-                      10, 105, 128, 80
+                      10, 115, 128, 80
 
     LTEXT           "Version x ", IDC_VERSION_INFO,
-                      10, 155, 100, 9
+                      10, 165, 100, 9
 
     PUSHBUTTON      "advanced", IDC_GPG_OPTIONS,
-                    180, 120, 70, 14
+                    180, 130, 70, 14
 
     PUSHBUTTON      "gpgconf", IDC_GPG_CONF,
-                    180, 135, 70, 14
+                    180, 145, 70, 14
 
     DEFPUSHBUTTON   "&OK", IDOK,
-                    180, 150, 70, 14
+                    180, 160, 70, 14
 
 END
diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp
index 1ec0ec3..e23242a 100644
--- a/src/mailitem-events.cpp
+++ b/src/mailitem-events.cpp
@@ -446,6 +446,10 @@ EVENT_SINK_INVOKE(MailItemEvents)
         {
           log_oom_extra ("%s:%s: Reply Forward ReplyAll: %p",
                          SRCNAME, __func__, m_mail);
+          if (!opt.reply_crypt)
+            {
+              break;
+            }
           int crypto_flags = 0;
           if (!(crypto_flags = m_mail->get_crypto_flags ()))
             {
diff --git a/src/main.c b/src/main.c
index d2e7122..52833f0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -421,6 +421,9 @@ read_options (void)
   load_extension_value ("autoresolve", &val);
   opt.autoresolve = val == NULL || *val != '1'? 0 : 1;
   xfree (val); val = NULL;
+  load_extension_value ("replyCrypt", &val);
+  opt.reply_crypt = val == NULL || *val != '1'? 1 : 0;
+  xfree (val); val = NULL;
   /* Note, that on purpose these flags are only Registry changeable.
      The format of the entry is a string of of "0" and "1" digits; see
      the switch below for a description. */
@@ -493,6 +496,7 @@ write_options (void)
     {"mimeUI", MIME_UI_DEFAULT, opt.mime_ui, NULL},
     {"inlinePGP",                0, opt.inline_pgp, NULL},
     {"autoresolve",              0, opt.autoresolve, NULL},
+    {"replyCrypt",               0, opt.reply_crypt, NULL},
     {NULL, 0, 0, NULL}
   };
   char buf[32];

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

Summary of changes:
 src/addin-options.cpp   |  7 +++++++
 src/common_indep.h      |  1 +
 src/dialogs.h           |  1 +
 src/dialogs.rc          | 18 +++++++++++-------
 src/mail.cpp            |  9 ++++++++-
 src/mailitem-events.cpp |  4 ++++
 src/main.c              |  4 ++++
 7 files changed, 36 insertions(+), 8 deletions(-)


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




More information about the Gnupg-commits mailing list