[git] GPGME - branch, master, updated. gpgme-1.8.0-14-gda5343a

by Andre Heinecke cvs at cvs.gnupg.org
Fri Dec 16 19:11:03 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 Made Easy".

The branch, master has been updated
       via  da5343a9d2c8c0ca6431162aac4bd5c73b4ae6dd (commit)
      from  85e05537e15346896a271d3f62bead9dd7e3f180 (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 da5343a9d2c8c0ca6431162aac4bd5c73b4ae6dd
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Dec 16 19:09:13 2016 +0100

    cpp: Ensure that hasSecret is correct after update
    
    * lang/cpp/src/key.cpp (Key::update): Check for
    a secret key first before listing public keys.
    
    --
    This is a performance delay but the update should
    only be called in a non gui thread anyway. The information
    if we have the secret key for this key is important to provide
    after update.

diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index d621a81..4f7ec54 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -341,7 +341,12 @@ void Key::update()
                         KeyListMode::Validate |
                         KeyListMode::WithTofu);
     Error err;
-    auto newKey = ctx->key(primaryFingerprint(), err, hasSecret());
+    auto newKey = ctx->key(primaryFingerprint(), err, true);
+    // Not secret so we get the information from the pubring.
+    if (newKey.isNull())
+      {
+        newKey = ctx->key(primaryFingerprint(), err, false);
+      }
     delete ctx;
     if (err) {
         return;

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

Summary of changes:
 lang/cpp/src/key.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list