[git] GpgOL - branch, master, updated. gpgol-1.4.0-197-g1bc698e

by Andre Heinecke cvs at cvs.gnupg.org
Thu Dec 1 15:49:52 CET 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, master has been updated
       via  1bc698e7d222120abf87e103771551c2d374ed2b (commit)
       via  ad40a5e502f1ea8e01d72fdeb114a44d50415d3c (commit)
       via  dc078f53bc6a837d5a942d1e2a26251ccae45c9a (commit)
       via  ab0d0ea2f913e1648cd3be83bd05cb139e3f2230 (commit)
       via  e275102e683e648f41aee0ffc29c8ffeb848df74 (commit)
      from  fd987b7b5500506515b0a9913d9fa304ff35ad6c (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 1bc698e7d222120abf87e103771551c2d374ed2b
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Dec 1 15:48:12 2016 +0100

    Change wording in signature details
    
    * src/mail.cpp (Mail::get_signature_status): Change wording.
    * src/ribbon-callbacks.cpp (get_sig_label): Use trust instead
    verified.
    
    --
    Trusted Sender is still very easygoing but we now have a better
    distinction between fully trusted and marginally trusted.

diff --git a/src/mail.cpp b/src/mail.cpp
index 31076c6..1882ea0 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -1414,23 +1414,27 @@ Mail::get_signature_status()
 
   const auto pair = get_valid_sig ();
   bool keyFound = false;
-  char *buf;
   bool isOpenPGP = pair.first.key().protocol() == Protocol::OpenPGP;
+  char *buf;
+  bool hasConflict = false;
   if (!pair.first.isNull () && !pair.second.isNull ())
     {
       const auto sig = pair.first;
       const auto uid = pair.second;
       /* We are valid */
       keyFound = true;
-      gpgrt_asprintf (&buf, _("The sender is verified because:\n\n%s %s"),
-                      isOpenPGP ? _("The used key") : _(" The used certificate"),
-                      sig.validity() == Signature::Validity::Ultimate ?
+      message += _("The sender address is trusted because:");
+      message += "\n\n";
+      message += isOpenPGP ? _("The used key") : _("The used certificate");
+      message += " ";
+      message += sig.validity() == Signature::Validity::Ultimate ?
                       _("is marked as your own.") :
+                      sig.validity() == Signature::Validity::Full && isOpenPGP &&
+                      uid.tofuInfo().policy() == TofuInfo::PolicyGood ?
+                      _("was marked to be the right key for this address") :
                       sig.validity() == Signature::Validity::Full && isOpenPGP ?
-                      _("was certified by enough trusted keys.") :
-                      "");
-      message += buf;
-      xfree (buf);
+                      _("was certified by enough trusted keys or yourself.") :
+                      "";
       if (sig.validity() == Signature::Validity::Full && !isOpenPGP)
         {
           gpgrt_asprintf (&buf, _("is cerified by the trusted issuer:\n'%s'\n"),
@@ -1441,7 +1445,9 @@ Mail::get_signature_status()
       else if (sig.validity() == Signature::Validity::Marginal)
         {
           char *time = format_date_from_gpgme (uid.tofuInfo().signFirst());
-          gpgrt_asprintf (&buf, _("was consistently used for %i messages since %s."),
+          /* i18n note signcount is always pulral because with signcount 1 we
+           * would not be in this branch. */
+          gpgrt_asprintf (&buf, _("was used for %i messages since %s."),
                           uid.tofuInfo().signCount (), time);
           xfree (time);
           message += buf;
@@ -1457,15 +1463,17 @@ Mail::get_signature_status()
         }
       /* We only handle the first signature. */
       const auto sig = m_verify_result.signature (0);
-      isOpenPGP = sig.key().protocol() == Protocol::OpenPGP;
+      isOpenPGP = !is_smime();
       keyFound = !(sig.summary() & Signature::Summary::KeyMissing);
 
       log_debug ("%s:%s: Formatting sig. Validity: %x Summary: %x",
                  SRCNAME, __func__, sig.validity(), sig.summary());
 
       /* There is a signature but we don't accepted it as fully valid. */
-      message += _("The sender is not verified because:\n\n");
+      message += _("The sender address is not trusted because:");
+      message += "\n\n";
 
+      bool general_problem = true;
       /* First the general stuff. */
       if (sig.summary() & Signature::Summary::Red)
         {
@@ -1484,15 +1492,16 @@ Mail::get_signature_status()
         }
       else
         {
-          message += isOpenPGP ? _("The used key") : _("The used certificate")
-                  + std::string(" ");
+          message += isOpenPGP ? _("The used key") : _("The used certificate");
+          message += " ";
+          general_problem = false;
         }
 
       const auto uid = get_uid_for_sender (sig.key(), get_sender().c_str());
       /* Now the key problems */
       if ((sig.summary() & Signature::Summary::KeyMissing))
         {
-          message += _("is not in your keyring.");
+          message += _("is not available for verification.");
         }
       else if ((sig.summary() & Signature::Summary::KeyRevoked))
         {
@@ -1514,9 +1523,11 @@ Mail::get_signature_status()
         {
           message += _("could not be checked for revocation.");
         }
-      else if ((sig.summary() & Signature::Summary::TofuConflict))
+      else if ((sig.summary() & Signature::Summary::TofuConflict) ||
+               uid.tofuInfo().validity() == TofuInfo::Conflict)
         {
           message += _("conflicts with another key that was used in the past by the sender.");
+          hasConflict = true;
         }
       else if (uid.isNull())
         {
@@ -1532,18 +1543,25 @@ Mail::get_signature_status()
             {
               message += _("is not certified by enough trusted keys.");
             }
+          else if (tofuInfo.signCount() == 1)
+            {
+              message += _("is seen for the first time.");
+            }
           else
             {
-              message += _("does not have enough history for basic trust.");
+              gpgrt_asprintf (&buf, "was only used for %i messages.",
+                              tofuInfo.signCount());
+              message += buf;
+              xfree (buf);
             }
         }
-      else if ((sig.validity() & Signature::Validity::Undefined) ||
+      else if (((sig.validity() & Signature::Validity::Undefined) ||
                (sig.validity() & Signature::Validity::Unknown) ||
                (sig.summary() == Signature::Summary::None) ||
-               (sig.validity() == 0))
+               (sig.validity() == 0))&& !general_problem)
         {
            /* Bit of a catch all for weird results. */
-           message += _("is not certified by any trusted key.");
+          message += _("is not certified by any trusted key.");
         }
       else if ((sig.validity() & Signature::Validity::Never))
         {
@@ -1551,10 +1569,14 @@ Mail::get_signature_status()
         }
     }
   message += "\n\n";
-  if (keyFound)
+  if (hasConflict)
+    {
+      message += _("Click here to resolve the conflict.");
+    }
+  else if (keyFound)
     {
       message +=  isOpenPGP ? _("Click here for details about the key.") :
-                              _("Click here for details about the key.");
+                              _("Click here for details about the certificate.");
     }
   else
     {
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 596d74f..5930775 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -1528,11 +1528,11 @@ HRESULT get_sig_label (LPDISPATCH ctrl, VARIANT *result)
     }
   if (mail && mail->is_valid_sig ())
     {
-      w_result = utf8_to_wchar (_("Verified Sender"));
+      w_result = utf8_to_wchar (_("Trusted Address"));
     }
   else
     {
-      w_result = utf8_to_wchar (_("Unverified Sender"));
+      w_result = utf8_to_wchar (_("Untrusted Address"));
     }
   result->bstrVal = SysAllocString (w_result);
   xfree (w_result);

commit ad40a5e502f1ea8e01d72fdeb114a44d50415d3c
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Dec 1 15:47:30 2016 +0100

    Log if a uid was skipped because of no email
    
    * src/mail.cpp (get_uid_for_sender): Log if mail is null.

diff --git a/src/mail.cpp b/src/mail.cpp
index 9a21687..31076c6 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -1181,6 +1181,8 @@ get_uid_for_sender (const Key k, const char *sender)
     {
       if (!uid.email())
         {
+          log_error ("%s:%s: skipping uid without email.",
+                     SRCNAME, __func__);
           continue;
         }
       auto normalized_uid = uid.addrSpec();

commit dc078f53bc6a837d5a942d1e2a26251ccae45c9a
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Dec 1 15:45:36 2016 +0100

    Change valid category to Trusted Sender Address
    
    * src/gpgoladdin.cpp (GpgolAddin::OnStartupComplete): Change
    category name.
    (Mail::remove_categories, Mail::update_categories): Use new
    name.
    
    --
    Verified Sender was too strong, we now relate to the
    address.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index fda79a5..d291ab4 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -442,7 +442,7 @@ GpgolAddin::OnStartupComplete (SAFEARRAY** custom)
 
   /* Set up categories */
   const char *decCategory = _("GpgOL: Encrypted Message");
-  const char *verifyCategory = _("GpgOL: Verified Sender");
+  const char *verifyCategory = _("GpgOL: Trusted Sender Address");
   ensure_category_exists (m_application, decCategory, 8);
   ensure_category_exists (m_application, verifyCategory, 5);
   install_forms ();
diff --git a/src/mail.cpp b/src/mail.cpp
index c113b2d..9a21687 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -1297,7 +1297,7 @@ void
 Mail::remove_categories ()
 {
   const char *decCategory = _("GpgOL: Encrypted Message");
-  const char *verifyCategory = _("GpgOL: Verified Sender");
+  const char *verifyCategory = _("GpgOL: Trusted Sender Address");
   remove_category (m_mailitem, decCategory);
   remove_category (m_mailitem, verifyCategory);
 }
@@ -1306,7 +1306,7 @@ void
 Mail::update_categories ()
 {
   const char *decCategory = _("GpgOL: Encrypted Message");
-  const char *verifyCategory = _("GpgOL: Verified Sender");
+  const char *verifyCategory = _("GpgOL: Trusted Sender Address");
   if (m_decrypt_result.numRecipients())
     {
       /* We use the number of recipients as we don't care

commit ab0d0ea2f913e1648cd3be83bd05cb139e3f2230
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Dec 1 15:44:17 2016 +0100

    Enable clearsigned support again for reading
    
    * src/mapihelp.cpp (get_msgcls_from_pgp_lines): Enable clearsigned
    support.
    
    --
    I just forgot that this was disabled. We can support this now.

diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
index de325c5..8b0c45a 100644
--- a/src/mapihelp.cpp
+++ b/src/mapihelp.cpp
@@ -698,8 +698,7 @@ get_msgcls_from_pgp_lines (LPMESSAGE message)
         {
           /* Enabling clearsigned detection for Outlook 2010 and later
              would result in data loss as the signature is not reverted. */
-          if (g_ol_version_major < 14
-              && !strncmp (p+15, "SIGNED MESSAGE-----", 19)
+          if (!strncmp (p+15, "SIGNED MESSAGE-----", 19)
               && trailing_ws_p (p+15+19))
             msgcls = xstrdup ("IPM.Note.GpgOL.ClearSigned");
           else if (!strncmp (p+15, "MESSAGE-----", 12)

commit e275102e683e648f41aee0ffc29c8ffeb848df74
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Dec 1 15:42:32 2016 +0100

    Add yellow checker for basic / marginal trust
    
    * src/dialogs.h, src/dialogs.rc: Update accordingly.
    * src/icons/emblem-success-yellow.svg,
    src/icons/emblem-success-yellow-64.png: New.
    * src/icons/Makefile.am (EXTRA_DIST): Add new icon and
    svg icons.
    * srC/mail.cpp (Mail::get_signature_icon_id): Use it.

diff --git a/src/dialogs.h b/src/dialogs.h
index daf8873..8e57468 100644
--- a/src/dialogs.h
+++ b/src/dialogs.h
@@ -118,5 +118,6 @@
 #define IDI_EMBLEM_SUCCESS_64_PNG       0x6072
 #define IDI_EMBLEM_INFORMATION_64_PNG   0x6073
 #define IDI_EMBLEM_QUESTION_64_PNG      0x6074
+#define IDI_EMBLEM_SUCCESS_YELLOW_64_PNG 0x6075
 
 #endif /*DIALOGS_H*/
diff --git a/src/dialogs.rc b/src/dialogs.rc
index 359169d..c20cb43 100644
--- a/src/dialogs.rc
+++ b/src/dialogs.rc
@@ -54,6 +54,7 @@ IDI_ENCSIGN_FILE_48_PNG   RCDATA               "icons/encrypt-sign-file-48.png"
 
 IDI_EMBLEM_WARNING_64_PNG RCDATA               "icons/emblem-warning-64.png"
 IDI_EMBLEM_SUCCESS_64_PNG RCDATA               "icons/emblem-success-64.png"
+IDI_EMBLEM_SUCCESS_YELLOW_64_PNG RCDATA        "icons/emblem-success-yellow-64.png"
 IDI_EMBLEM_INFORMATION_64_PNG RCDATA           "icons/emblem-information-64.png"
 IDI_EMBLEM_QUESTION_64_PNG RCDATA              "icons/emblem-question-64.png"
 
diff --git a/src/icons/Makefile.am b/src/icons/Makefile.am
index cfe1261..6f06833 100644
--- a/src/icons/Makefile.am
+++ b/src/icons/Makefile.am
@@ -26,4 +26,9 @@ EXTRA_DIST= \
     emblem-question-64.png \
     emblem-warning-64.png \
     emblem-success-64.png \
-    emblem-information-64.png
+    emblem-information-64.png \
+    emblem-success-yellow-64.png \
+    emblem-question.svg \
+    emblem-warning.svg \
+    emblem-information.svg \
+    emblem-success-yellow.svg
diff --git a/src/icons/emblem-success-yellow.svg b/src/icons/emblem-success-yellow.svg
new file mode 100644
index 0000000..563d047
--- /dev/null
+++ b/src/icons/emblem-success-yellow.svg
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   viewBox="0 0 8 8"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   width="100%"
+   height="100%"
+   sodipodi:docname="emblem-success.svg">
+  <metadata
+     id="metadata12">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1060"
+     id="namedview10"
+     showgrid="false"
+     inkscape:zoom="29.5"
+     inkscape:cx="4"
+     inkscape:cy="4.0169492"
+     inkscape:window-x="-2"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg2" />
+  <defs
+     id="defs3051">
+    <style
+       type="text/css"
+       id="current-color-scheme">
+      .ColorScheme-PositiveText {
+        color:#27ae60;
+      }
+      </style>
+  </defs>
+  <path
+     style="fill:currentColor;fill-opacity:1;stroke:none"
+     class="ColorScheme-PositiveText"
+     d="M 4 0 C 1.784 0 0 1.784 0 4 C 0 6.216 1.784 8 4 8 C 6.216 8 8 6.216 8 4 C 8 1.784 6.216 0 4 0 z "
+     id="path6" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;stroke:none"
+     d="M 6 2 L 3 5 L 2 4 L 1 5 L 2 6 L 3 7 L 7 3 L 6 2 z "
+     id="path8" />
+  <path
+     style="fill:#ffd42a;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0.03389831000000000;stroke-opacity:1"
+     d="M 3.3232154,7.9242607 C 1.7484941,7.6251271 0.55453708,6.5163227 0.13835987,4.9665485 0.05799792,4.6672939 0.04884008,4.5726417 0.0471396,4.0237288 0.0451555,3.3832678 0.08992259,3.0957175 0.26471592,2.6261812 0.89372244,0.93652085 2.5766492,-0.12563207 4.3576271,0.04300418 5.1376464,0.11686222 5.7769136,0.36446515 6.4033722,0.83536851 8.1559719,2.1527823 8.4949549,4.6703692 7.1555471,6.4216864 6.6061339,7.1400614 5.8250061,7.6445356 4.9084746,7.8729092 4.5347946,7.9660197 3.6875275,7.9934651 3.3232154,7.9242607 l 0,0 z M 6.5186969,2.4814089 6.0107349,1.9725985 4.5104525,3.4725966 3.0101703,4.9725949 2.5104404,4.4728651 2.0107105,3.9731349 1.4933899,4.4896481 0.97606936,5.006161 1.9845212,6.0150332 2.9929729,7.0239054 5.0098159,5.0070624 7.026659,2.9902192 6.5186969,2.4814089 z"
+     id="path2989"
+     inkscape:connector-curvature="0" />
+</svg>
diff --git a/src/mail.cpp b/src/mail.cpp
index 950acd3..c113b2d 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -1569,18 +1569,25 @@ Mail::get_signature_icon_id () const
     {
       return IDI_EMBLEM_INFORMATION_64_PNG;
     }
-  if (m_is_valid)
-    {
-      return IDI_EMBLEM_SUCCESS_64_PNG;
-    }
   const auto sig = m_verify_result.signature (0);
   if ((sig.summary() & Signature::Summary::KeyMissing))
     {
       return IDI_EMBLEM_QUESTION_64_PNG;
     }
-
-  /* Maybe warning for unsigned and invalid sigs? */
-
+  if (m_is_valid && sig.validity() == Signature::Validity::Full)
+    {
+      return IDI_EMBLEM_SUCCESS_64_PNG;
+    }
+  else if (m_is_valid)
+    {
+      return IDI_EMBLEM_SUCCESS_YELLOW_64_PNG;
+    }
+  const auto uid = get_uid_for_sender (sig.key(), m_sender.c_str());
+  if (sig.summary() & Signature::Summary::TofuConflict ||
+      uid.tofuInfo().validity() == TofuInfo::Conflict)
+    {
+      return IDI_EMBLEM_WARNING_64_PNG;
+    }
   return IDI_EMBLEM_INFORMATION_64_PNG;
 }
 

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

Summary of changes:
 src/dialogs.h                       |  1 +
 src/dialogs.rc                      |  1 +
 src/gpgoladdin.cpp                  |  2 +-
 src/icons/Makefile.am               |  7 ++-
 src/icons/emblem-success-yellow.svg | 73 +++++++++++++++++++++++++++++
 src/mail.cpp                        | 91 +++++++++++++++++++++++++------------
 src/mapihelp.cpp                    |  3 +-
 src/ribbon-callbacks.cpp            |  4 +-
 8 files changed, 146 insertions(+), 36 deletions(-)
 create mode 100644 src/icons/emblem-success-yellow.svg


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




More information about the Gnupg-commits mailing list