From ea9686ec71a2dd2225ce2b6d6d4038821d36205f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 20 Mar 2017 19:56:10 +0100 Subject: core,cpp: New key flag 'is_de_vs'. * src/gpgme.h.in (_gpgme_subkey): New flag is_de_vs. * tests/run-keylist.c (main): Print that flag. * src/keylist.c (parse_pub_field18): New. (keylist_colon_handler): Parse compliance flags. * lang/cpp/src/key.cpp (Key::isDeVs): New. (Subkey::isDeVs): New. * lang/cpp/src/key.h (class Key): New method isDeVs. (class Subkey): New method isDeVs. Signed-off-by: Werner Koch --- lang/cpp/src/key.cpp | 10 ++++++++++ lang/cpp/src/key.h | 2 ++ 2 files changed, 12 insertions(+) (limited to 'lang/cpp') diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp index 9eebbf01..31e59e19 100644 --- a/lang/cpp/src/key.cpp +++ b/lang/cpp/src/key.cpp @@ -234,6 +234,11 @@ bool Key::isQualified() const return key && key->is_qualified; } +bool Key::isDeVs() const +{ + return key && key->subkeys && key->subkeys->is_de_vs; +} + const char *Key::issuerSerial() const { return key ? key->issuer_serial : 0 ; @@ -469,6 +474,11 @@ bool Subkey::isQualified() const return subkey && subkey->is_qualified; } +bool Subkey::isDeVs() const +{ + return subkey && subkey->is_de_vs; +} + bool Subkey::isCardKey() const { return subkey && subkey->is_cardkey; diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index 8c11a9d4..829bd266 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -112,6 +112,7 @@ public: bool canCertify() const; bool canAuthenticate() const; bool isQualified() const; + bool isDeVs() const; bool hasSecret() const; GPGMEPP_DEPRECATED bool isSecret() const @@ -219,6 +220,7 @@ public: bool canCertify() const; bool canAuthenticate() const; bool isQualified() const; + bool isDeVs() const; bool isCardKey() const; bool isSecret() const; -- cgit v1.2.3