QOcspResponse Class
Esta clase representa la respuesta del Protocolo de estado de certificados en línea (OCSP). Más información...
| Encabezado: | #include <QOcspResponse> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Network) target_link_libraries(mytarget PRIVATE Qt6::Network) |
| qmake: | QT += network |
- Lista de todos los miembros, incluidos los miembros heredados
- QOcspResponse forma parte de la API de programación de redes.
Funciones públicas
| 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) |
Elementos no miembros relacionados
| 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) |
Descripción detallada
La clase QOcspResponse representa el estado de revocación del certificado de un servidor, recibido por el socket del lado del cliente durante el protocolo de enlace TLS. QSslSocket debe configurarse con la función OCSP Stapling habilitada.
Véase también QSslSocket, QSslSocket::ocspResponses(), certificateStatus(), revocationReason(), responder(), subject(), QOcspCertificateStatus, QOcspRevocationReason, QSslConfiguration::setOcspStaplingEnabled(), QSslConfiguration::ocspStaplingEnabled() y QSslConfiguration::peerCertificate().
Documentación de funciones miembro
QOcspResponse::QOcspResponse()
Crea una nueva respuesta con el estado « QOcspCertificateStatus::Unknown » y el motivo de revocación « QOcspRevocationReason::None ».
Véase también QOcspCertificateStatus.
QOcspResponse::QOcspResponse(const QOcspResponse &other)
Crea una instancia de QOcspResponse mediante copia.
[noexcept] QOcspResponse::QOcspResponse(QOcspResponse &&other)
Crea una instancia de `QOcspResponse`.
[noexcept] QOcspResponse::~QOcspResponse()
Anula la respuesta.
QOcspCertificateStatus QOcspResponse::certificateStatus() const
Devuelve el estado del certificado.
Véase también QOcspCertificateStatus.
class QSslCertificate QOcspResponse::responder() const
Esta función devuelve un certificado que se utiliza para firmar la respuesta OCSP.
QOcspRevocationReason QOcspResponse::revocationReason() const
Devuelve el motivo de la revocación.
QSslCertificate QOcspResponse::subject() const
Esta función devuelve el certificado para el que se emitió esta respuesta.
[noexcept] void QOcspResponse::swap(QOcspResponse &other)
Intercambia esta respuesta con other. Esta operación es muy rápida y nunca falla.
[noexcept] QOcspResponse &QOcspResponse::operator=(QOcspResponse &&other)
Asigna « other » a esta instancia de « QOcspResponse ». » a esta instancia de « ».
QOcspResponse &QOcspResponse::operator=(const QOcspResponse &other)
Asigna por copia « other » y devuelve una referencia a esta respuesta.
Elementos relacionados no miembros
enum class QOcspCertificateStatus
Describe el estado del certificado en línea
| Constante | Valor | Descripción |
|---|---|---|
QOcspResponse::QOcspCertificateStatus::Good | 0 | El certificado no está revocado, pero esto no significa necesariamente que el certificado se haya emitido alguna vez o que el momento en que se generó la respuesta se encuentre dentro del intervalo de validez del certificado. |
QOcspResponse::QOcspCertificateStatus::Revoked | 1 | Este estado indica que el certificado ha sido revocado (ya sea de forma permanente o temporal, es decir, en suspenso). |
QOcspResponse::QOcspCertificateStatus::Unknown | 2 | Este estado indica que el receptor no tiene constancia del certificado solicitado. |
Véase también QOcspRevocationReason.
enum class QOcspRevocationReason
Describe el motivo de la revocación
Esta enumeración describe los motivos de revocación, definidos en la RFC 5280, sección 5.3.1
| Constante | Valor |
|---|---|
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)
Devuelve « true » si « lhs » y « rhs » son respuestas correspondientes a certificados diferentes, o firmadas por entidades emisoras distintas, o presentan motivos de revocación diferentes, o estados de certificado distintos.
bool operator==(const QOcspResponse &lhs, const QOcspResponse &rhs)
Devuelve « true » si « lhs » y « rhs » son las respuestas correspondientes al mismo certificado, firmadas por el mismo emisor, tienen el mismo motivo de revocación y el mismo estado del certificado.
© 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.