[git] GPGME - branch, master, updated. gpgme-1.11.1-57-g8dff414
by Andre Heinecke
cvs at cvs.gnupg.org
Fri Jun 8 16:22:21 CEST 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".
The branch, master has been updated
via 8dff414e170e4df8ea661028c4ac1588311ca26e (commit)
from 54146d90dd5518c24c30e6d2ebeb7f47ed4eb29e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8dff414e170e4df8ea661028c4ac1588311ca26e
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Fri Jun 8 16:19:47 2018 +0200
cpp: Add proper gpgme_op_createkey
* lang/cpp/src/context.cpp, lang/cpp/src/context.h
(Context::createKeyEx): New.
--
The createKeyEx function follows the usual pattern that the
synchronous call returns a result directly while for the
async an extra call is neccessary.
diff --git a/NEWS b/NEWS
index e70b9a9..6c33c25 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Noteworthy changes in version 1.11.2 (unreleased)
cpp: Data::rewind NEW.
cpp: Context::setFlag NEW.
cpp: Context::getFlag NEW.
+ cpp: Context::createKeyEx NEW.
Noteworthy changes in version 1.11.1 (2018-04-20)
diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp
index 8fde84a..aab22cd 100644
--- a/lang/cpp/src/context.cpp
+++ b/lang/cpp/src/context.cpp
@@ -1436,6 +1436,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,
diff --git a/lang/cpp/src/context.h b/lang/cpp/src/context.h
index 8cccff5..a14625e 100644
--- a/lang/cpp/src/context.h
+++ b/lang/cpp/src/context.h
@@ -234,6 +234,14 @@ public:
const Key &certkey,
unsigned int flags);
+ // Same as create key but returning a result
+ GpgME::KeyGenerationResult createKeyEx (const char *userid,
+ const char *algo,
+ unsigned long reserved,
+ unsigned long expires,
+ const Key &certkey,
+ unsigned int flags);
+
Error addUid(const Key &key, const char *userid);
Error startAddUid(const Key &key, const char *userid);
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
lang/cpp/src/context.cpp | 17 +++++++++++++++++
lang/cpp/src/context.h | 8 ++++++++
3 files changed, 26 insertions(+)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list