[git] GpgOL - branch, nomapi, updated. gpgol-1.4.0-77-gb4708d2

by Andre Heinecke cvs at cvs.gnupg.org
Tue Oct 11 14:16:01 CEST 2016


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, nomapi has been updated
       via  b4708d27c6a03dbcfb9eb5a29be15fff159be662 (commit)
       via  06369d42f7a4b486dd1023824d7584709d337f2a (commit)
       via  7bfc018dc713996e48c6db60cd78ce6490712720 (commit)
       via  f8073ceb48e0dc0248165127dd731840d6a7b3b9 (commit)
       via  d9d6454e9e8ac31c68e0dddcba14198e267ef686 (commit)
       via  30db9ee468bee6921c94c64033299eb84c6ab9da (commit)
       via  2eb057e3a033b34a20fd3c03115ece6938f75b0a (commit)
       via  1966b2b09940aa60f9f96553ef18860d4781d630 (commit)
       via  ce29969cced4f9bd78061c27ed3b97e66ba9dc60 (commit)
      from  a2240672cf62c7caea7b4d442f83d36b6c122ee7 (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 b4708d27c6a03dbcfb9eb5a29be15fff159be662
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 11 14:15:16 2016 +0200

    Factor out is_valid check into own function
    
    * src/mail.cpp (is_valid_sig): New. Helper to check
    validity.

diff --git a/src/mail.cpp b/src/mail.cpp
index 5098347..4e33c06 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -845,42 +845,20 @@ Mail::close_inspector ()
   return 0;
 }
 
-void
-Mail::update_categories ()
+static bool
+is_valid_sig (const VerificationResult &result, const char *sender)
 {
-  const auto dec_result = m_parser->decrypt_result();
-  const char *decCategory = _("GpgOL: Encrypted Message");
-  const char *verifyCategory = _("GpgOL: Verified Sender");
-  if (dec_result.numRecipients())
-    {
-      /* We use the number of recipients as we don't care
-         if decryption was successful or not for this category */
-      add_category (m_mailitem, decCategory);
-    }
-  else
-    {
-      /* As a small safeguard against fakes we remove our
-         categories */
-      remove_category (m_mailitem, decCategory);
-    }
-
-  const auto ver_result = m_parser->verify_result();
-  const char *sender = get_sender();
-
-  if (ver_result.error() || !sender)
+  if (result.error() || !sender)
     {
-      remove_category (m_mailitem, verifyCategory);
-      return;
+      return false;
     }
-
-  bool valid = false;
-  for (const auto sig: ver_result.signatures())
+  for (const auto sig: result.signatures())
     {
       if (sig.validity() != Signature::Validity::Marginal &&
           sig.validity() != Signature::Validity::Full &&
           sig.validity() != Signature::Validity::Ultimate)
         {
-          /* For our category we only care about full / ultimate. */
+          /* For our category we only care about trusted sigs. */
           continue;
         }
       Key k = sig.key();
@@ -891,24 +869,17 @@ Mail::update_categories ()
               TRACEPOINT;
               continue;
             }
-          char *normalized_uid = gpgme_addrspec_from_uid (uid.email());
-          char *normalized_sender = gpgme_addrspec_from_uid (sender);
-
-          log_debug ("%s:%s: comparing '%s' and '%s'",
-                     SRCNAME, __func__, normalized_uid, normalized_sender);
+          auto normalized_uid = uid.addrSpec();
+          auto normalized_sender = UserID::addrSpecFromString(sender);
 
-          if (!normalized_sender || !normalized_uid)
+          if (normalized_sender.empty() || normalized_uid.empty())
             {
               log_error ("%s:%s: normalizing '%s' or '%s' failed.",
                          SRCNAME, __func__, uid.email(), sender);
               continue;
             }
 
-          int result = strcmp(normalized_uid, normalized_sender);
-          gpgme_free (normalized_sender);
-          gpgme_free (normalized_uid);
-
-          if (!result)
+          if (normalized_sender == normalized_uid)
             {
               if (sig.validity() == Signature::Validity::Marginal)
                 {
@@ -926,12 +897,36 @@ Mail::update_categories ()
                 }
               log_debug ("%s:%s: Classified sender as verified",
                          SRCNAME, __func__);
-              valid = true;
-              break;
+              return true;
             }
         }
     }
