このページでは

QWebEngineCertificateError Class

QWebEngineCertificateError クラスは、証明書エラーに関する情報を提供します。詳細...

ヘッダ #include <QWebEngineCertificateError>
CMake: find_package(Qt6 REQUIRED COMPONENTS WebEngineCore)
target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore)
qmake QT += webenginecore
QMLで: webEngineCertificateError

パブリックな型

enum Type { Ok, SslPinnedKeyNotInCertificateChain, CertificateCommonNameInvalid, CertificateDateInvalid, CertificateAuthorityInvalid, …, CertificateSymantecLegacy }

プロパティ

  • type : const Type
  • url : const QUrl

パブリック機能

void acceptCertificate()
QList<QSslCertificate> certificateChain() const
void defer()
QString description() const
bool isMainFrame() const
bool isOverridable() const
void rejectCertificate()
QWebEngineCertificateError::Type type() const
QUrl url() const

詳細説明

証明書エラーに関する情報を提供する。このクラスはQWebEnginePage::certificateError() のパラメータとして使用される。

メンバ型ドキュメント

enum QWebEngineCertificateError::Type

この列挙型は、遭遇した証明書エラーのタイプを記述します。

この enum 型の値は Chromium が提供する SSL エラーと一致します。QSslError::SslError の値は直接使用されません。Qt のエラーカテゴリは Chromium のエラーカテゴリにマッピングできないからです。

定数説明
QWebEngineCertificateError::Ok0実際の証明書エラーはありません。
QWebEngineCertificateError::SslPinnedKeyNotInCertificateChain-150証明書がホスト名に固定されている組み込みの公開鍵と一致しませんでした。
QWebEngineCertificateError::CertificateCommonNameInvalid-200証明書のコモンネームがホスト名と一致しませんでした。
QWebEngineCertificateError::CertificateDateInvalid-201証明書が現在の日時で有効でない。
QWebEngineCertificateError::CertificateAuthorityInvalid-202証明書が信頼できる機関によって署名されていない。
QWebEngineCertificateError::CertificateContainsErrors-203証明書にエラーが含まれている。
QWebEngineCertificateError::CertificateNoRevocationMechanism-204証明書が失効したかどうかを判断するメカニズムがない。
QWebEngineCertificateError::CertificateUnableToCheckRevocation-205証明書の失効情報が利用できない。
QWebEngineCertificateError::CertificateRevoked-206証明書が失効している。
QWebEngineCertificateError::CertificateInvalid-207証明書が無効である。
QWebEngineCertificateError::CertificateWeakSignatureAlgorithm-208証明書が弱い署名アルゴリズムで署名されている。
QWebEngineCertificateError::CertificateNonUniqueName-210証明書に指定されているホスト名が一意でない。
QWebEngineCertificateError::CertificateWeakKey-211証明書に弱い鍵が含まれている。
QWebEngineCertificateError::CertificateNameConstraintViolation-212証明書が名前制約に違反する DNS 名を要求している。
QWebEngineCertificateError::CertificateValidityTooLong (since Qt 5.7)-213証明書の有効期間が長すぎる。
QWebEngineCertificateError::CertificateTransparencyRequired (since Qt 5.8)-214この接続には証明書の透明性が必要ですが、サーバーはポリシーに準拠したCT情報を提供しませんでした。
QWebEngineCertificateError::CertificateKnownInterceptionBlocked (since Qt 5.15)-217証明書が、デバイスの所有者以外のエンティティによる傍受に使用されていることが判明している。
QWebEngineCertificateError::SslObsoleteVersion (since Qt 6.2, deprecated in Qt 6.4)-218接続に旧バージョンのSSL/TLSが使用されている。
QWebEngineCertificateError::CertificateSymantecLegacy (since Qt 6.2, deprecated in Qt 6.11)-215証明書がレガシーなシマンテックのもので、有効期限が切れている。

プロパティ文書

[read-only] description : const QString

このプロパティは、エラーの局所化された人間が読める短い説明を保持する。

アクセス関数:

QString description() const

url() およびisOverridable()も参照のこと

[read-only, since 6.8] isMainFrame : const bool

証明書エラーがメインフレームから発生しているかどうかを返します。false の場合、エラーはサブリソースから発生しており、ほとんどの場合、ユーザー入力なしで拒否する必要があります。

このプロパティは Qt 6.8 で導入されました。

アクセス関数:

bool isMainFrame() const

[read-only] overridable : const bool

このプロパティは、このエラーをオーバーライドして受け入れることができるかどうかを保持する。

アクセス関数:

bool isOverridable() const

description()も参照のこと

[read-only] type : const Type

このプロパティは、エラーのタイプを保持する。

アクセス関数:

QWebEngineCertificateError::Type type() const

description() およびisOverridable()も参照のこと

[read-only] url : const QUrl

このプロパティは、エラーが発生した URL を保持します。

アクセス関数:

QUrl url() const

description()も参照のこと

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

[invokable] void QWebEngineCertificateError::acceptCertificate()

証明書を受け取り、要求されたURLの読み込みを続行する。

注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。

QList<QSslCertificate> QWebEngineCertificateError::certificateChain() const

ピアのデジタル証明書のチェーンを返します。

チェーンはピアの直接の証明書から始まり、CA の証明書で終わります。

[invokable] void QWebEngineCertificateError::defer()

証明書エラーを遅延処理用にマークする。

この関数は、ユーザーからの入力を待つ間など、証明書を受け入れるかどうかの判 断を先延ばしにする必要がある場合に呼び出されるべきである。この関数が呼び出されると、acceptCertificate() またはrejectCertificate() が呼び出されるまで、URLリクエストは一時停止される。

注: オーバーライド可能な証明書エラーのみを延期することができる。

注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照。

isOverridable()も参照

[invokable] void QWebEngineCertificateError::rejectCertificate()

証明書を拒否し、要求されたURLの読み込みを中止する。

注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。

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