Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
Store some more things in the database
|
|
|
|
Co-authored-by: Carl Schwan <carl@carlschwan.eu>
|
|
Is required to correctly choose a session to use for sending messages
|
|
|
|
|
|
|
|
signature checks
|
|
|
|
Co-authored-by: Carl Schwan <carl@carlschwan.eu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Make sure that the enum values correspond to the values used in the spec
and use them instead of magic constants
|
|
Probably improves the performance slightly
If we handle to room data first, if a message arrives at the same time as the to-device message containing the key and we handle the message first, it will not be decryptable and stored as undecrypted. Then, when the key is handled, the cache of undecrypted messages is searched, the message decrypted and replaced.
When handling the key first, the message can be decryped instantly.
|
|
|
|
|
|
|
|
Otherwise new one time keys will be uploaded on every start
|
|
|
|
To ensure Q_DECL_EXPORT/Q_DECL_IMPORT macros are defined.
|
|
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.
|
|
That's a better primitive than just exposing SupportedAlgorithms list.
|
|
We don't seem to need sorted associative containers in those cases.
|
|
|
|
Using a static variable is incorrect as it doesn't load the device list
for any subsequent created Connection object.
|
|
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).
|
|
Also, removed Q_GADGET macros from key verification events as those
don't seem to do anything (no Q_ENUM/Q_FLAG things, namely).
|
|
|
|
This reverts commit 2cf44607cf0f057e147c2c4fe6dded6c13c58a8a (that was
stupid, honestly).
|
|
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.
|
|
The result is FTBFS as yet; next commits will fix that, along with a few
other things.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|