summaryrefslogtreecommitdiff
path: root/lang/cpp/src/key.h
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:36 +0900
committerJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:36 +0900
commit214479142a766516e8770c3e1a3b0b0cc37c239e (patch)
tree43ff2d595b2e19d2f3e35ce6cf74a9e4a63ab3e7 /lang/cpp/src/key.h
parent3a4efa5aa27f73c93a1b020b8b30f07f0b4e46c7 (diff)
downloadgpgme-99c6dc5d2c80ae6918702e902f93b1d4b7e735f7.tar.gz
gpgme-99c6dc5d2c80ae6918702e902f93b1d4b7e735f7.tar.bz2
gpgme-99c6dc5d2c80ae6918702e902f93b1d4b7e735f7.zip
Imported Upstream version 1.9.0upstream/1.9.0
Diffstat (limited to 'lang/cpp/src/key.h')
-rw-r--r--lang/cpp/src/key.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h
index 3f596a8..829bd26 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
@@ -152,6 +153,17 @@ public:
* how long the keylisting takes.*/
void update();
+ /**
+ * @brief Add a user id to this key.
+ *
+ * Needs gnupg 2.1.13 and the key needs to be updated
+ * afterwards to see the new uid.
+ *
+ * @param uid should be fully formated and UTF-8 encoded.
+ *
+ * @returns a possible error.
+ **/
+ Error addUid(const char *uid);
private:
gpgme_key_t impl() const
{
@@ -208,6 +220,7 @@ public:
bool canCertify() const;
bool canAuthenticate() const;
bool isQualified() const;
+ bool isDeVs() const;
bool isCardKey() const;
bool isSecret() const;
@@ -259,6 +272,8 @@ public:
const char *cardSerialNumber() const;
+ const char *keyGrip() const;
+
private:
shared_gpgme_key_t key;
gpgme_sub_key_t subkey;
@@ -335,6 +350,13 @@ public:
* @returns a normalized mail address for this userid
* or an empty string. */
std::string addrSpec() const;
+
+ /*! Revoke the user id.
+ *
+ * Key needs update afterwards.
+ *
+ * @returns an error on error.*/
+ Error revoke();
private:
shared_gpgme_key_t key;
gpgme_user_id_t uid;