[git] GPGME - branch, master, updated. gpgme-1.7.0-30-g24779c9

by Andre Heinecke cvs at cvs.gnupg.org
Wed Oct 5 17:23:10 CEST 2016


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  24779c9e2301bd17fd328d65b0383e1cbc944119 (commit)
       via  4984cc93db6b55f2420a9abd844c074a5fb4ed0c (commit)
       via  9d1df990386010e0581b542a76a4f5d85d8d11b5 (commit)
       via  370ee1aa802ec6a4030a39b2df7d24a0c47e5ac7 (commit)
       via  39dd7585f5a7d801942efcb375d6dd46d01d2968 (commit)
      from  52a91ccc6a25425d4374b77040e30efb6816940f (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 24779c9e2301bd17fd328d65b0383e1cbc944119
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Oct 5 17:19:20 2016 +0200

    qt: Disable tests that require a password for 2.0
    
    * lang/qt/tests/t-encrypt.cpp: Disable tests that require
    a password for 2.0.
    
    --
    The passphrase_cb apparently does not work with 2.0 so we would
    need a fake pinentry to get this to work. We just disable the
    test instead as this is a rarely used feature and works with
    1.4 and 2.1.

diff --git a/lang/qt/tests/t-encrypt.cpp b/lang/qt/tests/t-encrypt.cpp
index c3ce610..4d65dc7 100644
--- a/lang/qt/tests/t-encrypt.cpp
+++ b/lang/qt/tests/t-encrypt.cpp
@@ -53,6 +53,23 @@
 using namespace QGpgME;
 using namespace GpgME;
 
+static bool decryptSupported()
+{
+    /* With GnuPG 2.0.x (at least 2.0.26 by default on jessie)
+     * the passphrase_cb does not work. So the test popped up
+     * a pinentry. So tests requiring decryption don't work. */
+    static auto version = GpgME::engineInfo(GpgME::GpgEngine).engineVersion();
+    if (version < "2.0.0") {
+        /* With 1.4 it just works */
+        return true;
+    }
+    if (version < "2.1.0") {
+        /* With 2.1 it works with loopback mode */
+        return false;
+    }
+    return true;
+}
+
 class EncryptionTest : public QGpgMETest
 {
     Q_OBJECT
@@ -82,6 +99,9 @@ private Q_SLOTS:
         Q_ASSERT(cipherString.startsWith("-----BEGIN PGP MESSAGE-----"));
 
         /* Now decrypt */
+        if (!decryptSupported()) {
+            return;
+        }
         auto ctx = Context::createForProtocol(OpenPGP);
         TestPassphraseProvider provider;
         ctx->setPassphraseProvider(&provider);
@@ -150,6 +170,9 @@ private Q_SLOTS:
 
     void testSymmetricEncryptDecrypt()
     {
+        if (!decryptSupported()) {
+            return;
+        }
         auto ctx = Context::createForProtocol(OpenPGP);
         TestPassphraseProvider provider;
         ctx->setPassphraseProvider(&provider);
@@ -182,6 +205,9 @@ private:
      * So this test is disabled until gnupg(?) is fixed for this. */
     void testMixedEncryptDecrypt()
     {
+        if (!decryptSupported()) {
+            return;
+        }
         auto listjob = openpgp()->keyListJob(false, false, false);
         std::vector<Key> keys;
         auto keylistresult = listjob->exec(QStringList() << QStringLiteral("alfa at example.net"),

commit 4984cc93db6b55f2420a9abd844c074a5fb4ed0c
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Oct 5 16:55:14 2016 +0200

    Add warning flags for c++ compiler, too
    
    * configure.ac (CXXFLAGS): Add Wall and Wextra.

diff --git a/configure.ac b/configure.ac
index efa1f19..114225a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -588,6 +588,7 @@ if test "$GCC" = yes; then
           CFLAGS="$CFLAGS -Wno-missing-field-initializers"
           CFLAGS="$CFLAGS -Wno-sign-compare"
         fi
+        CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow"
 
         AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
         _gcc_cflags_save=$CFLAGS

commit 9d1df990386010e0581b542a76a4f5d85d8d11b5
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Oct 5 16:44:53 2016 +0200

    qt: Fix unused variable warnings
    
    * qt/src/qgpgmenewcryptoconfig.cpp,
    qt/src/threadedjobmixin.h,
    qt/tests/t-encrypt.cpp,
    qt/tests/t-support.h,
    qt/tests/t-wkspublish.cpp: Mark additional variables as unused.

diff --git a/lang/qt/src/qgpgmenewcryptoconfig.cpp b/lang/qt/src/qgpgmenewcryptoconfig.cpp
index 62566d5..eb3af56 100644
--- a/lang/qt/src/qgpgmenewcryptoconfig.cpp
+++ b/lang/qt/src/qgpgmenewcryptoconfig.cpp
@@ -84,7 +84,7 @@ QGpgMENewCryptoConfig::~QGpgMENewCryptoConfig()
     clear();
 }
 
-void QGpgMENewCryptoConfig::reloadConfiguration(bool showErrors)
+void QGpgMENewCryptoConfig::reloadConfiguration(bool)
 {
     clear();
 
diff --git a/lang/qt/src/threadedjobmixin.h b/lang/qt/src/threadedjobmixin.h
index 62d7f1c..d1b1043 100644
--- a/lang/qt/src/threadedjobmixin.h
+++ b/lang/qt/src/threadedjobmixin.h
@@ -223,7 +223,8 @@ protected:
     {
         return m_auditLogError;
     }
-    void showProgress(const char *what, int type, int current, int total) Q_DECL_OVERRIDE {
+    void showProgress(const char * /*what*/,
+                      int /*type*/, int current, int total) Q_DECL_OVERRIDE {
         // will be called from the thread exec'ing the operation, so
         // just bounce everything to the owning thread:
         // ### hope this is thread-safe (meta obj is const, and
diff --git a/lang/qt/tests/t-encrypt.cpp b/lang/qt/tests/t-encrypt.cpp
index bc6b878..c3ce610 100644
--- a/lang/qt/tests/t-encrypt.cpp
+++ b/lang/qt/tests/t-encrypt.cpp
@@ -117,7 +117,7 @@ private Q_SLOTS:
 
         bool initSeen = false;
         bool finishSeen = false;
-        connect(job, &Job::progress, this, [this, &initSeen, &finishSeen] (const QString& what, int current, int total) {
+        connect(job, &Job::progress, this, [this, &initSeen, &finishSeen] (const QString&, int current, int total) {
                 // We only check for progress 0 and max progress as the other progress
                 // lines depend on the system speed and are as such unreliable to test.
                 Q_ASSERT(total == PROGRESS_TEST_SIZE);
@@ -129,8 +129,8 @@ private Q_SLOTS:
                 }
                 Q_ASSERT(current >= 0 && current <= total);
             });
-        connect(job, &EncryptJob::result, this, [this, &initSeen, &finishSeen] (const GpgME::EncryptionResult &result,
-                                                                                const QByteArray &cipherText,
+        connect(job, &EncryptJob::result, this, [this, &initSeen, &finishSeen] (const GpgME::EncryptionResult &,
+                                                                                const QByteArray &,
                                                                                 const QString,
                                                                                 const GpgME::Error) {
                 Q_ASSERT(initSeen);
diff --git a/lang/qt/tests/t-support.h b/lang/qt/tests/t-support.h
index 59d9a4d..704fab4 100644
--- a/lang/qt/tests/t-support.h
+++ b/lang/qt/tests/t-support.h
@@ -39,8 +39,8 @@ namespace GpgME
 class TestPassphraseProvider : public PassphraseProvider
 {
 public:
-    char *getPassphrase(const char *useridHint, const char *description,
-                        bool previousWasBad, bool &canceled) Q_DECL_OVERRIDE
+    char *getPassphrase(const char * /*useridHint*/, const char * /*description*/,
+                        bool /*previousWasBad*/, bool &/*canceled*/) Q_DECL_OVERRIDE
     {
         return strdup("abc");
     }
diff --git a/lang/qt/tests/t-wkspublish.cpp b/lang/qt/tests/t-wkspublish.cpp
index 4558fdc..130c53b 100644
--- a/lang/qt/tests/t-wkspublish.cpp
+++ b/lang/qt/tests/t-wkspublish.cpp
@@ -126,7 +126,7 @@ private Q_SLOTS:
         // First check if it is supported
         auto job = openpgp()->wksPublishJob();
         connect(job, &WKSPublishJob::result, this,
-                [this] (Error err, QByteArray out, QByteArray errout, QString, Error) {
+                [this] (Error err, QByteArray, QByteArray, QString, Error) {
             Q_ASSERT(err);
             Q_EMIT asyncDone();
         });
@@ -144,7 +144,7 @@ private:
         // First check if it is supported
         auto job = openpgp()->wksPublishJob();
         connect(job, &WKSPublishJob::result, this,
-                [this] (Error err, QByteArray out, QByteArray errout, QString, Error) {
+                [this] (Error err, QByteArray, QByteArray, QString, Error) {
             if (GpgME::engineInfo(GpgME::GpgEngine).engineVersion() < "2.0.16") {
                 std::cout << err;
                 Q_ASSERT(err);
@@ -165,7 +165,7 @@ private:
         }
         auto job = openpgp()->wksPublishJob();
         connect(job, &WKSPublishJob::result, this,
-                [this] (Error err, QByteArray out, QByteArray errout, QString, Error) {
+                [this] (Error err, QByteArray, QByteArray, QString, Error) {
             Q_ASSERT(err);
             Q_EMIT asyncDone();
         });
@@ -197,7 +197,7 @@ private:
         auto keygenjob = openpgp()->keyGenerationJob();
         QByteArray fpr;
         connect(keygenjob, &KeyGenerationJob::result, this,
-                [this, &fpr](KeyGenerationResult result, QByteArray pubkeyData, QString, Error)
+                [this, &fpr](KeyGenerationResult result, QByteArray, QString, Error)
         {
             Q_ASSERT(!result.error());
             fpr = QByteArray(result.fingerprint());
@@ -211,7 +211,7 @@ private:
         /* Then try to create a request. */
         auto job = openpgp()->wksPublishJob();
         connect(job, &WKSPublishJob::result, this,
-                [this] (Error err, QByteArray out, QByteArray errout, QString, Error) {
+                [this] (Error err, QByteArray out, QByteArray, QString, Error) {
             Q_ASSERT(!err);
             Q_EMIT asyncDone();
             const QString outstr = QString(out);
@@ -247,7 +247,7 @@ private:
         /* Get a response. */
         auto job = openpgp()->wksPublishJob();
         connect(job, &WKSPublishJob::result, this,
-                [this] (Error err, QByteArray out, QByteArray errout, QString, Error) {
+                [this] (Error err, QByteArray out, QByteArray, QString, Error) {
             Q_ASSERT(!err);
             Q_EMIT asyncDone();
             const QString outstr = QString(out);

commit 370ee1aa802ec6a4030a39b2df7d24a0c47e5ac7
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Oct 5 16:43:16 2016 +0200

    cpp: Add support for URL Data encodings
    
    * lang/cpp/src/data.h (Data::Encoding): Extend enum.
    * lang/cpp/src/data.cpp (Data::encoding),
    Data::setEncoding): Support new values.

diff --git a/lang/cpp/src/data.cpp b/lang/cpp/src/data.cpp
index 84ed336..2cb4fa8 100644
--- a/lang/cpp/src/data.cpp
+++ b/lang/cpp/src/data.cpp
@@ -161,6 +161,9 @@ GpgME::Data::Encoding GpgME::Data::encoding() const
     case GPGME_DATA_ENCODING_BASE64: return Base64Encoding;
     case GPGME_DATA_ENCODING_ARMOR:  return ArmorEncoding;
     case GPGME_DATA_ENCODING_MIME:   return MimeEncoding;
+    case GPGME_DATA_ENCODING_URL:    return UrlEncoding;
+    case GPGME_DATA_ENCODING_URLESC: return UrlEscEncoding;
+    case GPGME_DATA_ENCODING_URL0:   return Url0Encoding;
     }
     return AutoEncoding;
 }
@@ -174,6 +177,9 @@ GpgME::Error GpgME::Data::setEncoding(Encoding enc)
     case Base64Encoding: ge = GPGME_DATA_ENCODING_BASE64; break;
     case ArmorEncoding:  ge = GPGME_DATA_ENCODING_ARMOR;  break;
     case MimeEncoding:   ge = GPGME_DATA_ENCODING_MIME;  break;
+    case UrlEncoding:    ge = GPGME_DATA_ENCODING_URL; break;
+    case UrlEscEncoding: ge = GPGME_DATA_ENCODING_URLESC; break;
+    case Url0Encoding:   ge = GPGME_DATA_ENCODING_URL0; break;
     }
     return Error(gpgme_data_set_encoding(d->data, ge));
 }
diff --git a/lang/cpp/src/data.h b/lang/cpp/src/data.h
index b2f2173..50bdf62 100644
--- a/lang/cpp/src/data.h
+++ b/lang/cpp/src/data.h
@@ -78,7 +78,10 @@ public:
         BinaryEncoding,
         Base64Encoding,
         ArmorEncoding,
-        MimeEncoding
+        MimeEncoding,
+        UrlEncoding,
+        UrlEscEncoding,
+        Url0Encoding,
     };
     Encoding encoding() const;
     Error setEncoding(Encoding encoding);

commit 39dd7585f5a7d801942efcb375d6dd46d01d2968
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Oct 5 16:27:18 2016 +0200

    cpp: Fix gcc diagnostic push / pop
    
    * lang/cpp/src/context.cpp: Fix pragmas.
    
    --
    This fixes an error with -Werror=unknown-pragmas

diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp
index 34d0efc..1121104 100644
--- a/lang/cpp/src/context.cpp
+++ b/lang/cpp/src/context.cpp
@@ -699,7 +699,7 @@ Error Context::startPasswd(const Key &key)
 }
 
 
-#pragma GCC push_diagnostics
+#pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
 Error Context::edit(const Key &key, std::unique_ptr<EditInteractor> func, Data &data)
@@ -759,7 +759,7 @@ Error Context::startCardEditing(const Key &key, std::unique_ptr<EditInteractor>
                               dp ? dp->data : 0));
 }
 
-#pragma GCC pop_diagnostics
+#pragma GCC diagnostic pop
 
 EditInteractor *Context::lastCardEditInteractor() const
 {

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

Summary of changes:
 configure.ac                          |  1 +
 lang/cpp/src/context.cpp              |  4 ++--
 lang/cpp/src/data.cpp                 |  6 ++++++
 lang/cpp/src/data.h                   |  5 ++++-
 lang/qt/src/qgpgmenewcryptoconfig.cpp |  2 +-
 lang/qt/src/threadedjobmixin.h        |  3 ++-
 lang/qt/tests/t-encrypt.cpp           | 32 +++++++++++++++++++++++++++++---
 lang/qt/tests/t-support.h             |  4 ++--
 lang/qt/tests/t-wkspublish.cpp        | 12 ++++++------
 9 files changed, 53 insertions(+), 16 deletions(-)


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




More information about the Gnupg-commits mailing list