summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qocspresponse.h
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-20 01:01:00 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-02-20 09:51:12 +0100
commit035f934d7a798e97bf0213a5d42a3d511132f03d (patch)
tree89aa6efdc86864ce479cddca6b9c4ba523c2754a /src/network/ssl/qocspresponse.h
parentf4cc23cffbe3005f0a522cac938695e87ecd6407 (diff)
parentda4ab444ffac37514435364d4d3f0ad59d4f9bc3 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp Added tests/auto/testlib/selftests/expected_crashes_5.txt to work round the output of the crashes test (which exercises UB, see QTBUG-73903) being truncated on one test platform. Change-Id: I9cd3f2639b4e50c3c4513e14629a40bdca8f8273
Diffstat (limited to 'src/network/ssl/qocspresponse.h')
-rw-r--r--src/network/ssl/qocspresponse.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/network/ssl/qocspresponse.h b/src/network/ssl/qocspresponse.h
index 5cff625b84..552a088ba5 100644
--- a/src/network/ssl/qocspresponse.h
+++ b/src/network/ssl/qocspresponse.h
@@ -42,8 +42,9 @@
#include <QtNetwork/qtnetworkglobal.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qmetatype.h>
#include <QtCore/qobject.h>
-#include <QtCore/qscopedpointer.h>
#ifndef Q_CLANG_QDOC
QT_REQUIRE_CONFIG(ssl);
@@ -51,14 +52,14 @@ QT_REQUIRE_CONFIG(ssl);
QT_BEGIN_NAMESPACE
-enum class OcspCertificateStatus
+enum class QOcspCertificateStatus
{
Good,
Revoked,
Unknown
};
-enum class OcspRevocationReason
+enum class QOcspRevocationReason
{
None = -1,
Unspecified,
@@ -71,8 +72,11 @@ enum class OcspRevocationReason
RemoveFromCRL
};
+class QOcspResponse;
+Q_NETWORK_EXPORT uint qHash(const QOcspResponse &response, uint seed = 0);
+
class QOcspResponsePrivate;
-class QOcspResponse
+class Q_NETWORK_EXPORT QOcspResponse
{
public:
@@ -84,18 +88,29 @@ public:
QOcspResponse &operator = (const QOcspResponse &other);
QOcspResponse &operator = (QOcspResponse &&other) Q_DECL_NOTHROW;
- OcspCertificateStatus certificateStatus() const;
- OcspRevocationReason revocationReason() const;
+ QOcspCertificateStatus certificateStatus() const;
+ QOcspRevocationReason revocationReason() const;
class QSslCertificate responder() const;
QSslCertificate subject() const;
+ void swap(QOcspResponse &other) Q_DECL_NOTHROW { d.swap(other.d); }
+
private:
friend class QSslSocketBackendPrivate;
- QScopedPointer<QOcspResponsePrivate> d;
+ friend Q_NETWORK_EXPORT bool operator==(const QOcspResponse &lhs, const QOcspResponse &rhs);
+ friend Q_NETWORK_EXPORT uint qHash(const QOcspResponse &response, uint seed);
+
+ QSharedDataPointer<QOcspResponsePrivate> d;
};
+inline bool operator!=(const QOcspResponse &lhs, const QOcspResponse &rhs) { return !(lhs == rhs); }
+
+Q_DECLARE_SHARED(QOcspResponse)
+
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QOcspResponse)
+
#endif // QOCSPRESPONSE_H