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#include <QtCore/QString>
10#include <QtCore/QMetaType>
11
13
14namespace QTlsPrivate {
16}
17
19{
20public:
21 explicit QSslKeyingMaterial(const QByteArray &label,
22 qsizetype size,
23 const QByteArray &context = QByteArray()) noexcept
26 , keyingValue()
28 {
29 }
30
31 bool isValid() const noexcept
32 {
33 return !label().isEmpty() && size() > 0;
34 }
35
36 QByteArray label() const noexcept
37 {
38 return keyingLabel;
39 }
40
41 QByteArray context() const noexcept
42 {
43 return keyingContext;
44 }
45
46 QByteArray value() const noexcept
47 {
48 return keyingValue;
49 }
50
51 qsizetype size() const noexcept
52 {
53 return keyingValueSize;
54 }
55
56private:
57 QByteArray keyingLabel;
58 QByteArray keyingContext;
59 QByteArray keyingValue;
60 qsizetype keyingValueSize;
61
62 friend bool comparesEqual(const QSslKeyingMaterial &lhs,
63 const QSslKeyingMaterial &rhs) noexcept
64 {
65 return lhs.keyingLabel == rhs.keyingLabel
66 && lhs.keyingContext == rhs.keyingContext
67 && lhs.keyingValue == rhs.keyingValue
68 && lhs.keyingValueSize == rhs.keyingValueSize;
69 }
71
73};
74
75#ifndef QT_NO_DEBUG_STREAM
76class QDebug;
77Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QSslKeyingMaterial curve);
78#endif
79
80inline size_t qHash(const QSslKeyingMaterial &material, size_t seed = 0)
81{
82 return qHashMulti(seed,
83 material.label(),
84 material.context(),
85 material.value(),
86 material.size());
87}
88
89QT_END_NAMESPACE
90
91#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.
QByteArray context() const noexcept
Returns the optional context value used for deriving the keying material.
QSslKeyingMaterial(const QByteArray &label, qsizetype size, const QByteArray &context=QByteArray()) noexcept
Constructs a QSslKeyingMaterial object with the given exporter label, output size,...
QByteArray label() const noexcept
Returns the exporter label used for deriving the keying material.
qsizetype size() const noexcept
The desired size of the keying material.
bool isValid() const noexcept
Returns true if this QSslKeyingMaterial object describes a valid exporter request.
QByteArray value() const noexcept
Returns the exported keying material.
friend bool comparesEqual(const QSslKeyingMaterial &lhs, const QSslKeyingMaterial &rhs) noexcept
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:2582
static QT_BEGIN_NAMESPACE QString msgUnsupportedMulticastAddress()
Definition qdtls.cpp:304
QT_REQUIRE_CONFIG(liburing)
QOcspRevocationReason
size_t qHash(const QSslKeyingMaterial &material, size_t seed=0)