aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-02-14 15:25:24 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-02-16 17:58:17 +0100
commit0a43c023b94e12b3130572f2dd0d6ac8bb4ed110 (patch)
tree46e9bc94c44e1118e2fcede133c01aaed0ca652d /lib/connection.cpp
parent2178ca994c4b33197239155f7f6715e0451b9172 (diff)
downloadlibquotient-0a43c023b94e12b3130572f2dd0d6ac8bb4ed110.tar.gz
libquotient-0a43c023b94e12b3130572f2dd0d6ac8bb4ed110.zip
isSupportedAlgorithm()
That's a better primitive than just exposing SupportedAlgorithms list.
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 0562d416..87fc8e2c 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -2000,8 +2000,11 @@ void Connection::Private::loadOutdatedUserDevices()
<< device.userId << user;
continue;
}
- if(!device.algorithms.contains("m.olm.v1.curve25519-aes-sha2") || !device.algorithms.contains("m.megolm.v1.aes-sha2")) {
- qCWarning(E2EE) << "Unsupported encryption algorithms found" << device.algorithms;
+ if (!std::all_of(device.algorithms.cbegin(),
+ device.algorithms.cend(),
+ isSupportedAlgorithm)) {
+ qCWarning(E2EE) << "Unsupported encryption algorithms found"
+ << device.algorithms;
continue;
}
if(!verifyIdentitySignature(device, device.deviceId, device.userId)) {