In questa pagina

QOcspResponse Class

Questa classe rappresenta la risposta del protocollo Online Certificate Status Protocol. Per saperne di più...

Intestazione: #include <QOcspResponse>
CMake: find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake: QT += network

Funzioni pubbliche

QOcspResponse()
QOcspResponse(const QOcspResponse &other)
QOcspResponse(QOcspResponse &&other)
~QOcspResponse()
QOcspCertificateStatus certificateStatus() const
class QSslCertificate responder() const
QOcspRevocationReason revocationReason() const
QSslCertificate subject() const
void swap(QOcspResponse &other)
QOcspResponse &operator=(QOcspResponse &&other)
QOcspResponse &operator=(const QOcspResponse &other)
enum class QOcspCertificateStatus { Good, Revoked, Unknown }
enum class QOcspRevocationReason { None, Unspecified, KeyCompromise, CACompromise, AffiliationChanged, …, RemoveFromCRL }
bool operator!=(const QOcspResponse &lhs, const QOcspResponse &rhs)
bool operator==(const QOcspResponse &lhs, const QOcspResponse &rhs)

Descrizione dettagliata

La classe QOcspResponse rappresenta lo stato di revoca di un certificato del server, ricevuto dal socket lato client durante l’handshake TLS. QSslSocket deve essere configurato con l’OCSP stapling abilitato.

Vedi anche QSslSocket, QSslSocket::ocspResponses(), certificateStatus(), revocationReason(), responder(), subject(), QOcspCertificateStatus, QOcspRevocationReason, QSslConfiguration::setOcspStaplingEnabled(), QSslConfiguration::ocspStaplingEnabled() e QSslConfiguration::peerCertificate().

Documentazione delle funzioni membro

QOcspResponse::QOcspResponse()

Crea una nuova risposta con lo stato “ QOcspCertificateStatus::Unknown ” e il motivo di revoca “ QOcspRevocationReason::None ”.

Vedi anche QOcspCertificateStatus.

QOcspResponse::QOcspResponse(const QOcspResponse &other)

Crea una nuova istanza di QOcspResponse.

[noexcept] QOcspResponse::QOcspResponse(QOcspResponse &&other)

Crea un'istanza di QOcspResponse.

[noexcept] QOcspResponse::~QOcspResponse()

Annulla la risposta.

QOcspCertificateStatus QOcspResponse::certificateStatus() const

Restituisce lo stato del certificato.

Vedi anche QOcspCertificateStatus.

class QSslCertificate QOcspResponse::responder() const

Questa funzione restituisce un certificato utilizzato per firmare la risposta OCSP.

QOcspRevocationReason QOcspResponse::revocationReason() const

Restituisce il motivo della revoca.

QSslCertificate QOcspResponse::subject() const

Questa funzione restituisce il certificato per il quale è stata emessa la presente risposta.

[noexcept] void QOcspResponse::swap(QOcspResponse &other)

Scambia questa risposta con other. Questa operazione è molto veloce e non fallisce mai.

[noexcept] QOcspResponse &QOcspResponse::operator=(QOcspResponse &&other)

Assegna " other " a questa istanza di " QOcspResponse ".

QOcspResponse &QOcspResponse::operator=(const QOcspResponse &other)

Assegna il valore “ other ” e restituisce un riferimento a questa risposta.

Elementi correlati non membri

enum class QOcspCertificateStatus

Descrive lo stato del certificato online

CostanteValoreDescrizione
QOcspResponse::QOcspCertificateStatus::Good0Il certificato non è stato revocato, ma ciò non significa necessariamente che sia mai stato emesso o che il momento in cui è stata generata la risposta rientri nel periodo di validità del certificato.
QOcspResponse::QOcspCertificateStatus::Revoked1Questo stato indica che il certificato è stato revocato (in modo permanente o temporaneo - in sospeso).
QOcspResponse::QOcspCertificateStatus::Unknown2Questo stato indica che il rispondente non è a conoscenza del certificato richiesto.

Vedi anche QOcspRevocationReason.

enum class QOcspRevocationReason

Descrive il motivo della revoca

Questa enumerazione descrive i motivi di revoca definiti nella RFC 5280, sezione 5.3.1

CostanteValore
QOcspResponse::QOcspRevocationReason::None-1
QOcspResponse::QOcspRevocationReason::Unspecified0
QOcspResponse::QOcspRevocationReason::KeyCompromise1
QOcspResponse::QOcspRevocationReason::CACompromise2
QOcspResponse::QOcspRevocationReason::AffiliationChanged3
QOcspResponse::QOcspRevocationReason::Superseded4
QOcspResponse::QOcspRevocationReason::CessationOfOperation5
QOcspResponse::QOcspRevocationReason::CertificateHold6
QOcspResponse::QOcspRevocationReason::RemoveFromCRL7

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

Restituisce " true " se lhs e rhs sono risposte relative a certificati diversi, oppure firmate da soggetti diversi, oppure presentano motivi di revoca diversi o stati dei certificati diversi.

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

Restituisce " true " se " lhs " e " rhs " sono le risposte relative allo stesso certificato, firmate dallo stesso emittente, con lo stesso motivo di revoca e lo stesso stato del certificato.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.