aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppTrustSecurityPolicy.h
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2022-06-18 12:41:31 +0200
committerLinus Jahn <lnj@kaidan.im>2022-06-18 13:08:07 +0200
commit32ccc6358ba6433e6b870b238fba20ccf1862fe2 (patch)
tree81c4f8d5a1af484b7aad52ad2dcef4da556360ad /src/client/QXmppTrustSecurityPolicy.h
parentcb1c0ac7ba16590304c8fe7bd6d87b69dffe5c67 (diff)
downloadqxmpp-32ccc6358ba6433e6b870b238fba20ccf1862fe2.tar.gz
Move SecurityPolicy, TrustLevel intro extra headers
This avoids the need to include the whole TrustStorage in files like SendStanzaParams.h.
Diffstat (limited to 'src/client/QXmppTrustSecurityPolicy.h')
-rw-r--r--src/client/QXmppTrustSecurityPolicy.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/client/QXmppTrustSecurityPolicy.h b/src/client/QXmppTrustSecurityPolicy.h
new file mode 100644
index 00000000..5020b81d
--- /dev/null
+++ b/src/client/QXmppTrustSecurityPolicy.h
@@ -0,0 +1,30 @@
+// SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+#ifndef QXMPPTRUSTSECURITYPOLICY_H
+#define QXMPPTRUSTSECURITYPOLICY_H
+
+#include <QMetaType>
+
+namespace QXmpp {
+
+///
+/// Security policy to decide which public long-term keys are used for encryption because they are
+/// trusted
+///
+/// \since QXmpp 1.5
+///
+enum TrustSecurityPolicy {
+ /// New keys must be trusted manually.
+ NoSecurityPolicy,
+ /// New keys are trusted automatically until the first authentication but automatically
+ /// distrusted afterwards. \see \xep{0450, Automatic Trust Management (ATM)}
+ Toakafa,
+};
+
+} // namespace QXmpp
+
+Q_DECLARE_METATYPE(QXmpp::TrustSecurityPolicy)
+
+#endif // QXMPPTRUSTSECURITYPOLICY_H