CertificateError QML Type

CertificateError represents a certificate error More...

Import Statement: import com.canonical.Oxide 1.15
Since: OxideQt 1.2
Instantiates: OxideQCertificateError

Properties

Methods

Detailed Description

CertificateError represents an individual certificate error.

url indicates the URL of the connection that the error represents, and an error code is given by certError.

For certificate errors that are overridable (overridable is true), calling allow will tell Oxide to proceed with the connection. Calling deny will tell Oxide to abort the connection.

For non-overridable certificate errors (overridable is false), calling allow or deny will have no effect. The associated connection will already have been aborted (for main-frame document errors) or failed with an error (for sub-frame or subresource errors).

For main-frame document errors (where isMainFrame is true and isSubresource is false), a blank transient page will be loaded for the life of the error, with the URL pointing to url. This is to ensure that navigation actions work correctly. It is assumed that an application will display its own error UI over this. The transient page will be destroyed after a call to allow or deny for overridable errors, and will be destroyed if the error instance is destroyed.

Main-frame document errors can also be cancelled by Oxide (eg, if another navigation is started). In this case, isCancelled will change to true. The blank transient page will be destroyed automatically when this happens.

If the application destroys an overridable certificate error before it has responded (by calling allow or deny), the associated connection will be aborted automatically.

Property Documentation

certError : enumeration

The error code for this certificate error.

Possible values are:

ConstantDescription
CertificateError.ErrorBadIdentityThe identity of the certificate does not match the identity of the site.
CertificateError.ErrorExpiredThe certificate has expired.
CertificateError.ErrorDateInvalidThe certificate has a date that is invalid, eg, its start date is in the future.
CertificateError.ErrorAuthorityInvalidThe certificate is signed by an authority that isn't trusted.
CertificateError.ErrorRevokedThe certificate has been revoked.
CertificateError.ErrorInvalidThe certificate is invalid, eg, it has errors.
CertificateError.ErrorInsecureThe certificate is insecure, eg, it uses a weak signature algorithm or has a weak public key.
CertificateError.ErrorGenericThis is used for all other unspecified errors.

certificate : SslCertificate

The certificate associated with this error.


isCancelled : bool

Indicates whether this error has been cancelled by Oxide. This could occur if the application starts another navigation before responding to this error. If the application is displaying an error UI, it should hide it upon cancellation.


isMainFrame : bool

Indicates whether this error originates from the main frame.


isSubresource : bool

Indicates whether this error originates from a subresource within its frame.


overridable : bool

Indicates whether this error is overridable. Only errors from main-frame document loads (where isMainFrame is true and isSubresource is false) can be overridable. Certain types of errors are never overridable.

If the error is not overridable, calls to allow or deny are ignored.


strictEnforcement : bool

Indicates whether this error is for a connection which is required to be secure due to HSTS policy. If this is true, overridable will be false.


url : url

The URL associated with the certificate error.


Method Documentation

void allow()

If this error is overridable (overridable is true), then calling this will allow the connection to proceed. Calling this has no effect if the error is not overridable.

See also deny.


void deny()

If this error is overridable (overridable is true), then calling this will abort the connection. Calling this has no effect if the error is not overridable.

See also allow.