-  if (valid)
+  return false;
+}
+
+void
+Mail::update_categories ()
+{
+  const auto dec_result = m_parser->decrypt_result();
+  const char *decCategory = _("GpgOL: Encrypted Message");
+  const char *verifyCategory = _("GpgOL: Verified Sender");
+  if (dec_result.numRecipients())
+    {
+      /* We use the number of recipients as we don't care
+         if decryption was successful or not for this category */
+      add_category (m_mailitem, decCategory);
+    }
+  else
+    {
+      /* As a small safeguard against fakes we remove our
+         categories */
+      remove_category (m_mailitem, decCategory);
+    }
+
+  const auto ver_result = m_parser->verify_result();
+  const char *sender = get_sender();
+
+  if (is_valid_sig (ver_result, sender))
     {
       add_category (m_mailitem, verifyCategory);
     }

commit 06369d42f7a4b486dd1023824d7584709d337f2a
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 11 13:47:58 2016 +0200

    Fix crash when mail is deleted while parsing
    
    * src/windowmessages.cpp (gpgol_window_proc): Make safeguard
    actually work.

diff --git a/src/windowmessages.cpp b/src/windowmessages.cpp
index c1d7a18..db7b243 100644
--- a/src/windowmessages.cpp
+++ b/src/windowmessages.cpp
@@ -67,6 +67,7 @@ gpgol_window_proc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
                 {
                   log_debug ("%s:%s: Parsing done for mail which is gone.",
                              SRCNAME, __func__);
+                  break;
                 }
               mail->parsing_done();
             }

commit 7bfc018dc713996e48c6db60cd78ce6490712720
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 11 13:37:05 2016 +0200

    Add categories for crypto status and use them
    
    * src/gpgoladdin.cpp (OnStartupComplete): Create categories.
    * src/mail.cpp (Mail::update_categories): New. Set up categories
    based on trust.
    * src/mail.cpp (Mail::parsing_done): Update categories.
    * src/parsecontroller.cpp (ParseController::parse): Cache
    Signature keys in background thread.
    
    --
    As we are already requiureing latest gpgme this also adds
    support for TOFU. A marginally trusted key with 10 or more
    signatures is shown as green.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 58d2a58..21cf950 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -331,6 +331,12 @@ GpgolAddin::OnStartupComplete (SAFEARRAY** custom)
                  SRCNAME, __func__);
     }
 
+  /* Set up categories */
+  const char *decCategory = _("GpgOL: Encrypted Message");
+  const char *verifyCategory = _("GpgOL: Verified Sender");
+  ensure_category_exists (m_application, decCategory, 8);
+  ensure_category_exists (m_application, verifyCategory, 5);
+
   if (m_application)
     {
       m_applicationEventSink = install_ApplicationEvents_sink(m_application);
diff --git a/src/mail.cpp b/src/mail.cpp
index c3016e8..5098347 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -33,10 +33,17 @@
 #include "gpgolstr.h"
 #include "windowmessages.h"
 
+#include <gpgme++/tofuinfo.h>
+#include <gpgme++/verificationresult.h>
+#include <gpgme++/decryptionresult.h>
+#include <gpgme++/key.h>
+
 #include <map>
 #include <vector>
 #include <memory>
 
+using namespace GpgME;
+
 static std::map<LPDISPATCH, Mail*> g_mail_map;
 
 #define COPYBUFSIZE (8 * 1024)
@@ -525,6 +532,9 @@ void
 Mail::parsing_done()
 {
   m_needs_wipe = true;
+  /* Set categories according to the result. */
+  update_categories();
+
   /* Update the body */
   update_body();
 
@@ -834,3 +844,100 @@ Mail::close_inspector ()
     }
   return 0;
 }
