[git] GpgOL - branch, master, updated. gpgol-2.2.0-145-gb09e891

by Andre Heinecke cvs at cvs.gnupg.org
Wed Aug 22 13:31:47 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  b09e89143d13f1d170ba2298ca412b47f2f03382 (commit)
       via  7486c0bf18a59e531144901b97e4c7c352acf5c2 (commit)
       via  1692fc9846e5b961aef9142dda14c23964994c06 (commit)
      from  649622c95089767d8a27623e66396b2378f72a04 (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 b09e89143d13f1d170ba2298ca412b47f2f03382
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Aug 22 13:30:35 2018 +0200

    Fix is_valid_chksum check
    
    * src/parsecontroller.cpp (is_valid_checksum): Don't check
    the OR'ed sigsum values for equality.
    
    --
    This fixes handling of "Green Valid" S/MIME mails.

diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp
index 8dc0034..04a583e 100644
--- a/src/parsecontroller.cpp
+++ b/src/parsecontroller.cpp
@@ -240,20 +240,18 @@ ParseController::setSender(const std::string &sender)
 static bool
 is_valid_chksum(const GpgME::Signature &sig)
 {
-  switch (sig.summary())
-    {
-      case GpgME::Signature::Valid:
-      case GpgME::Signature::Green:
-      case GpgME::Signature::KeyRevoked:
-      case GpgME::Signature::KeyExpired:
-      case GpgME::Signature::SigExpired:
-      case GpgME::Signature::CrlMissing:
-      case GpgME::Signature::CrlTooOld:
-      case GpgME::Signature::TofuConflict:
-        return true;
-      default:
-        return false;
-    }
+  const auto sum = sig.summary();
+  static unsigned int valid_mask = (unsigned int) (
+      GpgME::Signature::Valid |
+      GpgME::Signature::Green |
+      GpgME::Signature::KeyRevoked |
+      GpgME::Signature::KeyExpired |
+      GpgME::Signature::SigExpired |
+      GpgME::Signature::CrlMissing |
+      GpgME::Signature::CrlTooOld |
+      GpgME::Signature::TofuConflict );
+
+  return sum & valid_mask;
 }
 
 void

commit 7486c0bf18a59e531144901b97e4c7c352acf5c2
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Aug 22 13:28:32 2018 +0200

    Make autosecure compatible with always sign
    
    * src/mail.cpp (Mail::setDoAutosecure_m): Handle always
    sign and do not treat it as manual setting.
    
    --
    It makes sense for users who always sign to still encrypt
    based on key availablity.

diff --git a/src/mail.cpp b/src/mail.cpp
index 5188c9e..26fa366 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -3387,7 +3387,10 @@ Mail::setDoAutosecure_m (bool value)
   setUUID_o ();
 
   int old_flags = get_gpgol_draft_info_flags (msg);
-  if (old_flags && m_first_autosecure_check)
+  if (old_flags && m_first_autosecure_check &&
+      /* Someone with always sign and autosecure active
+       * will want to get autoencryption. */
+      !(old_flags == 2 && opt.sign_default))
     {
       /* They were set explicily before us. This can be
        * because they were a draft (which is bad) or
@@ -3401,7 +3404,7 @@ Mail::setDoAutosecure_m (bool value)
       return;
     }
   m_first_autosecure_check = false;
-  set_gpgol_draft_info_flags (msg, value ? 3 : 0);
+  set_gpgol_draft_info_flags (msg, value ? 3 : opt.sign_default ? 2 : 0);
   gpgol_release (msg);
   gpgoladdin_invalidate_ui();
 }

commit 1692fc9846e5b961aef9142dda14c23964994c06
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Aug 22 10:59:57 2018 +0200

    Fix minor name inconsitencs
    
    * src/mail.cpp (releaseCurrentItem): m_tmp was not a member.

diff --git a/src/mail.cpp b/src/mail.cpp
index 0e8a9d2..5188c9e 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -3482,8 +3482,8 @@ Mail::releaseCurrentItem()
     }
   log_oom_extra ("%s:%s: releasing CurrentItem ref %p",
                  SRCNAME, __func__, m_currentItemRef);
-  LPDISPATCH m_tmp = m_currentItemRef;
+  LPDISPATCH tmp = m_currentItemRef;
   m_currentItemRef = nullptr;
   /* This can cause our destruction */
-  gpgol_release (m_tmp);
+  gpgol_release (tmp);
 }

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

Summary of changes:
 src/mail.cpp            | 11 +++++++----
 src/parsecontroller.cpp | 26 ++++++++++++--------------
 2 files changed, 19 insertions(+), 18 deletions(-)


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




More information about the Gnupg-commits mailing list