diff options
Diffstat (limited to 'lang/cpp/src')
-rw-r--r-- | lang/cpp/src/context.cpp | 10 | ||||
-rw-r--r-- | lang/cpp/src/context.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp index 61b3e0e2..dba958cf 100644 --- a/lang/cpp/src/context.cpp +++ b/lang/cpp/src/context.cpp @@ -1641,6 +1641,16 @@ Error Context::startRevUid(const Key &k, const char *userid) k.impl(), userid, 0)); } +Error Context::setPrimaryUid(const Key &k, const char *userid) +{ + return Error(d->lasterr = gpgme_op_set_uid_flag(d->ctx, k.impl(), userid, "primary", nullptr)); +} + +Error Context::startSetPrimaryUid(const Key &k, const char *userid) +{ + return Error(d->lasterr = gpgme_op_set_uid_flag_start(d->ctx, k.impl(), userid, "primary", nullptr)); +} + Error Context::createSubkey(const Key &k, const char *algo, unsigned long reserved, unsigned long expires, diff --git a/lang/cpp/src/context.h b/lang/cpp/src/context.h index 405d54ea..7bd1b03d 100644 --- a/lang/cpp/src/context.h +++ b/lang/cpp/src/context.h @@ -295,6 +295,9 @@ public: Error revUid(const Key &key, const char *userid); Error startRevUid(const Key &key, const char *userid); + Error setPrimaryUid(const Key &key, const char *userid); + Error startSetPrimaryUid(const Key &key, const char *userid); + Error createSubkey(const Key &key, const char *algo, unsigned long reserved = 0, unsigned long expires = 0, |