[git] GpgOL - branch, master, updated. gpgol-2.0.6-84-g8f1e092

by Andre Heinecke cvs at cvs.gnupg.org
Wed Mar 7 13:36:29 CET 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  8f1e092ad3d711878f8f569877ec7e0eb0860337 (commit)
       via  2dba229712ba521c30e8a5ad1d208509eb287a26 (commit)
       via  76e5456dc1f17d60d6a22f718b8197842759fa26 (commit)
       via  4e96a74833e5b644b5d36b0d11526e524abe21bd (commit)
      from  18db01ed4915a38622c90c81d16f1b7e812c3917 (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 8f1e092ad3d711878f8f569877ec7e0eb0860337
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Mar 7 13:36:07 2018 +0100

    Bump Version to 2.1.0 and update NEWS
    
    --

diff --git a/NEWS b/NEWS
index c885f95..c773c0b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,14 @@
-Noteworthy changes for version 2.0.7 (unreleased)
+Noteworthy changes for version 2.1.0 (unreleased)
 =================================================
 
+ * Encryption and Signing has been reworked to, again,
+ work without Kleopatra.
+
+ * WKS Setup is supported in a basic way.
+
+ * PGP/Inline is now fully supported.
+
+ * Many Bugfixes and Parser improvements.
 
 
 Noteworthy changes for version 2.0.6 (2018-01-12)
diff --git a/configure.ac b/configure.ac
index 009860d..7fb6a92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ min_automake_version="1.14"
 # (git tag -s gpgol-k.n.m) and run "./autogen.sh --force".  Please
 # bump the version number immediately *after* the release and do
 # another commit and push so that the git magic is able to work.
-m4_define([mym4_version], [2.0.7])
+m4_define([mym4_version], [2.1.0])
 
 # Below is m4 magic to extract and compute the git revision number,
 # the decimalized short revision number, a beta version string and a

commit 2dba229712ba521c30e8a5ad1d208509eb287a26
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Mar 7 13:33:01 2018 +0100

    Fix protocol selection for autoresolve
    
    * src/cryptcontroller.cpp (CryptController::resolve_keys_cached):
    Handle Protocol.

diff --git a/src/cryptcontroller.cpp b/src/cryptcontroller.cpp
index 269ca96..da23de4 100644
--- a/src/cryptcontroller.cpp
+++ b/src/cryptcontroller.cpp
@@ -303,16 +303,19 @@ CryptController::resolve_keys_cached()
   if (m_encrypt)
     {
       m_recipients = cache->getEncryptionKeys((const char **)m_recipient_addrs, GpgME::OpenPGP);
+      m_proto = GpgME::OpenPGP;
 
       if (m_recipients.empty() && opt.enable_smime)
         {
           m_recipients = cache->getEncryptionKeys((const char **)m_recipient_addrs, GpgME::CMS);
           fallbackToSMIME = true;
+          m_proto = GpgME::CMS;
         }
       if (m_recipients.empty())
         {
           log_debug ("%s:%s: Failed to resolve keys through cache",
                      SRCNAME, __func__);
+          m_proto = GpgME::UnknownProtocol;
           return 1;
         }
     }
@@ -323,17 +326,20 @@ CryptController::resolve_keys_cached()
         {
           m_signer_key = cache->getSigningKey (m_mail->get_cached_sender ().c_str (),
                                                GpgME::OpenPGP);
+          m_proto = GpgME::OpenPGP;
         }
       if (m_signer_key.isNull() && opt.enable_smime)
         {
           m_signer_key = cache->getSigningKey (m_mail->get_cached_sender ().c_str (),
                                                GpgME::CMS);
+          m_proto = GpgME::CMS;
         }
       if (m_signer_key.isNull())
         {
           log_debug ("%s:%s: Failed to resolve signer key through cache",
                      SRCNAME, __func__);
           m_recipients.clear();
+          m_proto = GpgME::UnknownProtocol;
           return 1;
         }
     }

commit 76e5456dc1f17d60d6a22f718b8197842759fa26
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Mar 7 13:31:54 2018 +0100

    Improve error handling and fix encoding
    
    * src/cryptcontroller.cpp: Take care that command line
    args are not encoded to utf8.
    * src/mail.cpp (do_crypt): Inform user when crypto failed.

diff --git a/src/cryptcontroller.cpp b/src/cryptcontroller.cpp
index be4f7fb..269ca96 100644
--- a/src/cryptcontroller.cpp
+++ b/src/cryptcontroller.cpp
@@ -34,14 +34,7 @@
 #include <gpgme++/signingresult.h>
 #include <gpgme++/encryptionresult.h>
 
-#ifdef HAVE_W32_SYSTEM
 #include "common.h"
-/* We use UTF-8 internally. */
-#undef _
-# define _(a) utf8_gettext (a)
-#else
-# define _(a) a
-#endif
 
 #include <sstream>
 
