Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qocspresponse.cpp
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
5#include "qocspresponse_p.h"
6#include "qocspresponse.h"
7
8#include "qhashfunctions.h"
9
11
13
14
90
97
103QOcspResponse::QOcspResponse(QOcspResponse &&) noexcept = default;
104
110QOcspResponse::~QOcspResponse() = default;
111
117QOcspResponse &QOcspResponse::operator=(const QOcspResponse &) = default;
118
124QOcspResponse &QOcspResponse::operator=(QOcspResponse &&) noexcept = default;
125
140QOcspCertificateStatus QOcspResponse::certificateStatus() const
141{
142 return d->certificateStatus;
143}
144
154
161{
162 return d->signerCert;
163}
164
171{
172 return d->subjectCert;
173}
174
198bool QOcspResponse::isEqual(const QOcspResponse &other) const
199{
200 return d == other.d || *d == *other.d;
201}
202
209size_t qHash(const QOcspResponse &response, size_t seed) noexcept
210{
211 const QOcspResponsePrivate *d = response.d.data();
212 Q_ASSERT(d);
213
215 size_t hash = hasher(seed, int(d->certificateStatus));
216 hash = hasher(hash, int(d->revocationReason));
217 if (!d->signerCert.isNull())
218 hash = hasher(hash, d->signerCert);
219 if (!d->subjectCert.isNull())
220 hash = hasher(hash, d->subjectCert);
221
222 return hash;
223}
224
size_t qHash(const QOcspResponse &response, size_t seed) noexcept
Returns the hash value for the response, using seed to seed the calculation.
QOcspRevocationReason revocationReason
QSslCertificate subjectCert
QSslCertificate signerCert
This class represents Online Certificate Status Protocol response.
QOcspCertificateStatus certificateStatus() const
QOcspRevocationReason revocationReason() const
QSslCertificate subject() const
class QSslCertificate responder() const
The QSslCertificate class provides a convenient API for an X509 certificate.
QHash< int, QWidget * > hash
[35multi]
Combined button and popup list for selecting options.
#define QT_IMPL_METATYPE_EXTERN(TYPE)
Definition qmetatype.h:1390
QOcspRevocationReason
QOcspCertificateStatus
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Definition qrandom.cpp:196
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
QSharedPointer< T > other(t)
[5]