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
18
19QT_BEGIN_NAMESPACE
20
21namespace QTlsPrivate {
23}
24
25class QDebug;
26
27class QT_TECH_PREVIEW_API QSslKeyingMaterial
28{
29public:
30 Q_NETWORK_EXPORT QSslKeyingMaterial();
31 Q_NETWORK_EXPORT explicit QSslKeyingMaterial(const QByteArray &label, qsizetype size);
32 Q_NETWORK_EXPORT explicit QSslKeyingMaterial(const QByteArray &label, qsizetype size,
33 const QByteArray &context);
34 Q_NETWORK_EXPORT QSslKeyingMaterial(const QSslKeyingMaterial &other);
35 Q_NETWORK_EXPORT QSslKeyingMaterial &operator=(const QSslKeyingMaterial &other);
36 QSslKeyingMaterial(QSslKeyingMaterial &&other) noexcept
37 : m_label(std::move(other.m_label)),
38 m_context(std::move(other.m_context)),
39 m_value(std::move(other.m_value)),
40 m_requestedSize(other.m_requestedSize),
41 m_reserved{std::exchange(other.m_reserved, nullptr)}
42 {}
43 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QSslKeyingMaterial)
44 Q_NETWORK_EXPORT ~QSslKeyingMaterial();
45
46 Q_NETWORK_EXPORT bool isValid() const noexcept;
47
48 QByteArray label() const
49 {
50 return m_label;
51 }
52
53 QByteArray context() const
54 {
55 return m_context;
56 }
57
58 QByteArray value() const
59 {
60 return m_value;
61 }
62
63 qsizetype requestedSize() const noexcept
64 {
65 return m_requestedSize;
66 }
67
68 void swap(QSslKeyingMaterial &other) noexcept
69 {
70 m_label.swap(other.m_label);
71 m_context.swap(other.m_context);
72 m_value.swap(other.m_value);
73 std::swap(m_requestedSize, other.m_requestedSize);
74 qt_ptr_swap(m_reserved, other.m_reserved);
75 }
76
77private:
78 QByteArray m_label;
79 QByteArray m_context;
80 QByteArray m_value;
81 qsizetype m_requestedSize = 0;
82 Q_DECL_UNUSED_MEMBER void *m_reserved = nullptr;
83
84 friend Q_NETWORK_EXPORT bool comparesEqual(const QSslKeyingMaterial &lhs,
85 const QSslKeyingMaterial &rhs) noexcept;
86 Q_DECLARE_EQUALITY_COMPARABLE(QSslKeyingMaterial)
87
88 friend size_t qHash(const QSslKeyingMaterial &material) noexcept
89 { return qHash(material, 0); }
90 friend Q_NETWORK_EXPORT size_t qHash(const QSslKeyingMaterial &material, size_t seed) noexcept;
91
92#ifndef QT_NO_DEBUG_STREAM
93 friend Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, const QSslKeyingMaterial &keying);
94#endif // QT_NO_DEBUG_STREAM
95
96 friend class QTlsPrivate::TlsCryptographOpenSSL;
97};
98
100
101QT_END_NAMESPACE
102
103#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