QWebEngineCertificateError Class

The QWebEngineCertificateError class provides information about a certificate error. More...

Header: #include <QWebEngineCertificateError>
qmake: QT += webenginewidgets
Since: Qt 5.4

This class was introduced in Qt 5.4.

Public Types

enum Error { SslPinnedKeyNotInCertificateChain, CertificateCommonNameInvalid, CertificateDateInvalid, CertificateAuthorityInvalid, CertificateContainsErrors, …, CertificateKnownInterceptionBlocked }

Public Functions

bool answered() const
QList<QSslCertificate> certificateChain() const
void defer()
bool deferred() const
QWebEngineCertificateError::Error error() const
QString errorDescription() const
void ignoreCertificateError()
bool isOverridable() const
void rejectCertificate()
QUrl url() const

Detailed Description

Provides information about a certificate error. This class is used as a parameter of QWebEnginePage::certificateError().

Member Type Documentation

enum QWebEngineCertificateError::Error

This enum describes the type of certificate error encountered.

The values of this enum type match the SSL errors Chromium provides. QSslError::SslError values are not used directly, because the Qt error categories cannot be mapped to the Chromium error categories.

QWebEngineCertificateError::SslPinnedKeyNotInCertificateChain-150The certificate did not match the built-in public keys pinned for the host name.
QWebEngineCertificateError::CertificateCommonNameInvalid-200The certificate's common name did not match the host name.
QWebEngineCertificateError::CertificateDateInvalid-201The certificate is not valid at the current date and time.
QWebEngineCertificateError::CertificateAuthorityInvalid-202The certificate is not signed by a trusted authority.
QWebEngineCertificateError::CertificateContainsErrors-203The certificate contains errors.
QWebEngineCertificateError::CertificateNoRevocationMechanism-204The certificate has no mechanism for determining if it has been revoked.
QWebEngineCertificateError::CertificateUnableToCheckRevocation-205Revocation information for the certificate is not available.
QWebEngineCertificateError::CertificateRevoked-206The certificate has been revoked.
QWebEngineCertificateError::CertificateInvalid-207The certificate is invalid.
QWebEngineCertificateError::CertificateWeakSignatureAlgorithm-208The certificate is signed using a weak signature algorithm.
QWebEngineCertificateError::CertificateNonUniqueName-210The host name specified in the certificate is not unique.
QWebEngineCertificateError::CertificateWeakKey-211The certificate contains a weak key.
QWebEngineCertificateError::CertificateNameConstraintViolation-212The certificate claimed DNS names that are in violation of name constraints.
QWebEngineCertificateError::CertificateValidityTooLong-213The certificate has a validity period that is too long. (Added in Qt 5.7)
QWebEngineCertificateError::CertificateTransparencyRequired-214Certificate Transparency was required for this connection, but the server did not provide CT information that complied with the policy. (Added in Qt 5.8)
QWebEngineCertificateError::CertificateKnownInterceptionBlocked-217The certificate is known to be used for interception by an entity other the device owner. (Added in 5.15)

Member Function Documentation

bool QWebEngineCertificateError::answered() const

Returns true if the error was explicitly rejected or ignored.

This function was introduced in Qt 5.14.

QList<QSslCertificate> QWebEngineCertificateError::certificateChain() const

Returns the peer's chain of digital certificates.

Chain starts with the peer's immediate certificate and ending with the CA's certificate.

This function was introduced in Qt 5.14.

void QWebEngineCertificateError::defer()

Marks the certificate error for delayed handling.

This function should be called when there is a need to postpone the decision whether to ignore a certificate error, for example, while waiting for user input. When called, the function pauses the URL request until ignoreCertificateError() or rejectCertificate() is called.

Note: It is only possible to defer overridable certificate errors.

This function was introduced in Qt 5.14.

See also isOverridable() and deferred().

bool QWebEngineCertificateError::deferred() const

Returns whether the decision for error handling was delayed and the URL load was halted.

This function was introduced in Qt 5.14.

QWebEngineCertificateError::Error QWebEngineCertificateError::error() const

Returns the type of the error.

See also errorDescription() and isOverridable().

QString QWebEngineCertificateError::errorDescription() const

Returns a short localized human-readable description of the error.

See also error(), url(), and isOverridable().

void QWebEngineCertificateError::ignoreCertificateError()

Ignores the certificate error and continues the loading of the requested URL.

This function was introduced in Qt 5.14.

bool QWebEngineCertificateError::isOverridable() const

Returns whether this error can be overridden and accepted.

See also error() and errorDescription().

void QWebEngineCertificateError::rejectCertificate()

Rejects the certificate and aborts the loading of the requested URL.

This function was introduced in Qt 5.14.

QUrl QWebEngineCertificateError::url() const

Returns the URL that triggered the error.

See also error() and errorDescription().