[git] GpgOL - branch, master, updated. gpgol-1.2.0-101-g4df4e26
by Andre Heinecke
cvs at cvs.gnupg.org
Thu Nov 12 17:40:08 CET 2015
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 4df4e26146ec45ea31c457f8ae124e11a0b42088 (commit)
from e8259773872cdc10cb29b539e6c6de435065d4f4 (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 4df4e26146ec45ea31c457f8ae124e11a0b42088
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Thu Nov 12 17:36:21 2015 +0100
Add workaround for opaque signed encrypted data
* src/ribbon-callbacks.cpp (do_reader_action): Only use the
mime handling when there is no "BEGIN PGP MESSAGE" in body.
--
The sign verify split of the old addon allowed you to first
opaque sign a message, then encrypt it. The mime code now
only detects the encryption as this is a standard thing. The
signature is not verified as it is treated as just another plaintext.
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index e9182fe..8414f83 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -48,6 +48,8 @@
#include "gpgolstr.h"
#include "message.h"
+#define OPAQUE_SIGNED_MARKER "-----BEGIN PGP MESSAGE-----"
+
/* Gets the context of a ribbon control. And prints some
useful debug output */
HRESULT getContext (LPDISPATCH ctrl, LPDISPATCH *context)
@@ -674,23 +676,6 @@ do_reader_action (LPDISPATCH ctrl, int flags)
}
}
- if (verify_mime (mailItem))
- {
- log_debug ("%s:%s: This was a mime message.",
- SRCNAME, __func__);
-
- if (flags & OP_DECRYPT)
- {
- MessageBox (NULL,
- "This message is in MIME format. Due to technical restrictions "
- "it can only be decrypted once per session. To decrypt it again "
- "please restart Outlook and open the message.",
- _("GpgOL"),
- MB_ICONINFORMATION|MB_OK);
- }
- goto failure;
- }
-
if (flags & DATA_SELECTION)
{
encData = get_oom_string (selection, "Text");
@@ -720,6 +705,27 @@ do_reader_action (LPDISPATCH ctrl, int flags)
fix_linebreaks (encData, &encDataLen);
+ /* We check if the data we work on was opaque signed. This is
+ true for signed stuff created by ribbon-callbacks and not a
+ decent MIME implementation. So in that case we don't use
+ verify_mime */
+ if (!strstr (encData, OPAQUE_SIGNED_MARKER) && verify_mime (mailItem))
+ {
+ log_debug ("%s:%s: This was a mime message.",
+ SRCNAME, __func__);
+
+ if (flags & OP_DECRYPT)
+ {
+ MessageBox (NULL,
+ "This message is in MIME format. Due to technical restrictions "
+ "it can only be decrypted once per session. To decrypt it again "
+ "please restart Outlook and open the message.",
+ _("GpgOL"),
+ MB_ICONINFORMATION|MB_OK);
+ }
+ goto failure;
+ }
+
subject = get_oom_string (mailItem, "Subject");
if (get_oom_bool (mailItem, "Sent"))
{
-----------------------------------------------------------------------
Summary of changes:
src/ribbon-callbacks.cpp | 40 +++++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 17 deletions(-)
hooks/post-receive
--
GnuPG extension for MS Outlook
http://git.gnupg.org
More information about the Gnupg-commits
mailing list