QOcspResponse Class

このクラスは Online Certificate Status Protocol レスポンスを表します。詳細...

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

パブリック関数

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)

詳細説明

QOcspResponse クラスは、TLS ハンドシェイク中にクライアント側ソケットが受信した、サーバー証明書の失効ステータスを表す。QSslSocket は、OCSP ステープリングを有効にして構成する必要がある。

QSslSocketQSslSocket::ocspResponses()、certificateStatus()、revocationReason()、responder()、subject()、QOcspCertificateStatusQOcspRevocationReasonQSslConfiguration::setOcspStaplingEnabled()、QSslConfiguration::ocspStaplingEnabled()、QSslConfiguration::peerCertificate()も参照の こと。

メンバー関数ドキュメント

QOcspResponse::QOcspResponse()

ステータスQOcspCertificateStatus::Unknown 、失効理由QOcspRevocationReason::None

QOcspCertificateStatusも参照のこと

QOcspResponse::QOcspResponse(const QOcspResponse &other)

QOcspResponse インスタンスをコピー構築します。

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

Move - QOcspResponse インスタンスを構築します。

[noexcept] QOcspResponse::~QOcspResponse()

反応を破壊する。

QOcspCertificateStatus QOcspResponse::certificateStatus() const

証明書のステータスを返します。

QOcspCertificateStatusも参照

class QSslCertificate QOcspResponse::responder() const

この関数は、OCSP レスポンスの署名に使用される証明書を返す。

QOcspRevocationReason QOcspResponse::revocationReason() const

失効の理由を返します。

QSslCertificate QOcspResponse::subject() const

この関数は、このレスポンスが発行された証明書を返す。

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

このレスポンスをother と交換する。この操作は非常に速く、失敗することはない。

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

Move-other をこのQOcspResponse インスタンスに割り当てる。

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

other をコピーし、このレスポンスへの参照を返す。

関連する非会員

enum class QOcspCertificateStatus

オンライン証明書のステータス

定数説明
QOcspResponse::QOcspCertificateStatus::Good0証明書は失効していないが、これは必ずしも証明書が発行されたことや、応答が生成された時刻が証明書の有効期間内であることを意味しない。
QOcspResponse::QOcspCertificateStatus::Revoked1このステートは、証明書が(恒久的または一時的に(保留中)に)失効したことを示す。
QOcspResponse::QOcspCertificateStatus::Unknown2このステートは、応答側が要求されている証明書について知らないことを示す。

QOcspRevocationReasonも参照のこと

enum class QOcspRevocationReason

失効の理由を記述する。

この列挙は、RFC 5280の5.3.1節で定義されている失効の理由を記述します。

定数
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)

lhsrhs が異なる証明書に対する応答であるか、異なる応答者によって 署名されているか、異なる失効理由を持っているか、異なる証明書の ステータスを持っている場合、true を返す。

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

lhsrhs が同じ証明書のレスポンスで、同じレスポンダによって署名され、 同じ失効理由と同じ証明書ステータスを持つ場合、true を返す。

© 2025 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.