aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2020-11-11 02:58:28 +0000
committerNIIBE Yutaka <[email protected]>2020-11-11 02:58:28 +0000
commit276f3390e18b34e6211b4c75876a0ab4c10a5ac9 (patch)
tree72af11703ba758bab304e14138bab0f695dcb3e6
parentRequire at least libgpg-error 1.36 (diff)
downloadgpgme-276f3390e18b34e6211b4c75876a0ab4c10a5ac9.tar.gz
gpgme-276f3390e18b34e6211b4c75876a0ab4c10a5ac9.zip
qt: Allow build with older GnuPG (< 2.2.18).
* lang/qt/tests/t-remarks.cpp (initTestCase): Check gpg for allow-weak-key-signatures option. Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--lang/qt/tests/t-remarks.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lang/qt/tests/t-remarks.cpp b/lang/qt/tests/t-remarks.cpp
index 8597372f..c1880a7d 100644
--- a/lang/qt/tests/t-remarks.cpp
+++ b/lang/qt/tests/t-remarks.cpp
@@ -43,6 +43,7 @@
#include "protocol.h"
#include "signkeyjob.h"
#include "context.h"
+#include "engineinfo.h"
#include "t-support.h"
@@ -503,7 +504,9 @@ private Q_SLOTS:
qputenv("GNUPGHOME", mDir.path().toUtf8());
QFile conf(mDir.path() + QStringLiteral("/gpg.conf"));
QVERIFY(conf.open(QIODevice::WriteOnly));
- conf.write("allow-weak-key-signatures");
+ if (GpgME::engineInfo(GpgME::GpgEngine).engineVersion() >= "2.2.18") {
+ conf.write("allow-weak-key-signatures");
+ }
conf.close();
}