Represents a certificate error More...
Header: | #include <oxideqcertificateerror.h> |
Instantiated By: | CertificateError |
Inherits: | QObject |
enum | Error { ErrorBadIdentity, ErrorExpired, ErrorDateInvalid, ErrorAuthorityInvalid, ..., ErrorGeneric } |
|
|
~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 |
void | cancelled() |
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.
Constant | Value | Description |
---|---|---|
OxideQCertificateError::ErrorBadIdentity | 1 | The identity of the certificate does not match the identity of the site. |
OxideQCertificateError::ErrorExpired | 2 | The certificate has expired. |
OxideQCertificateError::ErrorDateInvalid | 3 | The certificate has a date that is invalid, eg, its start date is in the future. |
OxideQCertificateError::ErrorAuthorityInvalid | 4 | The certificate is signed by an authority that isn't trusted. |
OxideQCertificateError::ErrorRevoked | 5 | The certificate has been revoked. |
OxideQCertificateError::ErrorInvalid | 6 | The certificate is invalid, eg, it has errors. |
OxideQCertificateError::ErrorInsecure | 7 | The certificate is insecure, eg, it uses a weak signature algorithm or has a weak public key. |
OxideQCertificateError::ErrorGeneric | 8 | This is used for all other unspecified errors. |
The error code for this certificate error.
Access functions:
Error | certError() const |
The certificate associated with this error.
Access functions:
OxideQSslCertificate | certificate() const |
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() |
Indicates whether this error originates from the main frame.
Access functions:
bool | isMainFrame() const |
Indicates whether this error originates from a subresource within its frame.
Access functions:
bool | isSubresource() const |
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 |
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 |
The URL associated with the certificate error.
Access functions:
QUrl | url() const |
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.