@@ -286,9 +279,9 @@ CryptController::parse_output (GpgME::Data &resolverOutput)
 
   if (m_sign && sigFpr.empty())
     {
-      log_error ("%s:%s: Sign requested but no signing fingerprint",
+      log_error ("%s:%s: Sign requested but no signing fingerprint - sending unsigned",
                  SRCNAME, __func__);
-      return -1;
+      m_sign = false;
     }
   if (m_encrypt && !recpFprs.size())
     {
@@ -487,7 +480,8 @@ CryptController::resolve_keys ()
                  SRCNAME, __func__, err.code(), err.asString());
     }
 
-  if (parse_output (mystdout))
+  int ret = parse_output (mystdout);
+  if (ret == -1)
     {
       log_debug ("%s:%s: Failed to parse / resolve keys.",
                  SRCNAME, __func__);
@@ -496,7 +490,7 @@ CryptController::resolve_keys ()
       return -1;
     }
 
-  return 0;
+  return ret;
 }
 
 int
@@ -508,10 +502,20 @@ CryptController::do_crypto ()
   /* Start a WKS check if necessary. */
   WKSHelper::instance()->start_check (m_mail->get_cached_sender ());
 
-  if (resolve_keys ())
+  int ret = resolve_keys ();
+  if (ret == -1)
     {
+      //error
       log_debug ("%s:%s: Failure to resolve keys.",
                  SRCNAME, __func__);
+      gpgol_message_box (nullptr,
+                         utf8_gettext ("Failure to resolve keys."),
+                         utf8_gettext ("GpgOL"), MB_OK);
+      return ret;
+    }
+  if (ret == -2)
+    {
+      // Cancel
       return -2;
     }
 
@@ -529,6 +533,9 @@ CryptController::do_crypto ()
     {
       log_error ("%s:%s: Failure to create context.",
                  SRCNAME, __func__);
+      gpgol_message_box (nullptr,
+                         "Failure to create context.",
+                         utf8_gettext ("GpgOL"), MB_OK);
       return -1;
     }
   if (!m_signer_key.isNull())
@@ -995,7 +1002,7 @@ CryptController::start_crypto_overlay ()
     }
   else if (m_sign)
     {
-      text =_("Signing...");
+      text = _("Signing...");
     }
   m_overlay = std::unique_ptr<Overlay> (new Overlay (wid, text));
 }
diff --git a/src/mail.cpp b/src/mail.cpp
index 34ef2a1..7d30895 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -738,6 +738,12 @@ do_crypt (LPVOID arg)
 
   mail->set_window_enabled (true);
 
+  if (rc == -1)
+    {
+      gpgol_message_box (nullptr,
+                         "Crypto failed",
+                         _("GpgOL"), MB_OK);
+    }
   if (rc)
     {
       log_debug ("%s:%s: crypto failed for: %p with: %i",

commit 4e96a74833e5b644b5d36b0d11526e524abe21bd
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Mar 7 13:30:14 2018 +0100

    Fix deadlock in Outlook 2010
    
    * src/mail.cpp (do_crypt): In Outlook 2010 sending destroys
    the Mail. So we may not hold the dtor lock for the send call.

diff --git a/src/mail.cpp b/src/mail.cpp
index aba08d3..34ef2a1 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -751,6 +751,8 @@ do_crypt (LPVOID arg)
   if (!mail->is_inline_response ())
     {
       mail->set_crypt_state (Mail::NeedsUpdateInOOM);
+      gpgrt_lock_unlock (&dtor_lock);
+      // This deletes the Mail in Outlook 2010
       do_in_ui_thread (CRYPTO_DONE, arg);
     }
   else
@@ -758,6 +760,7 @@ do_crypt (LPVOID arg)
       mail->set_crypt_state (Mail::NeedsUpdateInMAPI);
       mail->update_crypt_mapi ();
       mail->set_crypt_state (Mail::NeedsUpdateInOOM);
+      gpgrt_lock_unlock (&dtor_lock);
     }
   /* This works around a bug in pinentry that it might
      bring the wrong window to front. So after encryption /
@@ -766,7 +769,6 @@ do_crypt (LPVOID arg)
      See GnuPG-Bug-Id: T3732
      */
   do_in_ui_thread_async (BRING_TO_FRONT, nullptr);
-  gpgrt_lock_unlock (&dtor_lock);
   return 0;
 }
 

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

Summary of changes:
 NEWS                    | 10 +++++++++-
 configure.ac            |  2 +-
 src/cryptcontroller.cpp | 39 ++++++++++++++++++++++++++-------------
 src/mail.cpp            | 10 +++++++++-
 4 files changed, 45 insertions(+), 16 deletions(-)


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




More information about the Gnupg-commits mailing list