aboutsummaryrefslogtreecommitdiff
path: root/tests/qxmppatmmanager/tst_qxmppatmmanager.cpp
diff options
context:
space:
mode:
authorMelvin Keskin <melvo@olomono.de>2022-03-07 14:58:29 +0100
committerLinus Jahn <lnj@kaidan.im>2022-03-07 20:19:29 +0100
commitebbf58a05ca112b7e56df8aa072f410398a86dae (patch)
tree414f3459888096124d4b3a1846c355ce2d0f290d /tests/qxmppatmmanager/tst_qxmppatmmanager.cpp
parent76965a11aa4d230ae8636c67e0e6f9ce20f5ec5c (diff)
downloadqxmpp-ebbf58a05ca112b7e56df8aa072f410398a86dae.tar.gz
Add parameter 'keyOwnerJid' to trust storages' 'trustLevel()'
Diffstat (limited to 'tests/qxmppatmmanager/tst_qxmppatmmanager.cpp')
-rw-r--r--tests/qxmppatmmanager/tst_qxmppatmmanager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/qxmppatmmanager/tst_qxmppatmmanager.cpp b/tests/qxmppatmmanager/tst_qxmppatmmanager.cpp
index 215d7e8c..f8a55896 100644
--- a/tests/qxmppatmmanager/tst_qxmppatmmanager.cpp
+++ b/tests/qxmppatmmanager/tst_qxmppatmmanager.cpp
@@ -1683,6 +1683,7 @@ void tst_QXmppAtmManager::testMakeTrustDecisionsSoleOwnKeyDistrusted()
QVERIFY2(!unexpectedTrustMessageSentSpy.wait(UNEXPECTED_TRUST_MESSAGE_WAITING_TIMEOUT), "Unexpected trust message sent!");
auto futureTrustLevel = m_trustStorage->trustLevel(ns_omemo,
+ QStringLiteral("alice@example.org"),
QByteArray::fromBase64(QByteArrayLiteral("RwyI/3m9l4wgju9JduFxb5MEJvBNRDfPfo1Ewhl1DEI=")));
QVERIFY(futureTrustLevel.isFinished());
auto result = futureTrustLevel.result();
@@ -2026,6 +2027,7 @@ void tst_QXmppAtmManager::testMakeTrustDecisionsSoleContactKeyDistrusted()
QVERIFY2(!unexpectedTrustMessageSentSpy.wait(UNEXPECTED_TRUST_MESSAGE_WAITING_TIMEOUT), "Unexpected trust message sent!");
const auto futureTrustLevel = m_trustStorage->trustLevel(ns_omemo,
+ QStringLiteral("bob@example.com"),
QByteArray::fromBase64(QByteArrayLiteral("+1VJvMLCGvkDquZ6mQZ+SS+gTbQ436BJUwFOoW0Ma1g=")));
QVERIFY(futureTrustLevel.isFinished());
const auto result = futureTrustLevel.result();
@@ -2035,18 +2037,21 @@ void tst_QXmppAtmManager::testMakeTrustDecisionsSoleContactKeyDistrusted()
void tst_QXmppAtmManager::testMakeTrustDecisionsOwnKeysDone()
{
auto future = m_trustStorage->trustLevel(ns_omemo,
+ QStringLiteral("alice@example.org"),
QByteArray::fromBase64(QByteArrayLiteral("0RcVsGk3LnpEFsqqztTzAgCDgVXlfa03paSqJFOOWOU=")));
QVERIFY(future.isFinished());
auto result = future.result();
QCOMPARE(result, QXmppTrustStorage::Authenticated);
future = m_trustStorage->trustLevel(ns_omemo,
+ QStringLiteral("alice@example.org"),
QByteArray::fromBase64(QByteArrayLiteral("tYn/wcIOxBSoW4W1UfPr/zgbLipBK2KsFfC7F1bzut0=")));
QVERIFY(future.isFinished());
result = future.result();
QCOMPARE(result, QXmppTrustStorage::Authenticated);
future = m_trustStorage->trustLevel(ns_omemo,
+ QStringLiteral("alice@example.org"),
QByteArray::fromBase64(QByteArrayLiteral("4iBsyJPVAfNWM/OgyA9fasOvkJ8K1/0wuYpwVGw4Q5M=")));
QVERIFY(future.isFinished());
result = future.result();
@@ -2056,18 +2061,21 @@ void tst_QXmppAtmManager::testMakeTrustDecisionsOwnKeysDone()
void tst_QXmppAtmManager::testMakeTrustDecisionsContactKeysDone()
{
auto future = m_trustStorage->trustLevel(ns_omemo,
+ QStringLiteral("bob@example.com"),
QByteArray::fromBase64(QByteArrayLiteral("+1VJvMLCGvkDquZ6mQZ+SS+gTbQ436BJUwFOoW0Ma1g=")));
QVERIFY(future.isFinished());
auto result = future.result();
QCOMPARE(result, QXmppTrustStorage::Authenticated);
future = m_trustStorage->trustLevel(ns_omemo,
+ QStringLiteral("bob@example.com"),
QByteArray::fromBase64(QByteArrayLiteral("mzDeKTQBVm1cTmzF9DjCGKa14pDADZOVLT9Kh7CK7AM=")));
QVERIFY(future.isFinished());
result = future.result();
QCOMPARE(result, QXmppTrustStorage::Authenticated);
future = m_trustStorage->trustLevel(ns_omemo,
+ QStringLiteral("bob@example.com"),
QByteArray::fromBase64(QByteArrayLiteral("8gBTC1fspYkO4akS6QKN+XFA9Nmf9NEIg7hjtlpTjII=")));
QVERIFY(future.isFinished());
result = future.result();