+
+void
+Mail::update_categories ()
+{
+  const auto dec_result = m_parser->decrypt_result();
+  const char *decCategory = _("GpgOL: Encrypted Message");
+  const char *verifyCategory = _("GpgOL: Verified Sender");
+  if (dec_result.numRecipients())
+    {
+      /* We use the number of recipients as we don't care
+         if decryption was successful or not for this category */
+      add_category (m_mailitem, decCategory);
+    }
+  else
+    {
+      /* As a small safeguard against fakes we remove our
+         categories */
+      remove_category (m_mailitem, decCategory);
+    }
+
+  const auto ver_result = m_parser->verify_result();
+  const char *sender = get_sender();
+
+  if (ver_result.error() || !sender)
+    {
+      remove_category (m_mailitem, verifyCategory);
+      return;
+    }
+
+  bool valid = false;
+  for (const auto sig: ver_result.signatures())
+    {
+      if (sig.validity() != Signature::Validity::Marginal &&
+          sig.validity() != Signature::Validity::Full &&
+          sig.validity() != Signature::Validity::Ultimate)
+        {
+          /* For our category we only care about full / ultimate. */
+          continue;
+        }
+      Key k = sig.key();
+      for (const auto uid: k.userIDs())
+        {
+          if (!uid.email())
+            {
+              TRACEPOINT;
+              continue;
+            }
+          char *normalized_uid = gpgme_addrspec_from_uid (uid.email());
+          char *normalized_sender = gpgme_addrspec_from_uid (sender);
+
+          log_debug ("%s:%s: comparing '%s' and '%s'",
+                     SRCNAME, __func__, normalized_uid, normalized_sender);
+
+          if (!normalized_sender || !normalized_uid)
+            {
+              log_error ("%s:%s: normalizing '%s' or '%s' failed.",
+                         SRCNAME, __func__, uid.email(), sender);
+              continue;
+            }
+
+          int result = strcmp(normalized_uid, normalized_sender);
+          gpgme_free (normalized_sender);
+          gpgme_free (normalized_uid);
+
+          if (!result)
+            {
+              if (sig.validity() == Signature::Validity::Marginal)
+                {
+                  const auto tofu = uid.tofuInfo();
+                  if (tofu.isNull() ||
+                      (tofu.validity() != TofuInfo::Validity::BasicHistory &&
+                       tofu.validity() != TofuInfo::Validity::LargeHistory))
+                    {
+                      /* Marginal is not good enough without tofu.
+                         We also wait for basic trust. */
+                      log_debug ("%s:%s: Discarding marginal signature.",
+                                 SRCNAME, __func__);
+                      continue;
+                    }
+                }
+              log_debug ("%s:%s: Classified sender as verified",
+                         SRCNAME, __func__);
+              valid = true;
+              break;
+            }
+        }
+    }
+  if (valid)
+    {
+      add_category (m_mailitem, verifyCategory);
+    }
+  else
+    {
+      remove_category (m_mailitem, verifyCategory);
+    }
+  return;
+}
diff --git a/src/mail.h b/src/mail.h
index af47f13..e76badd 100644
--- a/src/mail.h
+++ b/src/mail.h
@@ -195,6 +195,7 @@ public:
   */
   void parsing_done ();
 private:
+  void update_categories ();
   void update_body ();
 
   LPDISPATCH m_mailitem;
diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp
index 2235c30..cf4adab 100644
--- a/src/parsecontroller.cpp
+++ b/src/parsecontroller.cpp
@@ -26,6 +26,7 @@
 
 #include <gpgme++/context.h>
 #include <gpgme++/decryptionresult.h>
+#include <gpgme++/key.h>
 
 #include <sstream>
 
@@ -293,6 +294,13 @@ ParseController::parse()
        ss << m_decrypt_result << '\n' << m_verify_result;
        log_debug ("Decrypt / Verify result: %s", ss.str().c_str());
     }
+
+  /* Ensure that the Keys for the signatures are available */
+  for (const auto sig: m_verify_result.signatures())
+    {
+      sig.key(true, false);
+    }
+
   return;
 }
 

commit f8073ceb48e0dc0248165127dd731840d6a7b3b9
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 11 13:36:06 2016 +0200

    Add yet another way to lookup sender
    
    * src/mail.cpp (Mail::update_sender): Use SenderEmailAddress, too.

