[git] GPGME - branch, master, updated. gpgme-1.9.0-34-g5e27bf9

by Andre Heinecke cvs at cvs.gnupg.org
Wed May 10 10:26:38 CEST 2017


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  5e27bf98b4c48cf6a239bcc94b7b67515ff339e7 (commit)
       via  cc2ef3d07c0d261bb9e8e8c0f2706e1a08e4ec53 (commit)
       via  b56f398eff4e3e70dea714c3174a5512dd9bcf33 (commit)
       via  df4eb611e33dcab7bebf07b13734c7db7ccf40da (commit)
      from  28734240e2a2ce67b64df55364f35e1648376311 (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 5e27bf98b4c48cf6a239bcc94b7b67515ff339e7
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed May 10 10:24:18 2017 +0200

    qt: Add a missing include <functional>
    
    * lang/qt/src/qgpgmenewcryptoconfig.cpp: Include functional.
    
    --
    This is intended to fix compilation against the c++ stdlib from
    Gentoo / GCC 7.
    
    Patch provided by Martin Väth.
    GnuPG-Bug-Id: T3151

diff --git a/lang/qt/src/qgpgmenewcryptoconfig.cpp b/lang/qt/src/qgpgmenewcryptoconfig.cpp
index d413126..ba028a9 100644
--- a/lang/qt/src/qgpgmenewcryptoconfig.cpp
+++ b/lang/qt/src/qgpgmenewcryptoconfig.cpp
@@ -49,6 +49,7 @@
 
 #include <sstream>
 #include <string>
+#include <functional>
 #include <cassert>
 #include <functional>
 

commit cc2ef3d07c0d261bb9e8e8c0f2706e1a08e4ec53
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed May 10 10:22:23 2017 +0200

    qt: Undeprecate API that I find useful
    
    * lang/qt/src/decryptjob.h,
    lang/qt/src/decryptverifyjob.h,
    lang/qt/src/signencryptjob.h,
    lang/qt/src/verifydetachedjob.h,
    lang/qt/src/verifyopaquejob.h: Undeprecate ByteArray based API.
    
    --
    While an IODevice may be more performant the ByteArray API is
    a very easy way to get started with QGpgME as it allows you
    basically to encrypt / decrypt any QString.
    
    This also fixes a ton of deprecation warnings in KDE where this
    API is used all over the place.

diff --git a/lang/qt/src/decryptjob.h b/lang/qt/src/decryptjob.h
index 11584db..7753e18 100644
--- a/lang/qt/src/decryptjob.h
+++ b/lang/qt/src/decryptjob.h
@@ -76,7 +76,7 @@ public:
        Starts the decryption operation. \a cipherText is the data to
        decrypt.
     */
-    virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const QByteArray &cipherText) = 0;
+    virtual GpgME::Error start(const QByteArray &cipherText) = 0;
 
     /*!
       \overload
diff --git a/lang/qt/src/decryptverifyjob.h b/lang/qt/src/decryptverifyjob.h
index c3fcf02..e5c4346 100644
--- a/lang/qt/src/decryptverifyjob.h
+++ b/lang/qt/src/decryptverifyjob.h
@@ -77,7 +77,7 @@ public:
        Starts the combined decryption and verification operation.
        \a cipherText is the data to decrypt and later verify.
     */
-    virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const QByteArray &cipherText) = 0;
+    virtual GpgME::Error start(const QByteArray &cipherText) = 0;
 
     /*!
       \overload
diff --git a/lang/qt/src/signencryptjob.h b/lang/qt/src/signencryptjob.h
index 86e0a9d..61ab5c6 100644
--- a/lang/qt/src/signencryptjob.h
+++ b/lang/qt/src/signencryptjob.h
@@ -95,7 +95,7 @@ public:
        \em recipient keys will not be performed, but full validity
        assumed for all \em recipient keys without further checks.
     */
-    virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const std::vector<GpgME::Key> &signers,
+    virtual GpgME::Error start(const std::vector<GpgME::Key> &signers,
             const std::vector<GpgME::Key> &recipients,
             const QByteArray &plainText,
             bool alwaysTrust = false) = 0;
diff --git a/lang/qt/src/verifydetachedjob.h b/lang/qt/src/verifydetachedjob.h
index a9b7cf4..2293f3a 100644
--- a/lang/qt/src/verifydetachedjob.h
+++ b/lang/qt/src/verifydetachedjob.h
@@ -78,7 +78,7 @@ public:
        signature data, while \a signedData contains the data over
        which the signature was made.
     */
