[git] GPGME - branch, master, updated. gpgme-1.9.0-56-gc7be41a

by Andre Heinecke cvs at cvs.gnupg.org
Wed Jul 26 15:08:05 CEST 2017


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  c7be41a5f850addceb2a95444bad2a31cdcd1ce5 (commit)
      from  7fde780cc1773c6d3902d4f49a8d4aadbf3223d4 (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 c7be41a5f850addceb2a95444bad2a31cdcd1ce5
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Jul 26 15:07:27 2017 +0200

    cpp: Fix Key::isDeVs for subkeys
    
    * lang/cpp/src/key.cpp (Key::isDeVs): Check all subkeys.
    
    --
    Previosly only the primary key was checked and not all subkeys.

diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index 31e59e1..66fdea9 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -236,7 +236,18 @@ bool Key::isQualified() const
 
 bool Key::isDeVs() const
 {
-    return key && key->subkeys && key->subkeys->is_de_vs;
+    if (!key) {
+        return false;
+    }
+    if (!key->subkeys || !key->subkeys->is_de_vs) {
+        return false;
+    }
+    for (gpgme_sub_key_t subkey = key->subkeys ; subkey ; subkey = subkey->next) {
+        if (!subkey->is_de_vs) {
+            return false;
+        }
+    }
+    return true;
 }
 
 const char *Key::issuerSerial() const

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

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


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




More information about the Gnupg-commits mailing list