summaryrefslogtreecommitdiff
path: root/lang/cpp/src/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lang/cpp/src/context.cpp')
-rw-r--r--lang/cpp/src/context.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp
index 135e4d5..1e4e549 100644
--- a/lang/cpp/src/context.cpp
+++ b/lang/cpp/src/context.cpp
@@ -1028,6 +1028,9 @@ unsigned int to_auditlog_flags(unsigned int flags)
if (flags & Context::AuditLogWithHelp) {
result |= GPGME_AUDITLOG_WITH_HELP;
}
+ if (flags & Context::DiagnosticAuditLog) {
+ result |= GPGME_AUDITLOG_DIAG;
+ }
return result;
}
@@ -1436,6 +1439,23 @@ Error Context::createKey (const char *userid,
flags));
}
+KeyGenerationResult Context::createKeyEx (const char *userid,
+ const char *algo,
+ unsigned long reserved,
+ unsigned long expires,
+ const Key &certkey,
+ unsigned int flags)
+{
+ d->lasterr = gpgme_op_createkey(d->ctx,
+ userid,
+ algo,
+ reserved,
+ expires,
+ certkey.impl(),
+ flags);
+ return KeyGenerationResult(d->ctx, Error(d->lasterr));
+}
+
Error Context::addUid(const Key &k, const char *userid)
{
return Error(d->lasterr = gpgme_op_adduid(d->ctx,
@@ -1478,6 +1498,16 @@ Error Context::startCreateSubkey(const Key &k, const char *algo,
k.impl(), algo, reserved, expires, flags));
}
+Error Context::setFlag(const char *name, const char *value)
+{
+ return Error(d->lasterr = gpgme_set_ctx_flag(d->ctx, name, value));
+}
+
+const char *Context::getFlag(const char *name) const
+{
+ return gpgme_get_ctx_flag(d->ctx, name);
+}
+
// Engine Spawn stuff
Error Context::spawn(const char *file, const char *argv[],
Data &input, Data &output, Data &err,