diff --git a/src/mail.cpp b/src/mail.cpp
index 8cf9af6..c3016e8 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -630,8 +630,25 @@ int
 Mail::update_sender ()
 {
   LPDISPATCH sender = NULL;
-  sender = get_oom_object (m_mailitem, "SendUsingAccount");
 
+  /* For some reason outlook my store the recipient address
+     in the send using account field. If we have SMTP we prefer
+     the SenderEmailAddress string. */
+  char *type = get_oom_string (m_mailitem, "SenderEmailType");
+  if (type && !strcmp ("SMTP", type))
+    {
+      xfree (type);
+      char *senderMail = get_oom_string (m_mailitem, "SenderEmailAddress");
+      if (senderMail)
+        {
+          xfree (m_sender);
+          m_sender = senderMail;
+          return 0;
+        }
+    }
+  xfree (type);
+
+  sender = get_oom_object (m_mailitem, "SendUsingAccount");
   xfree (m_sender);
   m_sender = NULL;
 

commit d9d6454e9e8ac31c68e0dddcba14198e267ef686
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 11 13:35:18 2016 +0200

    Clarify that placeholder is used for verify, too
    
    * src/mail.cpp (Mail::decrypt_verify): Update string.

diff --git a/src/mail.cpp b/src/mail.cpp
index ceea551..8cf9af6 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -451,7 +451,7 @@ Mail::decrypt_verify()
   if (gpgrt_asprintf (&placeholder_buf, decrypt_template,
                       is_smime() ? "S/MIME" : "OpenPGP",
                       _("Encrypted message"),
-                      _("Please wait while the message is being decrypted...")) == -1)
+                      _("Please wait while the message is being decrypted / verified...")) == -1)
     {
       log_error ("%s:%s: Failed to format placeholder.",
                  SRCNAME, __func__);

commit 30db9ee468bee6921c94c64033299eb84c6ab9da
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 11 13:29:29 2016 +0200

    Add safeground around parser start
    
    * src/mail.cpp (do_parsing): Safeguard against no parser.

diff --git a/src/mail.cpp b/src/mail.cpp
index dc5d21b..ceea551 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -414,11 +414,17 @@ add_attachments(LPDISPATCH mail,
 static DWORD WINAPI
 do_parsing (LPVOID arg)
 {
-  log_debug ("%s:%s: starting parsing for: %p",
+  log_debug ("%s:%s: starting the parser for: %p",
              SRCNAME, __func__, arg);
 
   Mail *mail = (Mail *)arg;
   auto parser = mail->parser();
+  if (!parser)
+    {
+      log_error ("%s:%s: no parser found for mail: %p",
+                 SRCNAME, __func__, arg);
+      return -1;
+    }
   parser->parse();
   do_in_ui_thread (PARSING_DONE, arg);
   return 0;

commit 2eb057e3a033b34a20fd3c03115ece6938f75b0a
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 11 13:28:48 2016 +0200

    Free sender string on Mail deletion
    
    * src/mail.cpp (Mail::~Mail): Free sender.

diff --git a/src/mail.cpp b/src/mail.cpp
index e4984c0..dc5d21b 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -114,6 +114,7 @@ Mail::~Mail()
       g_mail_map.erase (it);
     }
 
+  xfree (m_sender);
   gpgol_release(m_mailitem);
 }
 

commit 1966b2b09940aa60f9f96553ef18860d4781d630
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 11 13:25:38 2016 +0200

    Add category helpers to oomhelp
    
    * src/oomhelp.cpp (ensure_category_exists, create_category),
    (add_category, remove_category): New.
    * src/oomhelp.h: Update accordingly.

diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp
index 562582c..32c83f9 100644
--- a/src/oomhelp.cpp
+++ b/src/oomhelp.cpp
@@ -24,6 +24,7 @@
 
 #include <windows.h>
 #include <olectl.h>
+#include <string>
 
 #include "myexchext.h"
 #include "common.h"
@@ -1295,3 +1296,219 @@ get_oom_mapi_session ()
     }
   return session;
 }
