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 Class Reference

This class represents Online Certificate Status Protocol response. More...

#include <qocspresponse.h>

Collaboration diagram for QOcspResponse:

Public Member Functions

 QOcspResponse ()
 QOcspResponse (const QOcspResponse &other)
 QOcspResponse (QOcspResponse &&other) noexcept
 ~QOcspResponse ()
QOcspResponseoperator= (const QOcspResponse &other)
QOcspResponseoperator= (QOcspResponse &&other) noexcept
QOcspCertificateStatus certificateStatus () const
QOcspRevocationReason revocationReason () const
class QSslCertificate responder () const
QSslCertificate subject () const
void swap (QOcspResponse &other) noexcept

Friends

class QTlsPrivate::TlsCryptographOpenSSL
bool operator== (const QOcspResponse &lhs, const QOcspResponse &rhs)
 Returns true if lhs and rhs are the responses for the same certificate, signed by the same responder, have the same revocation reason and the same certificate status.
bool operator!= (const QOcspResponse &lhs, const QOcspResponse &rhs)
 Returns true if lhs and rhs are responses for different certificates, or signed by different responders, or have different revocation reasons, or different certificate statuses.
Q_NETWORK_EXPORT size_t qHash (const QOcspResponse &response, size_t seed=0)

Detailed Description

This class represents Online Certificate Status Protocol response.

Since
5.13

\inmodule QtNetwork

The QOcspResponse class represents the revocation status of a server's certificate, received by the client-side socket during the TLS handshake. QSslSocket must be configured with OCSP stapling enabled.

See also
QSslSocket, QSslSocket::ocspResponses(), certificateStatus(), revocationReason(), responder(), subject(), QOcspCertificateStatus, QOcspRevocationReason, QSslConfiguration::setOcspStaplingEnabled(), QSslConfiguration::ocspStaplingEnabled(), QSslConfiguration::peerCertificate()

Definition at line 49 of file qocspresponse.h.

Constructor & Destructor Documentation

◆ QOcspResponse() [1/3]

QOcspResponse::QOcspResponse ( )
Since
5.13

Creates a new response with status QOcspCertificateStatus::Unknown and revocation reason QOcspRevocationReason::None.

See also
QOcspCertificateStatus

Definition at line 87 of file qocspresponse.cpp.

◆ QOcspResponse() [2/3]

QOcspResponse::QOcspResponse ( const QOcspResponse & other)
default
Since
5.13

Copy-constructs a QOcspResponse instance.

◆ QOcspResponse() [3/3]

QOcspResponse::QOcspResponse ( QOcspResponse && other)
defaultnoexcept
Since
5.13

Move-constructs a QOcspResponse instance.

◆ ~QOcspResponse()

QOcspResponse::~QOcspResponse ( )
default
Since
5.13

Destroys the response.

Member Function Documentation

◆ certificateStatus()

QOcspCertificateStatus QOcspResponse::certificateStatus ( ) const
Since
5.13

Returns the certificate status.

See also
QOcspCertificateStatus

Definition at line 140 of file qocspresponse.cpp.

◆ operator=() [1/2]

QOcspResponse & QOcspResponse::operator= ( const QOcspResponse & other)
default
Since
5.13

Copy-assigns other and returns a reference to this response.

◆ operator=() [2/2]

QOcspResponse & QOcspResponse::operator= ( QOcspResponse && other)
defaultnoexcept
Since
5.13

Move-assigns other to this QOcspResponse instance.

◆ responder()

QSslCertificate QOcspResponse::responder ( ) const
Since
5.13

This function returns a certificate used to sign OCSP response.

Definition at line 160 of file qocspresponse.cpp.

◆ revocationReason()

QOcspRevocationReason QOcspResponse::revocationReason ( ) const
Since
5.13

Returns the reason for revocation.

Definition at line 150 of file qocspresponse.cpp.

◆ subject()

QSslCertificate QOcspResponse::subject ( ) const
Since
5.13

This function returns a certificate, for which this response was issued.

Definition at line 170 of file qocspresponse.cpp.

◆ swap()

void QOcspResponse::swap ( QOcspResponse & other)
inlinenoexcept
Since
5.13 \memberswap{response}

Definition at line 67 of file qocspresponse.h.

◆ operator!=

bool operator!= ( const QOcspResponse & lhs,
const QOcspResponse & rhs )
friend

Returns true if lhs and rhs are responses for different certificates, or signed by different responders, or have different revocation reasons, or different certificate statuses.

Since
5.13

Definition at line 75 of file qocspresponse.h.

◆ operator==

bool operator== ( const QOcspResponse & lhs,
const QOcspResponse & rhs )
friend

Returns true if lhs and rhs are the responses for the same certificate, signed by the same responder, have the same revocation reason and the same certificate status.

Since
5.13

Definition at line 73 of file qocspresponse.h.

◆ qHash

Q_NETWORK_EXPORT size_t qHash ( const QOcspResponse & response,
size_t seed = 0 )
friend

Definition at line 208 of file qocspresponse.cpp.

◆ QTlsPrivate::TlsCryptographOpenSSL

Definition at line 72 of file qocspresponse.h.


The documentation for this class was generated from the following files: