-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add parameter 'keyOwnerJid' to trust storages' 'trustLevel()'
- Loading branch information
Showing
7 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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("[email protected]"), | ||
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("[email protected]"), | ||
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("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("0RcVsGk3LnpEFsqqztTzAgCDgVXlfa03paSqJFOOWOU="))); | ||
QVERIFY(future.isFinished()); | ||
auto result = future.result(); | ||
QCOMPARE(result, QXmppTrustStorage::Authenticated); | ||
|
||
future = m_trustStorage->trustLevel(ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("tYn/wcIOxBSoW4W1UfPr/zgbLipBK2KsFfC7F1bzut0="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
QCOMPARE(result, QXmppTrustStorage::Authenticated); | ||
|
||
future = m_trustStorage->trustLevel(ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
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("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("+1VJvMLCGvkDquZ6mQZ+SS+gTbQ436BJUwFOoW0Ma1g="))); | ||
QVERIFY(future.isFinished()); | ||
auto result = future.result(); | ||
QCOMPARE(result, QXmppTrustStorage::Authenticated); | ||
|
||
future = m_trustStorage->trustLevel(ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("mzDeKTQBVm1cTmzF9DjCGKa14pDADZOVLT9Kh7CK7AM="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
QCOMPARE(result, QXmppTrustStorage::Authenticated); | ||
|
||
future = m_trustStorage->trustLevel(ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("8gBTC1fspYkO4akS6QKN+XFA9Nmf9NEIg7hjtlpTjII="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -523,6 +523,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() | |
|
||
auto future = m_trustStorage.trustLevel( | ||
ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("AZ/cF4OrUOILKO1gQBf62pQevOhBJ2NyHnXLwM4FDZU="))); | ||
QVERIFY(future.isFinished()); | ||
auto result = future.result(); | ||
|
@@ -538,13 +539,15 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() | |
|
||
future = m_trustStorage.trustLevel( | ||
ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("AZ/cF4OrUOILKO1gQBf62pQevOhBJ2NyHnXLwM4FDZU="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
QCOMPARE(result, QXmppTrustStorage::Authenticated); | ||
|
||
future = m_trustStorage.trustLevel( | ||
ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("9E51lG3vVmUn8CM7/AIcmIlLP2HPl6Ao0/VSf4VT/oA="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
|
@@ -560,6 +563,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() | |
|
||
future = m_trustStorage.trustLevel( | ||
ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("9w6oPjKyGSALd9gHq7sNOdOAkD5bHUVOKACNs89FjkA="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
|
@@ -569,6 +573,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() | |
// The default value is returned. | ||
future = m_trustStorage.trustLevel( | ||
ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("WXL4EDfzUGbVPQWjT9pmBeiCpCBzYZv3lUAaj+UbPyE="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
|
@@ -585,13 +590,15 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() | |
|
||
future = m_trustStorage.trustLevel( | ||
ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("AZ/cF4OrUOILKO1gQBf62pQevOhBJ2NyHnXLwM4FDZU="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
QCOMPARE(result, QXmppTrustStorage::ManuallyDistrusted); | ||
|
||
future = m_trustStorage.trustLevel( | ||
ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("9E51lG3vVmUn8CM7/AIcmIlLP2HPl6Ao0/VSf4VT/oA="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
|
@@ -600,6 +607,7 @@ void tst_QXmppTrustMemoryStorage::testTrustLevels() | |
// Verify that the default trust level is returned for an unknown key. | ||
future = m_trustStorage.trustLevel( | ||
ns_omemo, | ||
QStringLiteral("[email protected]"), | ||
QByteArray::fromBase64(QByteArrayLiteral("wE06Gwf8f4DvDLFDoaCsGs8ibcUjf84WIOA2FAjPI3o="))); | ||
QVERIFY(future.isFinished()); | ||
result = future.result(); | ||
|