QOcspResponse Class
Cette classe représente la réponse du protocole d'état des certificats en ligne. Plus d'informations...
| En-tête : | #include <QOcspResponse> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS Network)target_link_libraries(mytarget PRIVATE Qt6::Network) |
| qmake : | QT += network |
- Liste de tous les membres, y compris les membres hérités
- QOcspResponse fait partie de l'API de programmation réseau.
Fonctions publiques
| 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) |
Non-membres apparentés
| 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) |
Description détaillée
La classe QOcspResponse représente l'état de révocation du certificat d'un serveur, reçu par la socket côté client pendant la poignée de main TLS. QSslSocket doit être configuré avec l'agrafage OCSP activé.
Voir aussi QSslSocket, QSslSocket::ocspResponses(), certificateStatus(), revocationReason(), responder(), subject(), QOcspCertificateStatus, QOcspRevocationReason, QSslConfiguration::setOcspStaplingEnabled(), QSslConfiguration::ocspStaplingEnabled() et QSslConfiguration::peerCertificate().
Documentation des fonctions membres
QOcspResponse::QOcspResponse()
Crée une nouvelle réponse avec le statut QOcspCertificateStatus::Unknown et le motif de révocation QOcspRevocationReason::None.
Voir également QOcspCertificateStatus.
QOcspResponse::QOcspResponse(const QOcspResponse &other)
Copy-construit une instance de QOcspResponse.
[noexcept] QOcspResponse::QOcspResponse(QOcspResponse &&other)
Move-construit une instance de QOcspResponse.
[noexcept] QOcspResponse::~QOcspResponse()
Détruit la réponse.
QOcspCertificateStatus QOcspResponse::certificateStatus() const
Renvoie l'état du certificat.
Voir aussi QOcspCertificateStatus.
class QSslCertificate QOcspResponse::responder() const
Cette fonction renvoie un certificat utilisé pour signer la réponse OCSP.
QOcspRevocationReason QOcspResponse::revocationReason() const
Renvoie le motif de la révocation.
QSslCertificate QOcspResponse::subject() const
Cette fonction renvoie un certificat pour lequel cette réponse a été émise.
[noexcept] void QOcspResponse::swap(QOcspResponse &other)
Remplace cette réponse par other. Cette opération est très rapide et n'échoue jamais.
[noexcept] QOcspResponse &QOcspResponse::operator=(QOcspResponse &&other)
Move-assigne other à cette instance QOcspResponse.
QOcspResponse &QOcspResponse::operator=(const QOcspResponse &other)
Copy-assigns other et renvoie une référence à cette réponse.
Non-membres apparentés
enum class QOcspCertificateStatus
Décrit le statut du certificat en ligne
| Constante | Valeur | Description de l'état du certificat en ligne |
|---|---|---|
QOcspResponse::QOcspCertificateStatus::Good | 0 | Le certificat n'est pas révoqué, mais cela ne signifie pas nécessairement que le certificat a été émis ou que l'heure à laquelle la réponse a été produite se situe dans l'intervalle de validité du certificat. |
QOcspResponse::QOcspCertificateStatus::Revoked | 1 | Cet état indique que le certificat a été révoqué (de manière permanente ou temporaire - en attente). |
QOcspResponse::QOcspCertificateStatus::Unknown | 2 | Cet état indique que le répondeur ne connaît pas le certificat demandé. |
Voir aussi QOcspRevocationReason.
enum class QOcspRevocationReason
Décrit la raison de la révocation
Cette énumération décrit les motifs de révocation, définis dans la RFC 5280, section 5.3.1.
| Constante | Valeur |
|---|---|
QOcspResponse::QOcspRevocationReason::None | -1 |
QOcspResponse::QOcspRevocationReason::Unspecified | 0 |
QOcspResponse::QOcspRevocationReason::KeyCompromise | 1 |
QOcspResponse::QOcspRevocationReason::CACompromise | 2 |
QOcspResponse::QOcspRevocationReason::AffiliationChanged | 3 |
QOcspResponse::QOcspRevocationReason::Superseded | 4 |
QOcspResponse::QOcspRevocationReason::CessationOfOperation | 5 |
QOcspResponse::QOcspRevocationReason::CertificateHold | 6 |
QOcspResponse::QOcspRevocationReason::RemoveFromCRL | 7 |
bool operator!=(const QOcspResponse &lhs, const QOcspResponse &rhs)
Renvoie true si lhs et rhs sont des réponses pour des certificats différents, ou signés par des répondants différents, ou ont des raisons de révocation différentes, ou des statuts de certificat différents.
bool operator==(const QOcspResponse &lhs, const QOcspResponse &rhs)
Renvoie true si lhs et rhs sont des réponses pour le même certificat, signées par le même répondant, ont le même motif de révocation et le même statut de certificat.
© 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.