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
qocspresponse.h
Go to the documentation of this file.
1// Copyright (C) 2011 Richard J. Moore <rich@kde.org>
2// Copyright (C) 2019 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6#ifndef QOCSPRESPONSE_H
7#define QOCSPRESPONSE_H
8
9#include <QtNetwork/qtnetworkglobal.h>
10
11#include <QtCore/qshareddata.h>
12#include <QtCore/qmetatype.h>
13#include <QtCore/qobject.h>
14
15#ifndef Q_QDOC
17#endif
18
19QT_BEGIN_NAMESPACE
20
21enum class QOcspCertificateStatus
22{
23 Good,
24 Revoked,
25 Unknown
26};
27
40
41namespace QTlsPrivate {
43}
44
45class QOcspResponse;
46Q_NETWORK_EXPORT size_t qHash(const QOcspResponse &response, size_t seed = 0) noexcept;
47
49class Q_NETWORK_EXPORT QOcspResponse
50{
51public:
52
53 QOcspResponse();
54 QOcspResponse(const QOcspResponse &other);
55 QOcspResponse(QOcspResponse && other) noexcept;
56 ~QOcspResponse();
57
58 QOcspResponse &operator = (const QOcspResponse &other);
59 QOcspResponse &operator = (QOcspResponse &&other) noexcept;
60
61 QOcspCertificateStatus certificateStatus() const;
62 QOcspRevocationReason revocationReason() const;
63
64 class QSslCertificate responder() const;
65 QSslCertificate subject() const;
66
67 void swap(QOcspResponse &other) noexcept { d.swap(other.d); }
68
69private:
70 bool isEqual(const QOcspResponse &other) const;
71
72 friend class QTlsPrivate::TlsCryptographOpenSSL;
73 friend bool operator==(const QOcspResponse &lhs, const QOcspResponse &rhs)
74 { return lhs.isEqual(rhs); }
75 friend bool operator!=(const QOcspResponse &lhs, const QOcspResponse &rhs)
76 { return !lhs.isEqual(rhs); }
77
78 friend Q_NETWORK_EXPORT size_t qHash(const QOcspResponse &response, size_t seed) noexcept;
79
80 QSharedDataPointer<QOcspResponsePrivate> d;
81};
82
84
85QT_END_NAMESPACE
86
87QT_DECL_METATYPE_EXTERN(QOcspResponse, Q_NETWORK_EXPORT)
88
89#endif // QOCSPRESPONSE_H
This class represents Online Certificate Status Protocol response.
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
Namespace containing onternal types that TLS backends implement.
static QT_BEGIN_NAMESPACE QString msgUnsupportedMulticastAddress()
Definition qdtls.cpp:304
QOcspRevocationReason
QT_REQUIRE_CONFIG(thread)