aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-25IfdefTobias Fella
2022-02-25Save key counts to stateTobias Fella
Otherwise new one time keys will be uploaded on every start
2022-02-25Don't run e2ee on macosTobias Fella
2022-02-24Fix all testsTobias Fella
2022-02-24Fix testTobias Fella
2022-02-23Fix tests a bitTobias Fella
2022-02-18Only testolmaccount on LinuxAlexey Rusakov
On other platforms Docker fails to stand up the container.
2022-02-18TestOlmAccount::claimKeys(): auth bob as bob, not as aliceAlexey Rusakov
2022-02-18testolmaccount.cpp: cleanupAlexey Rusakov
2022-02-18TestOlmAccount: align homeserver address with that in run-tests.shAlexey Rusakov
It would probably be even better to pass the homeserver address in the environment but that's a bigger endeavour. Also: reformatted CREATE_CONNECTION macro.
2022-02-18testgroupsession.*: fix TestOlmSession copy-pastaAlexey Rusakov
2022-02-18run-tests.sh: use a trap for cleanupAlexey Rusakov
This both is more reliable (GHA executes scripts in fail-fast mode) and ensures that the return value is that of ctest.
2022-02-18Use QCoreApplication in autotestsAlexey Rusakov
QEventLoop refuses to work without an application object instance.
2022-02-18CI: setup mock Synapse before running ctestAlexey Rusakov
To use this in CI required extending/fixing autotests/run-tests.sh: it can now accept arguments that are further passed to ctest invocation, and it no more cd's to the build directory because build directories can be in all kinds of places, expecting the caller to pick the directory upfront.
2022-02-17Don't create QApplications in testsTobias Fella
2022-02-16TestOlmUtility: fix building with Qt 5.12Alexey Rusakov
QKeyValueIterator::operator->() only arrived in Qt 5.15.
2022-02-16quotient_export.h: #include <qglobal.h>Alexey Rusakov
To ensure Q_DECL_EXPORT/Q_DECL_IMPORT macros are defined.
2022-02-16ci.yml: enable E2EE pipelines againAlexey Rusakov
The whole cycle will get terribly long again; looking forward to parallel quotest...
2022-02-16More cleanup, especially in EncryptedFileAlexey Rusakov
For EncryptedFile: - JSON converter bodies moved away to .cpp; - instead of C-style casts, reinterpret_cast is used to convert from (const) char* to (const) unsigned char*; - the size for the target plain text takes into account the case where the cipher block size can be larger than 1 (after reading https://www.openssl.org/docs/man1.1.1/man3/EVP_DecryptUpdate.html). - file decryption is wrapped in #ifdef Quotient_E2EE_ENABLED, to avoid OpenSSL linking errors when compiling without E2EE.
2022-02-16isSupportedAlgorithm()Alexey Rusakov
That's a better primitive than just exposing SupportedAlgorithms list.
2022-02-16Use QHash instead of QMapAlexey Rusakov
We don't seem to need sorted associative containers in those cases.
2022-02-16Fix file decryptionTobias Fella
2022-02-16Connection: guard device loading per-objectAlexey Rusakov
Using a static variable is incorrect as it doesn't load the device list for any subsequent created Connection object.
2022-02-16CleanupAlexey Rusakov
A note on switching to QLatin1String for JSON key constants - this is more concise and barely affects (if at all) runtime performance (padding each QChar with zeros is trivial for assignment; and comparison can be done directly with the same performance as for two QStrings).
2022-02-16Add a few missing QUOTIENT_API stanzasAlexey Rusakov
Also, removed Q_GADGET macros from key verification events as those don't seem to do anything (no Q_ENUM/Q_FLAG things, namely).
2022-02-14Merge pull request #533 from TobiasFella/fixcallsAlexey Rusakov
Don't set lifetime as version in call invites
2022-02-14Don't set lifetime as version in call invitesTobias Fella
2022-02-14Revert "Don't #include "logging.h" from headers"Alexey Rusakov
This reverts commit 2cf44607cf0f057e147c2c4fe6dded6c13c58a8a (that was stupid, honestly).
2022-02-14Don't #include "logging.h" from headersAlexey Rusakov
Logging categories used by Quotient are not supposed to be exposed externally, which basically forbids usage of logging in header files. A more flexible solution would involve moving logging.h to private headers but Quotient doesn't have that thing yet.
2022-02-13Merge branch 'dev'Alexey Rusakov
The result is FTBFS as yet; next commits will fix that, along with a few other things.
2022-02-12Replace QPair with std::pairTobias Fella
2022-02-11Implement more suggestionsTobias Fella
2022-02-11Enable to/fromJson to work with non-assignable objectsAlexey Rusakov
Previously you could not use toJson() on a polymorphic structure such as one of those defined in eventcontent.h because it is not assignable and the default specialisation of JsonObjectConverter used assignment. To avoid that limitation, one had to specialise JsonObjectConverter for each descendant of EventContent::Base, which is a lot of boilerplate. The new JsonConverter (the template underpinning the "default" to/fromJson implementation) improves on two things: 1. dump() allows to construct your own QJsonObject - or anything else convertable to QJsonValue - instead of requiring to fill in the pre-constructed one. 2. load() allows to construct your value type directly from QJsonObject instead of default-constructing it in advance.
2022-02-11Better documentation for QUO_DECLARE_FLAGS[_NS]Alexey Rusakov
2022-02-11EventRelation: defer to non-deprecated symbolsAlexey Rusakov
2022-02-09Fix compilation without E2EETobias Fella
2022-02-09Move includes to .cpp fileTobias Fella
2022-02-07Refactor KeyVerificationEventsTobias Fella
2022-02-07Remove encryptionmanager and various fixesTobias Fella
2022-02-06Update lib/e2ee/qolmaccount.cppTobias Fella
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
2022-02-06Only create one databaseTobias Fella
2022-02-06Port to QRandomGeneratorTobias Fella
2022-02-06Update lib/e2ee/qolminboundsession.cppTobias Fella
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
2022-01-30Apply suggestions from code reviewTobias Fella
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
2022-01-30Port devices list to databaseTobias Fella
2022-01-30Use room() instead of provideRoom()Tobias Fella
2022-01-29Apply suggestions from code reviewTobias Fella
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
2022-01-29SyncData: expect self-contained /sync responseAlexey Rusakov
SyncData can load room objects out-of-line. This is only expected when loading data from the cache (and since quite long ago, the cache always saves room objects out of line, avoiding too large JSON payloads that Qt parser chokes on). However, the code processed /sync response in the same way; in particular, this meant that SyncData filled the vector of unresolved room ids even when it came from /sync. SyncJob then looked at this vector and entered an error state if it was not empty. Well, payloads from the wire can be weird and it ultimately came to pass that a homeserver returned a non-object against a given room key, triggering the unresolved rooms branch in SyncJob - and stalling the whole sync loop as a result (https://invent.kde.org/network/neochat/-/issues/500). With this commit SyncData only fills unresolvedRoomIds when loading rooms from the cache (with the implied fallback of discarding the cache and loading from /sync anew instead). Respectively, SyncJob must never end up with SyncData that has unresolved rooms (even if those occur in the actual payload like in the mentioned issue, those rooms will be completely empty instead); the added assertion only guards for internal consistency.
2022-01-28Merge pull request #525 from quotient-im/kitsune/query-current-stateAlexey Rusakov
Move out current room state to its own class
2022-01-28QUO_IMPLICITAlexey Rusakov
Because Apple Clang choked on `explicit(false)`.