From a9e5a25b56abb7f27812f333c287a7adae9e18e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 5 Oct 2023 15:27:52 +0200 Subject: cpp: Support new key capability flags * lang/cpp/src/key.cpp, lang/cpp/src/key.h (class Key): New methods hasCertify, hasSign, hasEncrypt, hasAuthenticate. -- GnuPG-bug-id: 6748 --- lang/cpp/src/key.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lang/cpp/src/key.cpp') diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp index b18cfaee..9cbd188b 100644 --- a/lang/cpp/src/key.cpp +++ b/lang/cpp/src/key.cpp @@ -247,6 +247,26 @@ bool Key::isDeVs() const return true; } +bool Key::hasCertify() const +{ + return key && key->has_certify; +} + +bool Key::hasSign() const +{ + return key && key->has_sign; +} + +bool Key::hasEncrypt() const +{ + return key && key->has_encrypt; +} + +bool Key::hasAuthenticate() const +{ + return key && key->has_authenticate; +} + const char *Key::issuerSerial() const { return key ? key->issuer_serial : nullptr ; -- cgit v1.2.3