En esta página

QOcspResponse Class

Esta clase representa la respuesta del protocolo de estado de certificado en línea. Más...

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

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)
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 handshake TLS. QSslSocket debe configurarse con el grapado OCSP activado.

Véase también QSslSocket, QSslSocket::ocspResponses(), certificateStatus(), revocationReason(), responder(), subject(), QOcspCertificateStatus, QOcspRevocationReason, QSslConfiguration::setOcspStaplingEnabled(), QSslConfiguration::ocspStaplingEnabled(), y QSslConfiguration::peerCertificate().

Documentación de las 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)

Copia-construye una instancia de QOcspResponse.

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

Move-construye una instancia de QOcspResponse.

[noexcept] QOcspResponse::~QOcspResponse()

Destruye 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 utilizado para firmar la respuesta OCSP.

QOcspRevocationReason QOcspResponse::revocationReason() const

Devuelve el motivo de la revocación.

QSslCertificate QOcspResponse::subject() const

Esta función devuelve un certificado para el que se ha emitido esta respuesta.

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

Cambia esta respuesta por other. Esta operación es muy rápida y nunca falla.

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

Mover-asigna other a esta instancia QOcspResponse.

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

Copia-asigna other y devuelve una referencia a esta respuesta.

No miembros relacionados

enum class QOcspCertificateStatus

Describe el estado del certificado en línea

ConstanteValorDescripción
QOcspResponse::QOcspCertificateStatus::Good0El certificado no está revocado, pero esto no significa necesariamente que el certificado se haya emitido alguna vez o que el momento en que se produjo la respuesta se encuentre dentro del intervalo de validez del certificado.
QOcspResponse::QOcspCertificateStatus::Revoked1Este estado indica que el certificado ha sido revocado (de forma permanente o temporal - en espera).
QOcspResponse::QOcspCertificateStatus::Unknown2Este estado indica que el respondedor no conoce el certificado solicitado.

Véase también QOcspRevocationReason.

enum class QOcspRevocationReason

Describe el motivo de revocación

Esta enumeración describe los motivos de revocación, definidos en RFC 5280, sección 5.3.1

ConstanteValor
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)

Devuelve true si lhs y rhs son respuestas para certificados diferentes, o firmadas por respondedores diferentes, o tienen motivos de revocación diferentes, o estados de certificado diferentes.

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

Devuelve true si lhs y rhs son las respuestas para el mismo certificado, firmadas por el mismo respondedor, tienen el mismo motivo de revocación y el mismo estado de 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.