+
+static int
+create_category (LPDISPATCH categories, const char *category, int color)
+{
+  VARIANT cVariant[3];
+  VARIANT rVariant;
+  DISPID dispid;
+  DISPPARAMS dispparams;
+  HRESULT hr;
+  EXCEPINFO execpinfo;
+  BSTR b_name;
+  wchar_t *w_name;
+  unsigned int argErr = 0;
+
+  init_excepinfo (&execpinfo);
+
+  if (!categories || !category)
+    {
+      TRACEPOINT;
+      return 1;
+    }
+
+  dispid = lookup_oom_dispid (categories, "Add");
+  if (dispid == DISPID_UNKNOWN)
+  {
+    log_error ("%s:%s: could not find Add DISPID",
+               SRCNAME, __func__);
+    return -1;
+  }
+
+  /* Do the string dance */
+  w_name = utf8_to_wchar (category);
+  b_name = SysAllocString (w_name);
+  xfree (w_name);
+
+  /* Variants are in reverse order
+     ShortcutKey -> 0 / Int
+     Color -> 1 / Int
+     Name -> 2 / Bstr */
+  VariantInit (&cVariant[2]);
+  cVariant[2].vt = VT_BSTR;
+  cVariant[2].bstrVal = b_name;
+
+  VariantInit (&cVariant[1]);
+  cVariant[1].vt = VT_INT;
+  cVariant[1].intVal = color;
+
+  VariantInit (&cVariant[0]);
+  cVariant[0].vt = VT_INT;
+  cVariant[0].intVal = 0;
+
+  dispparams.cArgs = 3;
+  dispparams.cNamedArgs = 0;
+  dispparams.rgvarg = cVariant;
+
+  hr = categories->Invoke (dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT,
+                           DISPATCH_METHOD, &dispparams,
+                           &rVariant, &execpinfo, &argErr);
+  SysFreeString (b_name);
+  VariantClear (&cVariant[0]);
+  VariantClear (&cVariant[1]);
+  VariantClear (&cVariant[2]);
+  if (hr != S_OK)
+    {
+      log_debug ("%s:%s: error: invoking Add p=%p vt=%d"
+                 " hr=0x%x argErr=0x%x",
+                 SRCNAME, __func__,
+                 rVariant.pdispVal, rVariant.vt, (unsigned int)hr,
+                 (unsigned int)argErr);
+      dump_excepinfo (execpinfo);
+      VariantClear (&rVariant);
+      return -1;
+    }
+  VariantClear (&rVariant);
+  log_debug ("%s:%s: Created category '%s'",
+             SRCNAME, __func__, category);
+  return 0;
+}
+
+void
+ensure_category_exists (LPDISPATCH application, const char *category, int color)
+{
+  if (!application || !category)
+    {
+      TRACEPOINT;
+      return;
+    }
+
+  log_debug ("Ensure category exists called for %s, %i", category, color);
+
+  LPDISPATCH stores = get_oom_object (application, "Session.Stores");
+  if (!stores)
+    {
+      log_error ("%s:%s: No stores found.",
+                 SRCNAME, __func__);
+      return;
+    }
+  auto store_count = get_oom_int (stores, "Count");
+
+  for (int n = 1; n <= store_count; n++)
+    {
+      const auto store_str = std::string("Item(") + std::to_string(n) + ")";
+      LPDISPATCH store = get_oom_object (stores, store_str.c_str());
+
+      if (!store)
+        {
+          TRACEPOINT;
+          continue;
+        }
+
+      LPDISPATCH categories = get_oom_object (store, "Categories");
+      gpgol_release (store);
+      if (!categories)
+        {
+          TRACEPOINT;
+          continue;
+        }
+
+      auto count = get_oom_int (categories, "Count");
+      bool found = false;
+      for (int i = 1; i <= count && !found; i++)
+        {
+          const auto item_str = std::string("Item(") + std::to_string(i) + ")";
+          LPDISPATCH category_obj = get_oom_object (categories, item_str.c_str());
+          if (!category_obj)
+            {
+              TRACEPOINT;
+              break;
+            }
+          char *name = get_oom_string (category_obj, "Name");
+          if (name && !strcmp (category, name))
+            {
+              log_debug ("%s:%s: Found category '%s'",
+                         SRCNAME, __func__, name);
+              found = true;
+            }
+          /* We don't check the color here as the user may change that. */
+          gpgol_release (category_obj);
+          xfree (name);
+        }
+
+      if (!found)
+        {
+          if (create_category (categories, category, color))
+            {
+              log_debug ("%s:%s: Found category '%s'",
+                         SRCNAME, __func__, category);
+            }
+        }
+      /* Otherwise we have to create the category */
+      gpgol_release (categories);
+    }
+  gpgol_release (stores);
+}
+
+int
+add_category (LPDISPATCH mail, const char *category)
+{
+  char *tmp = get_oom_string (mail, "Categories");
+  if (!tmp)
+    {
+      TRACEPOINT;
+      return 1;
+    }
+
+  if (strstr (tmp, category))
+    {
+      log_debug ("%s:%s: category '%s' already added.",
+                 SRCNAME, __func__, category);
+      return 0;
+    }
+
+  std::string newstr (tmp);
+  xfree (tmp);
+  if (!newstr.empty ())
+    {
+      newstr += ", ";
+    }
+  newstr += category;
+
+  return put_oom_string (mail, "Categories", newstr.c_str ());
+}
+
+int
+remove_category (LPDISPATCH mail, const char *category)
+{
+  char *tmp = get_oom_string (mail, "Categories");
+  if (!tmp)
+    {
+      TRACEPOINT;
+      return 1;
+    }
+  std::string newstr (tmp);
+  xfree (tmp);
+  std::string cat (category);
+
+  size_t pos1 = newstr.find (cat);
+  size_t pos2 = newstr.find (std::string(", ") + cat);
+  if (pos1 == std::string::npos && pos2 == std::string::npos)
+    {
+      log_debug ("%s:%s: category '%s' not found.",
+                 SRCNAME, __func__, category);
+      return 0;
+    }
+
+  size_t len = cat.size();
+  if (pos2)
+    {
+      len += 2;
+    }
+  newstr.erase (pos2 != std::string::npos ? pos2 : pos1, len);
+  log_debug ("%s:%s: removing category '%s'",
+             SRCNAME, __func__, category);
+
+  return put_oom_string (mail, "Categories", newstr.c_str ());
+}
diff --git a/src/oomhelp.h b/src/oomhelp.h
index 0859d17..65a489f 100644
--- a/src/oomhelp.h
+++ b/src/oomhelp.h
@@ -233,6 +233,24 @@ invoke_oom_method (LPDISPATCH pDisp, const char *name, VARIANT *rVariant);
 LPMAPISESSION
 get_oom_mapi_session (void);
 
