Age | Commit message (Collapse) | Author |
|
Facility macros to report Olm errors: QOLM_INTERNAL_ERROR[_X],
QOLM_FAIL_OR_LOG[_X]
|
|
Notably:
- simplified unnecessarily verbose constructs;
- formally aligned (no re-numeration was necessary)
QOlmMessage::Type with corresponding OLM_ constants;
- dropped QOlmSession::encryptMessageType() because it's very
sensitive to the order of calling with QOlmSession::encrypt()
(and encrypt() itself already calls it and returns the message
type);
- simplify the return type of pickle() calls that can only fail due to
an internal error;
- replace const QString& with QStringView or const QByteArray&
where appropriate;
- use '\0' where it was meant to be instead of '0'.
|
|
As mentioned in the commit introducing `Expected`, `QOlmExpected` is
simply an alias for `Expected<T, QOlmError>`. This simplifies quite
a few function signatures in `QOlm*` classes and collapses unwieldy
`std::holds_alternative<>`/`std::get<>` constructs into a neat
contextual bool cast and an invocation of `operator*` or
`value()`/`error()` accessors that don't need to specify the type.
While refactoring the code, I found a couple of cases of mismatching
`uint32_t` and `qint32_t` in return values; a couple of cases where
`decrypt()` returns `QString` which is in fact `QByteArray` (e.g., in
`QOlmSession::decrypt()`); there's a repetitive algorithm in
`Connection::Private::sessionDecryptPrekey()` and
`sessionDecryptGeneral()`
|
|
|
|
QEventLoop refuses to work without an application object instance.
|
|
|
|
|
|
|
|
Co-authored-by: Tobias Fella <9750016+TobiasFella@users.noreply.github.com>
|
|
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.
|
|
|
|
|
|
|
|
|
|
|