<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ff08bcad52390fd6b0629455bb0d710259c84e6e">https://github.com/macports/macports-ports/commit/ff08bcad52390fd6b0629455bb0d710259c84e6e</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new ff08bcad523 qca-qt5 : support down to Qt 5.3.2
</span>ff08bcad523 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ff08bcad52390fd6b0629455bb0d710259c84e6e
</span>Author: René Bertin <rjvbertin@gmail.com>
AuthorDate: Sun Nov 28 13:42:17 2021 +0100
<span style='display:block; white-space:pre;color:#404040;'> qca-qt5 : support down to Qt 5.3.2
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Committed from host : Bola
</span>---
devel/qca/Portfile | 4 +-
devel/qca/files/qt5/patch-support-older-qt5.diff | 1125 +++++++++++++++++++++-
2 files changed, 1111 insertions(+), 18 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/qca/Portfile b/devel/qca/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 1d882a97e5f..823b09b4ad6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/qca/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/qca/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -55,8 +55,8 @@ switch ${Qt_Major} {
</span> -DQT4_BUILD:BOOL=ON
}
qt5 {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.platform} eq "darwin" && ${os.major} < 11 } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "This port currently requires Qt 5.6 or up, so OS X 10.7 or newer"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.platform} eq "darwin" && ${os.major} < 10 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "This port currently requires Qt 5.3 or up, so OS X 10.6 or newer"
</span> known_fail yes
}
patchfiles-append \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/qca/files/qt5/patch-support-older-qt5.diff b/devel/qca/files/qt5/patch-support-older-qt5.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index f4f64c2becd..a050b4d7810 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/qca/files/qt5/patch-support-older-qt5.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/qca/files/qt5/patch-support-older-qt5.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -7,8 +7,8 @@ index 6e290245cb9d4c7b6a208dbe245aab3105f4fd0a..ffaeaf43d6d8da08084dabe9a6498274
</span> message(STATUS "Building Qt 5 version")
set(Qt5_NO_LINK_QTMAIN ON)
- find_package(Qt5 5.14 REQUIRED Core)
<span style='display:block; white-space:pre;background:#ffe0e0;'>-+ # Support down to Qt 5.6 (aka OS X 10.7)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ find_package(Qt5 5.6 REQUIRED Core)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Support down to Qt 5.3.2 (aka OS X 10.6)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ find_package(Qt5 5.3.2 REQUIRED Core)
</span> endif()
set(CMAKE_AUTOMOC ON)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -182,10 +182,10 @@ index 19cbff9afcd89b6e99a60f17786a3f9102c63a42..1be2cb895ef6d844b4130a3634274333
</span>
QStringList supportedFeatures()
diff --git a/tools/qcatool/main.cpp b/tools/qcatool/main.cpp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index b9ad99742df241d95745d362898b52675a22e3d6..ba009b9832ecf8e862bf89263ffcec5362f59b06 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b9ad99742df241d95745d362898b52675a22e3d6..adf5275b50735bde4ac0b19e68b38bcbe0caaa19 100644
</span> --- a/tools/qcatool/main.cpp
+++ b/tools/qcatool/main.cpp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -31,6 +31,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -31,6 +31,19 @@
</span> #include "import_plugins.h"
#endif
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -196,11 +196,16 @@ index b9ad99742df241d95745d362898b52675a22e3d6..ba009b9832ecf8e862bf89263ffcec53
</span> +# define ENDL endl
+# define SPLITPARS QString::KeepEmptyParts
+#endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define QASPRINTF QString::asprintf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define QASPRINTF QString().sprintf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> +
const char *const APPNAME = "qcatool";
const char *const EXENAME = "qcatool";
const char *const VERSION = QCA_VERSION_STR;
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -85,14 +93,14 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -85,14 +98,14 @@ public:
</span>
void logTextMessage(const QString &message, enum QCA::Logger::Severity severity) override
{
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -217,7 +222,7 @@ index b9ad99742df241d95745d362898b52675a22e3d6..ba009b9832ecf8e862bf89263ffcec53
</span> }
private:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -124,7 +132,7 @@ static void output_plugin_diagnostic_text()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -124,7 +137,7 @@ static void output_plugin_diagnostic_text()
</span> QCA::clearPluginDiagnosticText();
if (str[str.length() - 1] == QLatin1Char('\n'))
str.truncate(str.length() - 1);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -226,7 +231,7 @@ index b9ad99742df241d95745d362898b52675a22e3d6..ba009b9832ecf8e862bf89263ffcec53
</span> for (int n = 0; n < lines.count(); ++n)
fprintf(stderr, "plugin: %s\n", qPrintable(lines[n]));
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -135,7 +143,7 @@ static void output_keystore_diagnostic_text()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -135,7 +148,7 @@ static void output_keystore_diagnostic_text()
</span> QCA::KeyStoreManager::clearDiagnosticText();
if (str[str.length() - 1] == QLatin1Char('\n'))
str.truncate(str.length() - 1);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -235,7 +240,7 @@ index b9ad99742df241d95745d362898b52675a22e3d6..ba009b9832ecf8e862bf89263ffcec53
</span> for (int n = 0; n < lines.count(); ++n)
fprintf(stderr, "keystore: %s\n", qPrintable(lines[n]));
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -145,7 +153,7 @@ static void output_message_diagnostic_text(QCA::SecureMessage *msg)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -145,7 +158,7 @@ static void output_message_diagnostic_text(QCA::SecureMessage *msg)
</span> QString str = msg->diagnosticText();
if (str[str.length() - 1] == QLatin1Char('\n'))
str.truncate(str.length() - 1);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -244,6 +249,66 @@ index b9ad99742df241d95745d362898b52675a22e3d6..ba009b9832ecf8e862bf89263ffcec53
</span> for (int n = 0; n < lines.count(); ++n)
fprintf(stderr, "message: %s\n", qPrintable(lines[n]));
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -162,7 +175,11 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ kg.set = set;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QEventLoop eventLoop;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ kg.eventLoop = &eventLoop;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QTimer::singleShot(0, &kg, &AnimatedKeyGen::start);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QTimer::singleShot(0, &kg, SLOT(start()));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ eventLoop.exec();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA::PrivateKey key = kg.key;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return key;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -251,7 +268,11 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ KeyStoreMonitor monitor;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QEventLoop eventLoop;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ monitor.eventLoop = &eventLoop;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QTimer::singleShot(0, &monitor, &KeyStoreMonitor::start);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QTimer::singleShot(0, &monitor, SLOT(start()));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ eventLoop.exec();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1525,7 +1546,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // provider settings (always write at least 10 providers)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (int n = 0; n < 10 || n < providers.count(); ++n) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString prefix = QString::asprintf("provider_%02d_", n);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QString prefix = QASPRINTF("provider_%02d_", n);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Pkcs11ProviderConfig provider;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (n < providers.count())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1553,7 +1574,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pin_cache = in[QStringLiteral("pin_cache")].toInt();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (int n = 0;; ++n) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString prefix = QString::asprintf("provider_%02d_", n);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QString prefix = QASPRINTF("provider_%02d_", n);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // collect all key/values with this prefix into a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // a separate container, leaving out the prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f882ecde17bfb889fc01bd00e18f6772caded172..42cf15e429ca14790fdfa2f200cec7888ca07f3b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/unittest/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/unittest/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -27,7 +27,12 @@ add_subdirectory(logger)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_subdirectory(macunittest)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_subdirectory(metatype)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_subdirectory(pgpunittest)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-add_subdirectory(pipeunittest)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if (Qt5Test_FOUND AND Qt5Test_VERSION VERSION_GREATER_EQUAL 5.4.0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ add_subdirectory(pipeunittest)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # RJVB being lazy; too many point changes in the pipeunittest
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ message(STATUS "Skipping pipeunittest; Qt ${Qt5Test_VERSION} too old")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_subdirectory(pkits)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_subdirectory(rsaunittest)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ add_subdirectory(securearrayunittest)
</span> diff --git a/unittest/bigintunittest/bigintunittest.cpp b/unittest/bigintunittest/bigintunittest.cpp
index a94d15cc4db598d42b6d6d884be9a6186d27e76c..c4b6812034f50e6206d83e3d292df60cf315b5b6 100644
--- a/unittest/bigintunittest/bigintunittest.cpp
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -270,6 +335,22 @@ index a94d15cc4db598d42b6d6d884be9a6186d27e76c..c4b6812034f50e6206d83e3d292df60c
</span> QCOMPARE(testString, QStringLiteral("4000000000000-40000000000002000000000000\n"));
// Botan's addition tests
<span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/unittest/filewatchunittest/filewatchunittest.cpp b/unittest/filewatchunittest/filewatchunittest.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d1bc117cb6f6bd2c135d7a404010c114779c23ec..ad238877c3f69ce8b68e112a7614ddb5a40acc68 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/unittest/filewatchunittest/filewatchunittest.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/unittest/filewatchunittest/filewatchunittest.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -45,7 +45,11 @@ void FileWatchUnitTest::filewatchTest()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA::FileWatch watcher;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCOMPARE(watcher.fileName(), QString());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QSignalSpy spy(&watcher, &QCA::FileWatch::changed);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QSignalSpy spy(&watcher, SIGNAL(changed()));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QVERIFY(spy.isValid());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCOMPARE(spy.count(), 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> diff --git a/src/qca_default.cpp b/src/qca_default.cpp
index 294b90565e50c493da36eb6a5ba998fe2cb48645..5c8b7c3e113f7f2f7cb9151f5b4b8464e388b8f0 100644
--- a/src/qca_default.cpp
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -287,6 +368,87 @@ index 294b90565e50c493da36eb6a5ba998fe2cb48645..5c8b7c3e113f7f2f7cb9151f5b4b8464
</span> if (now.time().msec() > 0)
t /= now.time().msec();
std::srand(t);
<span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/qca_keystore.cpp b/src/qca_keystore.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2284a10d201c700ca2f66d28f173b098b793f8b4..292075b5d481230e05fa800274a38df0dfa04080 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/qca_keystore.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/qca_keystore.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1516,7 +1516,11 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ public Q_SLOTS:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void tracker_updated()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(QString::asprintf("keystore: %p: tracker_updated start", q), Logger::Information);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QString().sprintf("keystore: %p: tracker_updated start", q), Logger::Information);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QMutexLocker locker(&m);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!pending) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1529,7 +1533,11 @@ public Q_SLOTS:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ w.wakeOne();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(QString::asprintf("keystore: %p: tracker_updated end", q), Logger::Information);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QString().sprintf("keystore: %p: tracker_updated end", q), Logger::Information);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void update()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/qca_plugin.cpp b/src/qca_plugin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f00467845bdfda800af7ef7b46e36acd6ecd05ca..7078f6a8015039f3ac25e28aa7b4472c36d0926a 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/qca_plugin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/qca_plugin.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -336,7 +336,11 @@ void ProviderManager::scan()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const int ver = i->p->qcaVersion();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!validVersion(ver)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ errstr = QString::asprintf("plugin version 0x%06x is in the future", ver);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ errstr.sprintf("plugin version 0x%06x is in the future", ver);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ logDebug(QStringLiteral(" %1: (as %2) %3").arg(className, providerName, errstr));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ continue;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -418,7 +422,11 @@ void ProviderManager::scan()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const int ver = i->p->qcaVersion();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!validVersion(ver)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ errstr = QString::asprintf("plugin version 0x%06x is in the future", ver);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ errstr.sprintf("plugin version 0x%06x is in the future", ver);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ logDebug(QStringLiteral(" %1: (class: %2, as %3) %4").arg(fileName, className, providerName, errstr));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ continue;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -451,7 +459,12 @@ bool ProviderManager::add(Provider *p, int priority)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const int ver = p->qcaVersion();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!validVersion(ver)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString errstr = QString::asprintf("plugin version 0x%06x is in the future", ver);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QString errstr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ errstr.sprintf("plugin version 0x%06x is in the future", ver);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ logDebug(QStringLiteral("Directly adding: %1: %2").arg(providerName, errstr));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -491,7 +504,11 @@ void ProviderManager::unloadAll()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ while (!providerItemList.isEmpty()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ProviderItem *i = providerItemList.first();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const QString name = i->p->name();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const QString name = i->fname;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ providerItemList.removeFirst();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ providerList.removeFirst();
</span> diff --git a/src/support/logger.cpp b/src/support/logger.cpp
index cda4ee46b8a83c2a341135320c7ea7437c6eba82..bdd22d008664102a2ea0946563572d141e44aa26 100644
--- a/src/support/logger.cpp
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -336,10 +498,10 @@ index e335edbff3c4b620885cb0e8a745c98f84c4de73..51187b9b44fb868098c6d7ca9111cf89
</span> class botanRandomContext : public QCA::RandomContext
{
diff --git a/plugins/qca-gnupg/gpgproc/gpgproc_p.h b/plugins/qca-gnupg/gpgproc/gpgproc_p.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index 7c21f251b49b7bdcd141f62608501dcc502d93ff..73ab82aa76e78f037ea928fb38f3a9c9e674a42b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 7c21f251b49b7bdcd141f62608501dcc502d93ff..8a53524f7408c3c6cce9dea02099402e5276e874 100644
</span> --- a/plugins/qca-gnupg/gpgproc/gpgproc_p.h
+++ b/plugins/qca-gnupg/gpgproc/gpgproc_p.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -46,11 +46,15 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -46,12 +46,20 @@ public:
</span> &QProcessSignalRelay::proc_readyReadStandardError,
Qt::QueuedConnection);
connect(proc, &QProcess::bytesWritten, this, &QProcessSignalRelay::proc_bytesWritten, Qt::QueuedConnection);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -352,9 +514,14 @@ index 7c21f251b49b7bdcd141f62608501dcc502d93ff..73ab82aa76e78f037ea928fb38f3a9c9
</span> +#else
+ connect(proc, SIGNAL(finished(int)), SLOT(proc_finished(int)), Qt::QueuedConnection);
+#endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
</span> connect(proc, &QProcess::errorOccurred, this, &QProcessSignalRelay::proc_error, Qt::QueuedConnection);
<span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ connect(proc, SIGNAL(error(QProcess::ProcessError)), SLOT(proc_error(QProcess::ProcessError)), Qt::QueuedConnection);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ Q_SIGNALS:
</span> diff --git a/plugins/qca-ossl/qca-ossl.cpp b/plugins/qca-ossl/qca-ossl.cpp
index 9c81746844f9d8543f7e9eff8603662f495d7a1e..74c5f49c6754b0350a3367ac90d404e4e756b2b2 100644
--- a/plugins/qca-ossl/qca-ossl.cpp
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -388,10 +555,90 @@ index 9c81746844f9d8543f7e9eff8603662f495d7a1e..74c5f49c6754b0350a3367ac90d404e4
</span> X509_set_pubkey(x, static_cast<const MyPKeyContext *>(req.subjectPublicKey())->get_pkey());
X509_set_subject_name(x, subjectName);
diff --git a/plugins/qca-pkcs11/qca-pkcs11.cpp b/plugins/qca-pkcs11/qca-pkcs11.cpp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index ae13bf0a3c34f87614f446ecebd32fa43976e611..3d707d5b1f1d2f1ff0e81dd9b53d48a818263960 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index ae13bf0a3c34f87614f446ecebd32fa43976e611..8ee1d881b6c64a32b618ffae0ae25fd38bb18fb2 100644
</span> --- a/plugins/qca-pkcs11/qca-pkcs11.cpp
+++ b/plugins/qca-pkcs11/qca-pkcs11.cpp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1048,8 +1048,11 @@ private:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -29,6 +29,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <pkcs11-helper-1.0/pkcs11h-certificate.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <pkcs11-helper-1.0/pkcs11h-token.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define QASPRINTF QString::asprintf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define QASPRINTF QString().sprintf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ using namespace QCA;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // qPrintable is ASCII only!!!
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -443,7 +449,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bool ret = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11RSAContext::decrypt - decrypt in.size()=%d, alg=%d", in.size(), (int)alg),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11RSAContext::decrypt - decrypt in.size()=%d, alg=%d", in.size(), (int)alg),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -506,11 +512,11 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (s_keyStoreList != nullptr) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ s_keyStoreList->_emit_diagnosticText(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("PKCS#11: Cannot decrypt: %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("PKCS#11: Cannot decrypt: %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11RSAContext::decrypt - decrypt out->size()=%d", out->size()),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11RSAContext::decrypt - decrypt out->size()=%d", out->size()),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -538,7 +544,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case EMSA1_SHA1:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case EMSA3_RIPEMD160:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("PKCS#11: Invalid hash algorithm %d", _sign_data.alg),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("PKCS#11: Invalid hash algorithm %d", _sign_data.alg),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Warning);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -632,14 +638,14 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (s_keyStoreList != nullptr) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ s_keyStoreList->_emit_diagnosticText(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("PKCS#11: Cannot sign: %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("PKCS#11: Cannot sign: %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _clearSign();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11RSAContext::endSign - return result.size ()=%d", int(result.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11RSAContext::endSign - return result.size ()=%d", int(result.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -715,7 +721,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret = pkcs11h_token_ensureAccess(_pkcs11h_certificate_id->token_id, nullptr, 0) == CKR_OK;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11RSAContext::_ensureTokenAvailable - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11RSAContext::_ensureTokenAvailable - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -730,7 +736,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret = pkcs11h_token_ensureAccess(_pkcs11h_certificate_id->token_id, nullptr, PKCS11H_PROMPT_MASK_ALLOW_ALL) ==
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CKR_OK;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11RSAContext::_ensureTokenAccess - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11RSAContext::_ensureTokenAccess - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1048,8 +1054,11 @@ private:
</span>
Certificate cert = Certificate::fromDER(QByteArray((char *)blob, blob_size));
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -404,8 +651,785 @@ index ae13bf0a3c34f87614f446ecebd32fa43976e611..3d707d5b1f1d2f1ff0e81dd9b53d48a8
</span> return TRUE; // krazy:exclude=captruefalse
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1105,7 +1114,7 @@ pkcs11KeyStoreListContext::pkcs11KeyStoreListContext(Provider *p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ : KeyStoreListContext(p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::pkcs11KeyStoreListContext - entry Provider=%p", (void *)p),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::pkcs11KeyStoreListContext - entry Provider=%p", (void *)p),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _last_id = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1142,7 +1151,7 @@ void pkcs11KeyStoreListContext::start()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void pkcs11KeyStoreListContext::setUpdatesEnabled(bool enabled)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::setUpdatesEnabled - entry enabled=%d", enabled ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::setUpdatesEnabled - entry enabled=%d", enabled ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1154,7 +1163,7 @@ void pkcs11KeyStoreListContext::setUpdatesEnabled(bool enabled)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch (const pkcs11Exception &e) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ s_keyStoreList->_emit_diagnosticText(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("PKCS#11: Start event failed %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("PKCS#11: Start event failed %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(QStringLiteral("pkcs11KeyStoreListContext::setUpdatesEnabled - return"), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1162,7 +1171,7 @@ void pkcs11KeyStoreListContext::setUpdatesEnabled(bool enabled)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ KeyStoreEntryContext *pkcs11KeyStoreListContext::entry(int id, const QString &entryId)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::entry - entry/return id=%d entryId='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::entry - entry/return id=%d entryId='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(entryId)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1178,7 +1187,7 @@ KeyStoreEntryContext *pkcs11KeyStoreListContext::entryPassive(const QString &ser
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pkcs11h_certificate_id_t certificate_id = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::entryPassive - entry serialized='%s'", myPrintable(serialized)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::entryPassive - entry serialized='%s'", myPrintable(serialized)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1196,7 +1205,7 @@ KeyStoreEntryContext *pkcs11KeyStoreListContext::entryPassive(const QString &ser
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch (const pkcs11Exception &e) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ s_keyStoreList->_emit_diagnosticText(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("PKCS#11: Add key store entry %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("PKCS#11: Add key store entry %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (certificate_id != nullptr) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1204,7 +1213,7 @@ KeyStoreEntryContext *pkcs11KeyStoreListContext::entryPassive(const QString &ser
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ certificate_id = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::entryPassive - return entry=%p", (void *)entry),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::entryPassive - return entry=%p", (void *)entry),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return entry;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1214,7 +1223,7 @@ KeyStore::Type pkcs11KeyStoreListContext::type(int id) const
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Q_UNUSED(id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::type - entry/return id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::type - entry/return id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return KeyStore::SmartCard;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1223,13 +1232,13 @@ QString pkcs11KeyStoreListContext::storeId(int id) const
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::storeId - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::storeId - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (_storesById.contains(id)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret = _tokenId2storeId(_storesById[id]->tokenId());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::storeId - return ret=%s", myPrintable(ret)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::storeId - return ret=%s", myPrintable(ret)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1239,13 +1248,13 @@ QString pkcs11KeyStoreListContext::name(int id) const
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::name - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::name - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (_storesById.contains(id)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret = QString::fromLatin1(_storesById[id]->tokenId()->label);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::name - return ret=%s", myPrintable(ret)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::name - return ret=%s", myPrintable(ret)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1255,7 +1264,7 @@ QList<KeyStoreEntry::Type> pkcs11KeyStoreListContext::entryTypes(int id) const
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Q_UNUSED(id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::entryTypes - entry/return id=%d", id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::entryTypes - entry/return id=%d", id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QList<KeyStoreEntry::Type> list;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1311,7 +1320,7 @@ QList<int> pkcs11KeyStoreListContext::keyStores()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch (const pkcs11Exception &e) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ s_keyStoreList->_emit_diagnosticText(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("PKCS#11: Cannot get key stores: %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("PKCS#11: Cannot get key stores: %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (tokens != nullptr) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1319,7 +1328,7 @@ QList<int> pkcs11KeyStoreListContext::keyStores()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::keyStores - return out.size()=%d", int(out.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::keyStores - return out.size()=%d", int(out.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return out;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1330,7 +1339,7 @@ QList<KeyStoreEntryContext *> pkcs11KeyStoreListContext::entryList(int id)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pkcs11h_certificate_id_list_t certs = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QList<KeyStoreEntryContext *> out;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::entryList - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::entryList - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CK_RV rv;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1393,7 +1402,7 @@ QList<KeyStoreEntryContext *> pkcs11KeyStoreListContext::entryList(int id)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ current->certificate_id, false, chain, friendlyNames[certificateHash(chain.primary())]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch (const pkcs11Exception &e) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- s_keyStoreList->_emit_diagnosticText(QString::asprintf(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ s_keyStoreList->_emit_diagnosticText(QASPRINTF(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "PKCS#11: Add key store entry %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1408,14 +1417,14 @@ QList<KeyStoreEntryContext *> pkcs11KeyStoreListContext::entryList(int id)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ out += _keyStoreEntryByCertificateId(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ current->certificate_id, true, chain, friendlyNames[certificateHash(chain.primary())]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch (const pkcs11Exception &e) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- s_keyStoreList->_emit_diagnosticText(QString::asprintf(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ s_keyStoreList->_emit_diagnosticText(QASPRINTF(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "PKCS#11: Add key store entry %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch (const pkcs11Exception &e) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ s_keyStoreList->_emit_diagnosticText(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("PKCS#11: Enumerating store failed %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("PKCS#11: Enumerating store failed %lu-'%s'.\n", e.rv(), myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (certs != nullptr) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1423,7 +1432,7 @@ QList<KeyStoreEntryContext *> pkcs11KeyStoreListContext::entryList(int id)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::entryList - return out.size()=%d", int(out.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::entryList - return out.size()=%d", int(out.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return out;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1436,7 +1445,7 @@ bool pkcs11KeyStoreListContext::_tokenPrompt(void *const user_data, const pkcs11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString storeId, storeName;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bool ret = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::_tokenPrompt - entry user_data=%p, token_id=%p",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::_tokenPrompt - entry user_data=%p, token_id=%p",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ user_data,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void *)token_id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1460,7 +1469,7 @@ bool pkcs11KeyStoreListContext::_tokenPrompt(void *const user_data, const pkcs11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret = true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::_tokenPrompt - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::_tokenPrompt - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1473,7 +1482,7 @@ bool pkcs11KeyStoreListContext::_pinPrompt(void *const user_data, const pkcs11h_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString storeId, storeName;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bool ret = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::_pinPrompt - entry user_data=%p, token_id=%p",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::_pinPrompt - entry user_data=%p, token_id=%p",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ user_data,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void *)token_id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1500,7 +1509,7 @@ bool pkcs11KeyStoreListContext::_pinPrompt(void *const user_data, const pkcs11h_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pin = asker.password();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::_pinPrompt - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::_pinPrompt - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1509,7 +1518,7 @@ bool pkcs11KeyStoreListContext::_pinPrompt(void *const user_data, const pkcs11h_
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void pkcs11KeyStoreListContext::_emit_diagnosticText(const QString &t)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::_emit_diagnosticText - entry t='%s'", myPrintable(t)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::_emit_diagnosticText - entry t='%s'", myPrintable(t)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(t, Logger::Warning);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1541,7 +1550,7 @@ pkcs11KeyStoreListContext::pkcs11KeyStoreItem *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pkcs11KeyStoreListContext::_registerTokenId(const pkcs11h_token_id_t token_id)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::_registerTokenId - entry token_id=%p", (void *)token_id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::_registerTokenId - entry token_id=%p", (void *)token_id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QMutexLocker l(&_mutexStores);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1570,7 +1579,7 @@ pkcs11KeyStoreListContext::_registerTokenId(const pkcs11h_token_id_t token_id)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::_registerTokenId - return entry=%p", (void *)token_id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::_registerTokenId - return entry=%p", (void *)token_id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return entry;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1600,7 +1609,7 @@ pkcs11KeyStoreListContext::_keyStoreEntryByCertificateId(const pkcs11h_certifica
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pkcs11KeyStoreEntryContext *entry = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::_keyStoreEntryByCertificateId - entry "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::_keyStoreEntryByCertificateId - entry "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "certificate_id=%p, has_private=%d, chain.size()=%d",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void *)certificate_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ has_private ? 1 : 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1647,7 +1656,7 @@ pkcs11KeyStoreListContext::_keyStoreEntryByCertificateId(const pkcs11h_certifica
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::_keyStoreEntryByCertificateId - return entry=%p", (void *)entry),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::_keyStoreEntryByCertificateId - return entry=%p", (void *)entry),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return entry;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1659,7 +1668,7 @@ QString pkcs11KeyStoreListContext::_tokenId2storeId(const pkcs11h_token_id_t tok
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size_t len;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::_tokenId2storeId - entry token_id=%p", (void *)token_id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::_tokenId2storeId - entry token_id=%p", (void *)token_id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (pkcs11h_token_serializeTokenId(nullptr, &len, token_id) != CKR_OK) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1678,7 +1687,7 @@ QString pkcs11KeyStoreListContext::_tokenId2storeId(const pkcs11h_token_id_t tok
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ storeId = QStringLiteral("qca-pkcs11/") + _escapeString(QString::fromUtf8(buf));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("pkcs11KeyStoreListContext::_tokenId2storeId - return storeId='%s'", myPrintable(storeId)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("pkcs11KeyStoreListContext::_tokenId2storeId - return storeId='%s'", myPrintable(storeId)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return storeId;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1692,7 +1701,7 @@ QString pkcs11KeyStoreListContext::_serializeCertificate(const pkcs11h_certifica
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size_t len;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "pkcs11KeyStoreListContext::_serializeCertificate - entry certificate_id=%p, xx, has_private=%d",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void *)certificate_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ has_private ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1711,7 +1720,7 @@ QString pkcs11KeyStoreListContext::_serializeCertificate(const pkcs11h_certifica
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ buf.resize((int)len);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- serialized = QString::asprintf(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ serialized = QASPRINTF(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "qca-pkcs11/0/%s/%d/", myPrintable(_escapeString(QString::fromUtf8(buf))), has_private ? 1 : 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QStringList list;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1721,7 +1730,7 @@ QString pkcs11KeyStoreListContext::_serializeCertificate(const pkcs11h_certifica
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ serialized.append(list.join(QStringLiteral("/")));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::_serializeCertificate - return serialized='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::_serializeCertificate - return serialized='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(serialized)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1736,7 +1745,7 @@ void pkcs11KeyStoreListContext::_deserializeCertificate(const QString &
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pkcs11h_certificate_id_t certificate_id = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ chain.clear();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11KeyStoreListContext::_deserializeCertificate - entry from='%s', "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11KeyStoreListContext::_deserializeCertificate - entry from='%s', "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "p_certificate_id=%p, p_has_private=%p",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(from),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void *)p_certificate_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1804,7 +1813,7 @@ void pkcs11KeyStoreListContext::_deserializeCertificate(const QString &
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "pkcs11KeyStoreListContext::_deserializeCertificate - return *p_certificate_id=%p, chain.size()=%d",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void *)*p_certificate_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int(chain.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1817,7 +1826,7 @@ QString pkcs11KeyStoreListContext::_escapeString(const QString &from) const
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach (QChar c, from) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (c == QLatin1Char('/') || c == QLatin1Char('\\')) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to += QString::asprintf("\\x%04x", c.unicode());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to += QASPRINTF("\\x%04x", c.unicode());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to += c;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1914,7 +1923,7 @@ void pkcs11Provider::init()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch (const pkcs11Exception &e) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(e.message(), Logger::Error);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ appendPluginDiagnosticText(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("An error %s during initialization of qca-pkcs11 plugin\n", myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("An error %s during initialization of qca-pkcs11 plugin\n", myPrintable(e.message())));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } catch (...) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(QStringLiteral("PKCS#11: Unknown error during provider initialization"), Logger::Error);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ appendPluginDiagnosticText(QStringLiteral("Unknown error during initialization of qca-pkcs11 plugin\n"));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1957,7 +1966,7 @@ Provider::Context *pkcs11Provider::createContext(const QString &type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Provider::Context *context = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11Provider::createContext - entry type='%s'", myPrintable(type)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11Provider::createContext - entry type='%s'", myPrintable(type)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (_lowLevelInitialized) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1969,7 +1978,7 @@ Provider::Context *pkcs11Provider::createContext(const QString &type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("pkcs11Provider::createContext - return context=%p", (void *)context),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("pkcs11Provider::createContext - return context=%p", (void *)context),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return context;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2015,14 +2024,14 @@ QVariantMap pkcs11Provider::defaultConfig() const
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mytemplate[QStringLiteral("pin_cache")] = PKCS11H_PIN_CACHE_INFINITE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mytemplate[QStringLiteral("log_level")] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (int i = 0; i < _CONFIG_MAX_PROVIDERS; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("provider_%02d_enabled", i)] = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("provider_%02d_name", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("provider_%02d_library", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("provider_%02d_allow_protected_authentication", i)] = true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("provider_%02d_cert_private", i)] = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("provider_%02d_private_mask", i)] = PKCS11H_PRIVATEMODE_MASK_AUTO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("provider_%02d_slotevent_method", i)] = QStringLiteral("auto");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("provider_%02d_slotevent_timeout", i)] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("provider_%02d_enabled", i)] = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("provider_%02d_name", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("provider_%02d_library", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("provider_%02d_allow_protected_authentication", i)] = true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("provider_%02d_cert_private", i)] = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("provider_%02d_private_mask", i)] = PKCS11H_PRIVATEMODE_MASK_AUTO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("provider_%02d_slotevent_method", i)] = QStringLiteral("auto");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("provider_%02d_slotevent_timeout", i)] = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return mytemplate;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2060,10 +2069,10 @@ void pkcs11Provider::configChanged(const QVariantMap &config)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Add new providers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (int i = 0; i < _CONFIG_MAX_PROVIDERS; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- bool enabled = config[QString::asprintf("provider_%02d_enabled", i)].toBool();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString provider = config[QString::asprintf("provider_%02d_library", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString name = config[QString::asprintf("provider_%02d_name", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString qslotevent = config[QString::asprintf("provider_%02d_slotevent_method", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bool enabled = config[QASPRINTF("provider_%02d_enabled", i)].toBool();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QString provider = config[QASPRINTF("provider_%02d_library", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QString name = config[QASPRINTF("provider_%02d_name", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QString qslotevent = config[QASPRINTF("provider_%02d_slotevent_method", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsigned slotevent = PKCS11H_SLOTEVENT_METHOD_AUTO;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (qslotevent == QLatin1String("trigger")) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ slotevent = PKCS11H_SLOTEVENT_METHOD_TRIGGER;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2077,29 +2086,29 @@ void pkcs11Provider::configChanged(const QVariantMap &config)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (enabled && !provider.isEmpty()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("Loading PKCS#11 provider '%s' (%s)", myPrintable(name), myPrintable(provider)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("Loading PKCS#11 provider '%s' (%s)", myPrintable(name), myPrintable(provider)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Information);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((rv = pkcs11h_addProvider(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(name),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(provider),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- config[QString::asprintf("provider_%02d_allow_protected_authentication", i)].toBool() != false
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ config[QASPRINTF("provider_%02d_allow_protected_authentication", i)].toBool() != false
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ? TRUE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ : FALSE, // krazy:exclude=captruefalse
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (unsigned)config[QString::asprintf("provider_%02d_private_mask", i)].toInt(),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (unsigned)config[QASPRINTF("provider_%02d_private_mask", i)].toInt(),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ slotevent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (unsigned)config[QString::asprintf("provider_%02d_slotevent_timeout", i)].toInt(),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- config[QString::asprintf("provider_%02d_cert_private", i)].toBool() != false
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (unsigned)config[QASPRINTF("provider_%02d_slotevent_timeout", i)].toInt(),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ config[QASPRINTF("provider_%02d_cert_private", i)].toBool() != false
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ? TRUE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ : FALSE // krazy:exclude=captruefalse
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )) != CKR_OK) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("PKCS#11: Cannot log provider '%s'-'%s' %lu-'%s'.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("PKCS#11: Cannot log provider '%s'-'%s' %lu-'%s'.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(name),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(provider),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rv,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pkcs11h_getMessage(rv)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Error);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- appendPluginDiagnosticText(QString::asprintf("Cannot load PKCS#11 provider '%s'\n", myPrintable(name)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ appendPluginDiagnosticText(QASPRINTF("Cannot load PKCS#11 provider '%s'\n", myPrintable(name)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _providers += provider;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/plugins/qca-softstore/qca-softstore.cpp b/plugins/qca-softstore/qca-softstore.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 13b6df7c94a927c32dc3de3e00decaa8e52e3002..2f2d3562df70ed3c11a09f1013b30d6695ecbfba 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/plugins/qca-softstore/qca-softstore.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/plugins/qca-softstore/qca-softstore.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -22,6 +22,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <QtCrypto>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <QtPlugin>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define QASPRINTF QString::asprintf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define QASPRINTF QString().sprintf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ using namespace QCA;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // qPrintable is ASCII only!!!
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -368,7 +374,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cleanup1:;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstorePKeyBase::_ensureAccess - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstorePKeyBase::_ensureAccess - return ret=%d", ret ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -569,7 +575,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString storeId() const override
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return QString::asprintf("%s/%s", "qca-softstore", myPrintable(_entry.name));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return QASPRINTF("%s/%s", "qca-softstore", myPrintable(_entry.name));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString storeName() const override
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -602,7 +608,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ : KeyStoreListContext(p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::softstoreKeyStoreListContext - entry Provider=%p",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::softstoreKeyStoreListContext - entry Provider=%p",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void *)p),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -642,14 +648,14 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void setUpdatesEnabled(bool enabled) override
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::setUpdatesEnabled - entry/return enabled=%d",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::setUpdatesEnabled - entry/return enabled=%d",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ enabled ? 1 : 0),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ KeyStoreEntryContext *entry(int id, const QString &entryId) override
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::entry - entry/return id=%d entryId='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::entry - entry/return id=%d entryId='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(entryId)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -663,7 +669,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ KeyStoreEntryContext *entry = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::entryPassive - entry serialized='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::entryPassive - entry serialized='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(serialized)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -676,7 +682,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::entryPassive - return entry=%p", (void *)entry),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::entryPassive - return entry=%p", (void *)entry),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return entry;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -686,7 +692,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Q_UNUSED(id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::type - entry/return id=%d", id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::type - entry/return id=%d", id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return KeyStore::User;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -696,11 +702,11 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::storeId - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::storeId - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret = QStringLiteral("qca-softstore");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::storeId - return ret=%s", myPrintable(ret)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::storeId - return ret=%s", myPrintable(ret)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -710,11 +716,11 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::name - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::name - entry id=%d", id), Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret = QStringLiteral("User Software Store");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::name - return ret=%s", myPrintable(ret)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::name - return ret=%s", myPrintable(ret)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -724,7 +730,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Q_UNUSED(id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::entryTypes - entry/return id=%d", id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::entryTypes - entry/return id=%d", id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QList<KeyStoreEntry::Type> list;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -742,7 +748,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ list += _last_id;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::keyStores - return out.size()=%d", int(list.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::keyStores - return out.size()=%d", int(list.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return list;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -752,7 +758,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QList<KeyStoreEntryContext *> list;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::entryList - entry id=%d", id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::entryList - entry id=%d", id),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach (const SoftStoreEntry &e, _entries) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -760,7 +766,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::entryList - return out.size()=%d", int(list.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::entryList - return out.size()=%d", int(list.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return list;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -769,7 +775,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void _emit_diagnosticText(const QString &t)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::_emit_diagnosticText - entry t='%s'", myPrintable(t)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::_emit_diagnosticText - entry t='%s'", myPrintable(t)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(t, Logger::Warning);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -817,21 +823,21 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _entries.clear();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (int i = 0; i < maxEntries; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (config[QString::asprintf("entry_%02d_enabled", i)].toBool()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (config[QASPRINTF("entry_%02d_enabled", i)].toBool()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ConvertResult cresult;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SoftStoreEntry entry;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PublicType publicType = publicTypeInvalid;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- entry.name = config[QString::asprintf("entry_%02d_name", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const QString stringReferenceType = config[QString::asprintf("entry_%02d_private_type", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const QString stringPublicType = config[QString::asprintf("entry_%02d_public_type", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- entry.noPassphrase = config[QString::asprintf("entry_%02d_no_passphrase", i)].toBool();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- entry.unlockTimeout = config[QString::asprintf("entry_%02d_unlock_timeout", i)].toInt();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ entry.name = config[QASPRINTF("entry_%02d_name", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const QString stringReferenceType = config[QASPRINTF("entry_%02d_private_type", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const QString stringPublicType = config[QASPRINTF("entry_%02d_public_type", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ entry.noPassphrase = config[QASPRINTF("entry_%02d_no_passphrase", i)].toBool();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ entry.unlockTimeout = config[QASPRINTF("entry_%02d_unlock_timeout", i)].toInt();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (publicTypeMap.contains(stringPublicType)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ publicType = publicTypeMap[stringPublicType];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _emit_diagnosticText(QString::asprintf("Software Store: Bad public key type of '%s' entry.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _emit_diagnosticText(QASPRINTF("Software Store: Bad public key type of '%s' entry.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(entry.name)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto cleanup1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -839,12 +845,12 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (keyTypeMap.contains(stringReferenceType)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ entry.keyReferenceType = keyTypeMap[stringReferenceType];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _emit_diagnosticText(QString::asprintf("Software Store: Bad private key type of '%s' entry.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _emit_diagnosticText(QASPRINTF("Software Store: Bad private key type of '%s' entry.\n",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(entry.name)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto cleanup1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- entry.keyReference = config[QString::asprintf("entry_%02d_private", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ entry.keyReference = config[QASPRINTF("entry_%02d_private", i)].toString();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch (publicType) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case publicTypeInvalid:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -852,14 +858,14 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case publicTypeX509Chain:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const QStringList base64certs =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- config[QString::asprintf("entry_%02d_public", i)].toString().split(QStringLiteral("!"));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ config[QASPRINTF("entry_%02d_public", i)].toString().split(QStringLiteral("!"));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach (const QString &s, base64certs) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ entry.chain += Certificate::fromDER(Base64().stringToArray(s).toByteArray(), &cresult);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (cresult != ConvertGood) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- _emit_diagnosticText(QString::asprintf(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _emit_diagnosticText(QASPRINTF(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "Software Store: Cannot load certificate of '%s' entry.\n", myPrintable(entry.name)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto cleanup1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -882,11 +888,11 @@ private:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QString serialized;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreKeyStoreListContext::_serializeSoftStoreEntry - entry name=%s",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreKeyStoreListContext::_serializeSoftStoreEntry - entry name=%s",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(entry.name)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- serialized = QString::asprintf("qca-softstore/0/%s/%d/%s/%d/%d/x509chain/",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ serialized = QASPRINTF("qca-softstore/0/%s/%d/%s/%d/%d/x509chain/",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(_escapeString(entry.name)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ entry.keyReferenceType,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(_escapeString(entry.keyReference)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -901,7 +907,7 @@ private:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ serialized.append(list.join(QStringLiteral("/")));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::_serializeSoftStoreEntry - return serialized='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::_serializeSoftStoreEntry - return serialized='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(serialized)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -913,7 +919,7 @@ private:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bool ret = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::_deserializeSoftStoreEntry - entry from='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::_deserializeSoftStoreEntry - entry from='%s'",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(serialized)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -954,7 +960,7 @@ private:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cleanup:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "softstoreKeyStoreListContext::_deserializeSoftStoreEntry - return ret=%d chain.size()=%d",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret ? 1 : 0,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int(entry.chain.size())),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -968,7 +974,7 @@ private:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ softstoreKeyStoreEntryContext *entry = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::_keyStoreEntryBySoftStoreEntry - entry name=%s",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::_keyStoreEntryBySoftStoreEntry - entry name=%s",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ myPrintable(sentry.name)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -986,7 +992,7 @@ private:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ entry = new softstoreKeyStoreEntryContext(key, sentry, serialized, provider());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QCA_logTextMessage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QString::asprintf("softstoreKeyStoreListContext::_keyStoreEntryBySoftStoreEntry - return entry=%p",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QASPRINTF("softstoreKeyStoreListContext::_keyStoreEntryBySoftStoreEntry - return entry=%p",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (void *)entry),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -999,7 +1005,7 @@ private:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach (const QChar &c, from) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (c == QLatin1Char('/') || c == QLatin1Char('\\')) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to += QString::asprintf("\\x%04x", c.unicode());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to += QASPRINTF("\\x%04x", c.unicode());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to += c;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1080,7 +1086,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Provider::Context *context = nullptr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreProvider::createContext - entry type='%s'", myPrintable(type)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreProvider::createContext - entry type='%s'", myPrintable(type)),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (type == QLatin1String("keystorelist")) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1091,7 +1097,7 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ context = s_keyStoreList;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QCA_logTextMessage(QString::asprintf("softstoreProvider::createContext - return context=%p", (void *)context),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QCA_logTextMessage(QASPRINTF("softstoreProvider::createContext - return context=%p", (void *)context),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Logger::Debug);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return context;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1105,14 +1111,14 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mytemplate[QStringLiteral("formtype")] = QStringLiteral("http://affinix.com/qca/forms/qca-softstore#1.0");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (int i = 0; i < _CONFIG_MAX_ENTRIES; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("entry_%02d_enabled", i)] = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("entry_%02d_name", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("entry_%02d_public_type", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("entry_%02d_private_type", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("entry_%02d_public", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("entry_%02d_private", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("entry_%02d_unlock_timeout", i)] = -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- mytemplate[QString::asprintf("entry_%02d_no_passphrase", i)] = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("entry_%02d_enabled", i)] = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("entry_%02d_name", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("entry_%02d_public_type", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("entry_%02d_private_type", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("entry_%02d_public", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("entry_%02d_private", i)] = QLatin1String("");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("entry_%02d_unlock_timeout", i)] = -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mytemplate[QASPRINTF("entry_%02d_no_passphrase", i)] = false;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return mytemplate;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/examples/keyloader/keyloader.cpp b/examples/keyloader/keyloader.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 335678f02db9fefb4065e82326da2f5c6838e4c4..8d5a31e38781ad3b14933a25400f6d184d513ffc 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/examples/keyloader/keyloader.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/examples/keyloader/keyloader.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -108,7 +108,11 @@ int main(int argc, char **argv)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ App app;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ app.str = QFile::decodeName(argv[1]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QObject::connect(&app, &App::quit, &qapp, QCoreApplication::quit);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QTimer::singleShot(0, &app, &App::start);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QTimer::singleShot(0, &app, SLOT(start()));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ qapp.exec();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> diff --git a/examples/saslclient/saslclient.cpp b/examples/saslclient/saslclient.cpp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index 99db413c63bdbecc185e468e6357458a614c4eed..7e0613d7be8e175a0800c5b1fddb0bb23f1dc62e 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 99db413c63bdbecc185e468e6357458a614c4eed..03fccee48918aca64842d122f92449ca161e87d8 100644
</span> --- a/examples/saslclient/saslclient.cpp
+++ b/examples/saslclient/saslclient.cpp
@@ -152,8 +152,10 @@ public:
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -420,8 +1444,20 @@ index 99db413c63bdbecc185e468e6357458a614c4eed..7e0613d7be8e175a0800c5b1fddb0bb2
</span> #endif
sasl = new QCA::SASL(this);
<span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -552,7 +554,11 @@ int main(int argc, char **argv)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ClientTest client(host, port, proto, authzid, realm, user, pass, no_authzid, no_realm);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QObject::connect(&client, &ClientTest::quit, &qapp, &QCoreApplication::quit);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QTimer::singleShot(0, &client, &ClientTest::start);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QTimer::singleShot(0, &client, SLOT(start()));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ qapp.exec();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span> diff --git a/examples/saslserver/saslserver.cpp b/examples/saslserver/saslserver.cpp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index 0983dc7e82e8b48769a68a9ff9db3c3721dbd26a..4cb5a8806561e6e4300db8857cee559c89519c92 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0983dc7e82e8b48769a68a9ff9db3c3721dbd26a..9c235bc43a5f95fd12d54ebc22e02865efd51ba6 100644
</span> --- a/examples/saslserver/saslserver.cpp
+++ b/examples/saslserver/saslserver.cpp
@@ -183,11 +183,13 @@ public:
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -439,11 +1475,59 @@ index 0983dc7e82e8b48769a68a9ff9db3c3721dbd26a..4cb5a8806561e6e4300db8857cee559c
</span> #endif
connect(sock, &QTcpSocket::bytesWritten, this, &ServerTestHandler::sock_bytesWritten);
<span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -515,7 +517,11 @@ int main(int argc, char **argv)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ServerTest server(host, port, proto, realm, str);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QObject::connect(&server, &ServerTest::quit, &qapp, &QCoreApplication::quit);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QTimer::singleShot(0, &server, &ServerTest::start);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QTimer::singleShot(0, &server, SLOT(start()));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ qapp.exec();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span> diff --git a/examples/sslservtest/sslservtest.cpp b/examples/sslservtest/sslservtest.cpp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index 4e4cfd4d3b4bd7c877c442cb5a3f0f759c194823..85f203d5dcdfcd25e461b5ce20a1d55f84b71446 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4e4cfd4d3b4bd7c877c442cb5a3f0f759c194823..690c5d981f01bfa468ea23650bdeb46f23b84b1f 100644
</span> --- a/examples/sslservtest/sslservtest.cpp
+++ b/examples/sslservtest/sslservtest.cpp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -162,8 +162,10 @@ private Q_SLOTS:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -33,6 +33,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "import_plugins.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define SSQUIT &SecureServer::quit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define QAQUIT &QCoreApplication::quit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define SSQUIT SLOT(quit())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define QAQUIT SLOT(quit())
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char pemdata_cert[] =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "-----BEGIN CERTIFICATE-----\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "MIICeTCCAeKgAwIBAgIRAKKKnOj6Aarmwf0phApitVAwDQYJKoZIhvcNAQEFBQAw\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -111,17 +119,17 @@ public:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (cert.isNull()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ qDebug() << "Error loading cert!";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QTimer::singleShot(0, this, &SecureServer::quit);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QTimer::singleShot(0, this, SSQUIT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (privkey.isNull()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ qDebug() << "Error loading private key!";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QTimer::singleShot(0, this, &SecureServer::quit);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QTimer::singleShot(0, this, SSQUIT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (false == server->listen(QHostAddress::Any, port)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ qDebug() << "Error binding to port " << port;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QTimer::singleShot(0, this, &SecureServer::quit);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QTimer::singleShot(0, this, SSQUIT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ qDebug() << "Listening on port" << port;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -162,8 +170,10 @@ private Q_SLOTS:
</span> connect(sock, &QTcpSocket::disconnected, this, &SecureServer::sock_disconnected);
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
connect(sock, &QTcpSocket::errorOccurred, this, &SecureServer::sock_error);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -455,6 +1539,15 @@ index 4e4cfd4d3b4bd7c877c442cb5a3f0f759c194823..85f203d5dcdfcd25e461b5ce20a1d55f
</span> #endif
connect(sock, &QTcpSocket::bytesWritten, this, &SecureServer::sock_bytesWritten);
<span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -273,7 +283,7 @@ int main(int argc, char **argv)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SecureServer *server = new SecureServer(port);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- QObject::connect(server, &SecureServer::quit, &app, &QCoreApplication::quit);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ QObject::connect(server, SSQUIT, &app, QAQUIT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ server->start();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ app.exec();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete server;
</span> diff --git a/examples/ssltest/ssltest.cpp b/examples/ssltest/ssltest.cpp
index 471bd119e1fcd14aff8a1dc20a0d49ee54df770f..166faf6bbe52a515187f9f3cbc676763e9b28588 100644
--- a/examples/ssltest/ssltest.cpp
</pre><pre style='margin:0'>
</pre>