aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
authorAlexey Andreyev <aa13q@ya.ru>2021-01-28 23:51:56 +0300
committerTobias Fella <fella@posteo.de>2021-12-01 21:34:52 +0100
commitd72f220e3e3a3b243fdafd93d1405f8207dc516a (patch)
treef4306b6397e39d6842a29f9a31fe5c858be8a4af /lib/connection.cpp
parent9f71b2a79fba7c5d5ce09ebfdd482c8c470203d9 (diff)
downloadlibquotient-d72f220e3e3a3b243fdafd93d1405f8207dc516a.tar.gz
libquotient-d72f220e3e3a3b243fdafd93d1405f8207dc516a.zip
E2EE: initial port to internal olm wrapper
Remove qtolm git module. Update CMakeLists.txt. Rename olm to crypto subdir to prevent disambiguation. Rename internal files accordingly. Comment out not ported E2EE API usage.
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index e65fdac4..f96eeb71 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -38,7 +38,7 @@
#include "jobs/syncjob.h"
#ifdef Quotient_E2EE_ENABLED
-# include "account.h" // QtOlm
+# include "crypto/qolmaccount.h"
#endif // Quotient_E2EE_ENABLED
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
@@ -191,7 +191,7 @@ public:
return {};
const auto identityKey =
- encryptionManager->account()->curve25519IdentityKey();
+ encryptionManager->account()->identityKeys().curve25519;
const auto personalCipherObject =
encryptedEvent.ciphertext(identityKey);
if (personalCipherObject.isEmpty()) {
@@ -203,7 +203,7 @@ public:
if (decrypted.isEmpty()) {
qCDebug(E2EE) << "Problem with new session from senderKey:"
<< encryptedEvent.senderKey()
- << encryptionManager->account()->oneTimeKeys();
+ << encryptionManager->account()->oneTimeKeys().keys;
return {};
}
@@ -232,10 +232,10 @@ public:
.value(Ed25519Key).toString();
if (ourKey
!= QString::fromUtf8(
- encryptionManager->account()->ed25519IdentityKey())) {
+ encryptionManager->account()->identityKeys().ed25519)) {
qCDebug(E2EE) << "Found key" << ourKey
<< "instead of ours own ed25519 key"
- << encryptionManager->account()->ed25519IdentityKey()
+ << encryptionManager->account()->identityKeys().ed25519
<< "in Olm plaintext";
return {};
}
@@ -1226,7 +1226,7 @@ QByteArray Connection::accessToken() const
bool Connection::isLoggedIn() const { return !accessToken().isEmpty(); }
#ifdef Quotient_E2EE_ENABLED
-QtOlm::Account* Connection::olmAccount() const
+QOlmAccount *Connection::olmAccount() const
{
return d->encryptionManager->account();
}