diff options
| author | Melvin Keskin <melvo@olomono.de> | 2022-01-15 13:55:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-15 13:55:18 +0100 |
| commit | 6491c55011d8c677b776a7ba66c21031f689c2d2 (patch) | |
| tree | 3ed2a7d577351e56b923de1bbc36794f5bb997e0 /src/client/QXmppAtmManager.cpp | |
| parent | 282bac5d1d6190381dddaf3aa2c49fd2e5711393 (diff) | |
| download | qxmpp-6491c55011d8c677b776a7ba66c21031f689c2d2.tar.gz | |
Split up ATM parts of trust storage and refactor (#388)
QXmppTrustStorage is now the base class for all trust storages used by
end-to-end encryption managers.
QXmppAtmTrustStorage is used by QXmppAtmManager.
QXmppTrustMemoryStorage is now the base class for all trust storages
that use the memory for storing data.
QXmppAtmTrustMemoryStorage can be used by QXmppAtmManager.
Methods needed by the upcoming OMEMO implementation are added.
Some existing methods are refactored.
Diffstat (limited to 'src/client/QXmppAtmManager.cpp')
| -rw-r--r-- | src/client/QXmppAtmManager.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/client/QXmppAtmManager.cpp b/src/client/QXmppAtmManager.cpp index 4155e993..c4fe2cad 100644 --- a/src/client/QXmppAtmManager.cpp +++ b/src/client/QXmppAtmManager.cpp @@ -8,13 +8,11 @@ #include "QXmppClient.h" #include "QXmppConstants_p.h" #include "QXmppFutureUtils_p.h" +#include "QXmppMessage.h" #include "QXmppTrustMessageElement.h" +#include "QXmppTrustMessageKeyOwner.h" #include "QXmppUtils.h" -#include <QCoreApplication> -#include <QDomElement> -#include <QList> - using namespace QXmpp::Private; /// @@ -27,21 +25,10 @@ using namespace QXmpp::Private; /// storage interface must be added. /// That implementation has to be adapted to your storage such as a database. /// In case you only need memory and no peristent storage, you can use the -/// existing implementation: +/// existing implementation and add the storage with it: /// ///\code -/// QXmppTrustStorage *trustStorage = new QXmppTrustMemoryStorage; -/// \endcode -/// -/// You can set a security policy used by ATM via the trust manager. -/// Is is recommended to apply TOAKAFA for good security and usability when -/// using \xep{0384, OMEMO Encryption}: -/// \code -/// trustStorage->setSecurityPolicy("urn:xmpp:omemo:2", QXmppTrustStorage::Toakafa); -/// \endcode -/// -/// Afterwards, this manager must be added with the storage: -/// \code +/// QXmppAtmTrustStorage *trustStorage = new QXmppAtmTrustMemoryStorage; /// QXmppAtmManager *manager = new QXmppAtmManager(trustStorage); /// client->addExtension(manager); /// \endcode @@ -73,7 +60,7 @@ using namespace QXmpp::Private; /// /// \param trustStorage trust storage implementation /// -QXmppAtmManager::QXmppAtmManager(QXmppTrustStorage *trustStorage) +QXmppAtmManager::QXmppAtmManager(QXmppAtmTrustStorage *trustStorage) { m_trustStorage = trustStorage; } |
