OxideQCertificateError Class

Represents a certificate error More...

Header: #include <oxideqcertificateerror.h>
Instantiated By: CertificateError
Inherits: QObject

Public Types

enum Error { ErrorBadIdentity, ErrorExpired, ErrorDateInvalid, ErrorAuthorityInvalid, ..., ErrorGeneric }

Properties

Public Functions

~OxideQCertificateError()
Error certError() const
OxideQSslCertificate certificate() const
bool isCancelled() const
bool isMainFrame() const
bool isSubresource() const
bool overridable() const
bool strictEnforcement() const
QUrl url() const

Public Slots

void allow()
void deny()

Signals

void cancelled()

Additional Inherited Members

Detailed Description

Represents a certificate error

OxideQCertificateError represents an individual certificate error. This can't be constructed by applications.

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 wil 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 deleted.

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

Member Type Documentation

enum OxideQCertificateError::Error

ConstantValueDescription
OxideQCertificateError::ErrorBadIdentity1The identity of the certificate does not match the identity of the site.
OxideQCertificateError::ErrorExpired2The certificate has expired.
OxideQCertificateError::ErrorDateInvalid3The certificate has a date that is invalid, eg, its start date is in the future.
OxideQCertificateError::ErrorAuthorityInvalid4The certificate is signed by an authority that isn't trusted.
OxideQCertificateError::ErrorRevoked5The certificate has been revoked.
OxideQCertificateError::ErrorInvalid6The certificate is invalid, eg, it has errors.
OxideQCertificateError::ErrorInsecure7The certificate is insecure, eg, it uses a weak signature algorithm or has a weak public key.
OxideQCertificateError::ErrorGeneric8This is used for all other unspecified errors.

Property Documentation

certError : const Error

The error code for this certificate error.

Access functions:

Error certError() const

certificate : const OxideQSslCertificate

The certificate associated with this error.

Access functions:

OxideQSslCertificate certificate() const

isCancelled : const 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.

Access functions:

bool isCancelled() const

Notifier signal:

void cancelled()

isMainFrame : const bool

Indicates whether this error originates from the main frame.

Access functions:

bool isMainFrame() const

isSubresource : const bool

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

Access functions:

bool isSubresource() const

overridable : const 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.

Access functions:

bool overridable() const

strictEnforcement : const 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.

Access functions:

bool strictEnforcement() const

url : const QUrl

The URL associated with the certificate error.

Access functions:

QUrl url() const

Member Function Documentation

OxideQCertificateError::~OxideQCertificateError()

Destroy the certificate error. If this is a main-frame document error (isMainFrame is true and isSubresource is false), this will destroy the associated transient page if it still exists. If the error is overridable and the application hasn't already responded by calling allow or deny, then the connection will be aborted automatically.

[slot] void OxideQCertificateError::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.

[slot] void OxideQCertificateError::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.