+/* Ensure a category of the name name exists in
+  the session for the Mail mail.
+
+  Creates the category with the specified color if required.
+
+  returns 0 on success. */
+void
+ensure_category_exists (LPDISPATCH mail, const char *category, int color);
+
+/* Add a category to a mail if it is not already added. */
+int
+add_category (LPDISPATCH mail, const char *category);
+
+/* Remove a category from a mail if it was added. */
+int
+remove_category (LPDISPATCH mail, const char *category);
+
+
 #ifdef __cplusplus
 }
 #endif

commit ce29969cced4f9bd78061c27ed3b97e66ba9dc60
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Oct 11 13:19:33 2016 +0200

    Define _FILE_OFFSET_BITS for gpgme data compat
    
    * src/Makefile.am (AM_CXXFLAGS): Add file offset bits.

diff --git a/src/Makefile.am b/src/Makefile.am
index 96207d8..8613260 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,7 +34,7 @@ EXEEXT = .dll
 
 AM_CFLAGS = $(GPGME_CFLAGS) $(LIBASSUAN_CFLAGS) -shared
 AM_CXXFLAGS = $(GPGME_CFLAGS) $(LIBASSUAN_CFLAGS) -shared -std=c++11
-AM_CXXFLAGS += $(GPGMEPP_CXXFLAGS)
+AM_CXXFLAGS += $(GPGMEPP_CXXFLAGS) -D_FILE_OFFSET_BITS=64
 
 gpgol_SOURCES = \
 	main.c  gpgol.def           \

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

Summary of changes:
 src/Makefile.am         |   2 +-
 src/gpgoladdin.cpp      |   6 ++
 src/mail.cpp            | 132 ++++++++++++++++++++++++++++-
 src/mail.h              |   1 +
 src/oomhelp.cpp         | 217 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/oomhelp.h           |  18 ++++
 src/parsecontroller.cpp |   8 ++
 src/windowmessages.cpp  |   1 +
 8 files changed, 381 insertions(+), 4 deletions(-)


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




More information about the Gnupg-commits mailing list