Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsslkeyingmaterial.h
Go to the documentation of this file.
1// Copyright (C) 2026 Governikus GmbH & Co. KG.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QSSLKEYINGMATERIAL_H
6#define QSSLKEYINGMATERIAL_H
7
8#include <QtNetwork/qtnetworkglobal.h>
9
10#include <QtCore/qbytearray.h>
11#include <QtCore/qcompare.h>
12#include <QtCore/qswap.h>
13#include <QtCore/qtclasshelpermacros.h>
14#include <QtCore/qtypes.h>
15
17
18class tst_QSslKeyingMaterial;
19
20QT_BEGIN_NAMESPACE
21
22namespace QTlsPrivate {
24}
25
26class QDebug;
27
28class QT_TECH_PREVIEW_API QSslKeyingMaterial
29{
30public:
31 Q_NETWORK_EXPORT QSslKeyingMaterial();
32 Q_NETWORK_EXPORT explicit QSslKeyingMaterial(const QByteArray &label, qsizetype size);
33 Q_NETWORK_EXPORT explicit QSslKeyingMaterial(const QByteArray &label, qsizetype size,
34 const QByteArray &context);
35 Q_NETWORK_EXPORT QSslKeyingMaterial(const QSslKeyingMaterial &other);
36 Q_NETWORK_EXPORT QSslKeyingMaterial &operator=(const QSslKeyingMaterial &other);
37 QSslKeyingMaterial(QSslKeyingMaterial &&other) noexcept
38 : m_label(std::move(other.m_label)),
39 m_context(std::move(other.m_context)),
40 m_value(std::move(other.m_value)),
41 m_requestedSize(other.m_requestedSize),
42 m_reserved{std::exchange(other.m_reserved, nullptr)}
43 {}
44 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QSslKeyingMaterial)
45 Q_NETWORK_EXPORT ~QSslKeyingMaterial();
46
47 Q_NETWORK_EXPORT bool isValid() const noexcept;
48
49 QByteArray label() const
50 {
51 return m_label;
52 }
53
54 QByteArray context() const
55 {
56 return m_context;
57 }
58
59 QByteArray value() const
60 {
61 return m_value;
62 }
63
64 qsizetype requestedSize() const noexcept
65 {
66 return m_requestedSize;
67 }
68
69 [[nodiscard]] Q_NETWORK_EXPORT QSslKeyingMaterial clone() const;
70
71 void swap(QSslKeyingMaterial &other) noexcept
72 {
73 m_label.swap(other.m_label);
74 m_context.swap(other.m_context);
75 m_value.swap(other.m_value);
76 std::swap(m_requestedSize, other.m_requestedSize);
77 qt_ptr_swap(m_reserved, other.m_reserved);
78 }
79
80private:
81 QByteArray m_label;
82 QByteArray m_context;
83 QByteArray m_value;
84 qsizetype m_requestedSize = 0;
85 Q_DECL_UNUSED_MEMBER void *m_reserved = nullptr;
86
87 friend Q_NETWORK_EXPORT bool comparesEqual(const QSslKeyingMaterial &lhs,
88 const QSslKeyingMaterial &rhs) noexcept;
89 Q_DECLARE_EQUALITY_COMPARABLE(QSslKeyingMaterial)
90
91 friend size_t qHash(const QSslKeyingMaterial &material) noexcept
92 { return qHash(material, 0); }
93 friend Q_NETWORK_EXPORT size_t qHash(const QSslKeyingMaterial &material, size_t seed) noexcept;
94
95#ifndef QT_NO_DEBUG_STREAM
96 friend Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslKeyingMaterial &keying);
97#endif // QT_NO_DEBUG_STREAM
98
99 friend class QTlsPrivate::TlsCryptographOpenSSL;
100 friend class ::tst_QSslKeyingMaterial;
101};
102
104
105QT_END_NAMESPACE
106
107#endif // QSSLKEYINGMATERIAL_H
This class represents Online Certificate Status Protocol response.
The QSslCertificate class provides a convenient API for an X509 certificate.
The QSslCipher class represents an SSL cryptographic cipher.
Definition qsslcipher.h:23
The QSslKey class provides an interface for private and public keys.
Definition qsslkey.h:24
Describes exported keying material derived from a TLS session.
The QSslPreSharedKeyAuthenticator class provides authentication data for pre shared keys (PSK) cipher...
The QSslSocket class provides an SSL encrypted socket for both clients and servers.
Definition qsslsocket.h:30
Combined button and popup list for selecting options.
Namespace containing onternal types that TLS backends implement.
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2620
static QT_BEGIN_NAMESPACE QString msgUnsupportedMulticastAddress()
Definition qdtls.cpp:304
QT_REQUIRE_CONFIG(liburing)
QOcspRevocationReason