aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolmaccount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/e2ee/qolmaccount.cpp')
-rw-r--r--lib/e2ee/qolmaccount.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/e2ee/qolmaccount.cpp b/lib/e2ee/qolmaccount.cpp
index 241ae750..c3714363 100644
--- a/lib/e2ee/qolmaccount.cpp
+++ b/lib/e2ee/qolmaccount.cpp
@@ -162,17 +162,13 @@ OneTimeKeys QOlmAccount::signOneTimeKeys(const UnsignedOneTimeKeys &keys) const
OneTimeKeys signedOneTimeKeys;
for (const auto& curveKeys = keys.curve25519();
const auto& [keyId, key] : asKeyValueRange(curveKeys))
- signedOneTimeKeys["signed_curve25519:" % keyId] =
- signedOneTimeKey(key.toUtf8(), sign(QJsonObject{{"key", key}}));
+ signedOneTimeKeys.insert("signed_curve25519:" % keyId,
+ SignedOneTimeKey {
+ key, m_userId, m_deviceId,
+ sign(QJsonObject { { "key", key } }) });
return signedOneTimeKeys;
}
-SignedOneTimeKey QOlmAccount::signedOneTimeKey(const QByteArray& key,
- const QString& signature) const
-{
- return { key, { { m_userId, { { "ed25519:" + m_deviceId, signature } } } } };
-}
-
std::optional<QOlmError> QOlmAccount::removeOneTimeKeys(
const QOlmSession& session)
{