-    virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const QByteArray &signature,
+    virtual GpgME::Error start(const QByteArray &signature,
             const QByteArray &signedData) = 0;
 
     /*!
diff --git a/lang/qt/src/verifyopaquejob.h b/lang/qt/src/verifyopaquejob.h
index 0ff8582..bfa34e9 100644
--- a/lang/qt/src/verifyopaquejob.h
+++ b/lang/qt/src/verifyopaquejob.h
@@ -77,7 +77,7 @@ public:
        signature data, while \a signedData contains the data over
        which the signature was made.
     */
-    virtual QGPGME_DEPRECATED_EXPORT GpgME::Error start(const QByteArray &signedData) = 0;
+    virtual GpgME::Error start(const QByteArray &signedData) = 0;
 
     /*!
       \overload

commit b56f398eff4e3e70dea714c3174a5512dd9bcf33
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed May 10 10:18:41 2017 +0200

    qt, tests: Don't use internal API
    
    * lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-tofuinfo.cpp:
    Only use exported API.
    
    --
    With the Job::Context hack we no longer need to use internal API.

diff --git a/lang/qt/tests/t-encrypt.cpp b/lang/qt/tests/t-encrypt.cpp
index 65fe735..5bd472a 100644
--- a/lang/qt/tests/t-encrypt.cpp
+++ b/lang/qt/tests/t-encrypt.cpp
@@ -42,10 +42,10 @@
 #include "encryptjob.h"
 #include "signencryptjob.h"
 #include "signingresult.h"
-#include "qgpgmeencryptjob.h"
+#include "encryptjob.h"
 #include "encryptionresult.h"
 #include "decryptionresult.h"
-#include "qgpgmedecryptjob.h"
+#include "decryptjob.h"
 #include "qgpgmebackend.h"
 #include "keylistresult.h"
 #include "engineinfo.h"
@@ -106,11 +106,11 @@ private Q_SLOTS:
         if (!decryptSupported()) {
             return;
         }
-        auto ctx = Context::createForProtocol(OpenPGP);
+        auto decJob = openpgp()->decryptJob();
+        auto ctx = Job::context(decJob);
         TestPassphraseProvider provider;
         ctx->setPassphraseProvider(&provider);
         ctx->setPinentryMode(Context::PinentryLoopback);
-        auto decJob = new QGpgMEDecryptJob(ctx);
         QByteArray plainText;
         auto decResult = decJob->exec(cipherText, plainText);
         QVERIFY(!decResult.error());
@@ -177,13 +177,13 @@ private Q_SLOTS:
         if (!decryptSupported()) {
             return;
         }
-        auto ctx = Context::createForProtocol(OpenPGP);
+        auto job = openpgp()->encryptJob();
+        auto ctx = Job::context(job);
         TestPassphraseProvider provider;
         ctx->setPassphraseProvider(&provider);
         ctx->setPinentryMode(Context::PinentryLoopback);
         ctx->setArmor(true);
         ctx->setTextMode(true);
-        auto job = new QGpgMEEncryptJob(ctx);
         QByteArray cipherText;
         auto result = job->exec(std::vector<Key>(), QStringLiteral("Hello symmetric World").toUtf8(), Context::AlwaysTrust, cipherText);
         delete job;
@@ -193,10 +193,10 @@ private Q_SLOTS:
 
         killAgent(mDir.path());
 
-        auto ctx2 = Context::createForProtocol(OpenPGP);
+        auto decJob = openpgp()->decryptJob();
+        auto ctx2 = Job::context(decJob);
         ctx2->setPassphraseProvider(&provider);
         ctx2->setPinentryMode(Context::PinentryLoopback);
-        auto decJob = new QGpgMEDecryptJob(ctx2);
         QByteArray plainText;
         auto decResult = decJob->exec(cipherText, plainText);
         QVERIFY(!result.error());
@@ -238,13 +238,14 @@ private Q_SLOTS:
         if (!decryptSupported()) {
             return;
         }
-        auto ctx = Context::createForProtocol(OpenPGP);
+
+        auto decJob = openpgp()->decryptJob();
+        auto ctx = Job::context(decJob);
         TestPassphraseProvider provider;
         ctx->setPassphraseProvider(&provider);
         ctx->setPinentryMode(Context::PinentryLoopback);
         ctx->setDecryptionFlags(Context::DecryptUnwrap);
 
-        auto decJob = new QGpgMEDecryptJob(ctx);
         QByteArray plainText;
         auto decResult = decJob->exec(cipherText, plainText);
 
@@ -282,12 +283,12 @@ private:
         QVERIFY(keys.size() == 1);
         delete listjob;
 
-        auto ctx = Context::createForProtocol(OpenPGP);
+        auto job = openpgp()->encryptJob();
+        auto ctx = Job::context(job);
         ctx->setPassphraseProvider(new TestPassphraseProvider);
         ctx->setPinentryMode(Context::PinentryLoopback);
         ctx->setArmor(true);
         ctx->setTextMode(true);
-        auto job = new QGpgMEEncryptJob(ctx);
         QByteArray cipherText;
         printf("Before exec, flags: %x\n", Context::Symmetric | Context::AlwaysTrust);
         auto result = job->exec(keys, QStringLiteral("Hello symmetric World").toUtf8(),
@@ -310,11 +311,11 @@ private:
         agentConf.write("allow-loopback-pinentry");
         agentConf.close();
 
-        auto ctx2 = Context::createForProtocol(OpenPGP);
+        auto decJob = openpgp()->decryptJob();
+        auto ctx2 = Job::context(decJob);
         ctx2->setPassphraseProvider(new TestPassphraseProvider);
         ctx2->setPinentryMode(Context::PinentryLoopback);
         ctx2->setTextMode(true);
-        auto decJob = new QGpgMEDecryptJob(ctx2);
         QByteArray plainText;
         auto decResult = decJob->exec(cipherText, plainText);
         QVERIFY(!decResult.error());
diff --git a/lang/qt/tests/t-tofuinfo.cpp b/lang/qt/tests/t-tofuinfo.cpp
index 926728d..b716102 100644
--- a/lang/qt/tests/t-tofuinfo.cpp
+++ b/lang/qt/tests/t-tofuinfo.cpp
@@ -48,10 +48,11 @@
 #include "importresult.h"
 #include "keylistjob.h"
 #include "keylistresult.h"
-#include "qgpgmesignjob.h"
+#include "signjob.h"
 #include "key.h"
 #include "t-support.h"
 #include "engineinfo.h"
+#include "context.h"
 #include <iostream>
 
 using namespace QGpgME;
@@ -151,11 +152,11 @@ private:
 
     void signAndVerify(const QString &what, const GpgME::Key &key, int expected)
     {
-        Context *ctx = Context::createForProtocol(OpenPGP);
+        auto job = openpgp()->signJob();
+        auto ctx = Job::context(job);
         TestPassphraseProvider provider;
         ctx->setPassphraseProvider(&provider);
         ctx->setPinentryMode(Context::PinentryLoopback);
-        auto *job = new QGpgMESignJob(ctx);
 
         std::vector<Key> keys;
         keys.push_back(key);

commit df4eb611e33dcab7bebf07b13734c7db7ccf40da
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Apr 5 18:23:48 2017 +0200

    core: Don't split gpgconf strings on comma
    
    * src/engine-gpgconf.c (gpgconf_parse_option): Don't split
    strings on comma.
    
    --
    This only affects values where the main type is string. Values
    with the alt_type string but another main type are still split
    to keep lists (e.g. groups) working.

diff --git a/src/engine-gpgconf.c b/src/engine-gpgconf.c
index 6f7c8ac..af5f110 100644
--- a/src/engine-gpgconf.c
+++ b/src/engine-gpgconf.c
@@ -399,7 +399,7 @@ gpgconf_parse_option (gpgme_conf_opt_t opt,
 		      gpgme_conf_arg_t *arg_p, char *line)
 {
   gpgme_error_t err;
-  char *mark;
+  char *mark = NULL;
 
   if (!line[0])
     return 0;
@@ -408,7 +408,8 @@ gpgconf_parse_option (gpgme_conf_opt_t opt,
     {
       gpgme_conf_arg_t arg;
 
-      mark = strchr (line, ',');
+      if (opt->type != GPGME_CONF_STRING)
+        mark = strchr (line, ',');
       if (mark)
 	*mark = '\0';
 

-----------------------------------------------------------------------

Summary of changes:
 lang/qt/src/decryptjob.h              |  2 +-
 lang/qt/src/decryptverifyjob.h        |  2 +-
 lang/qt/src/qgpgmenewcryptoconfig.cpp |  1 +
 lang/qt/src/signencryptjob.h          |  2 +-
 lang/qt/src/verifydetachedjob.h       |  2 +-
 lang/qt/src/verifyopaquejob.h         |  2 +-
 lang/qt/tests/t-encrypt.cpp           | 29 +++++++++++++++--------------
 lang/qt/tests/t-tofuinfo.cpp          |  7 ++++---
 src/engine-gpgconf.c                  |  5 +++--
 9 files changed, 28 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list