QWebEngineCertificateError — PyQt Documentation v6.9.0 (original) (raw)

PyQt6.QtWebEngineCore.QWebEngineCertificateError

Description

The QWebEngineCertificateError class provides information about a certificate error.

Provides information about a certificate error. This class is used as a parameter of certificateError.

Enums

Type

This enum describes the type of certificate error encountered.

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

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

Methods

__init__(QWebEngineCertificateError)

TODO


acceptCertificate()

Accepts the certificate and continues the loading of the requested URL.


certificateChain() → list[QSslCertificate]

Returns the peer’s chain of digital certificates.

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


defer()

Marks the certificate error for delayed handling.

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

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

See also

isOverridable().


description() → str

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

See also

url(), isOverridable().


isMainFrame() → bool

TODO


isOverridable() → bool

TODO


rejectCertificate()

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


type() → Type

Returns the type of the error.


url() → QUrl

Returns the URL that triggered the error.