From bf3753f02402b44455038c4fa2a897d41aadf850 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Wed, 14 Aug 2019 18:59:23 +0200 Subject: Allow deferring QWebEngineCertificateError handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce defer() method for halting URL load on certificate errors, and methods for rejecting and ignoring these errors subsequently in async manner. [ChangeLog][QtWebEngineWidgets][QWebEngineCertificateError] New methods for asynchronous decision on certificate error during load. Fixes: QTBUG-55110 Change-Id: Ib23eb568862ccc360208922a6a581f8e7edc4a7e Reviewed-by: Michael BrĂ¼ning --- src/webenginewidgets/api/qwebenginecertificateerror.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/webenginewidgets/api/qwebenginecertificateerror.h') diff --git a/src/webenginewidgets/api/qwebenginecertificateerror.h b/src/webenginewidgets/api/qwebenginecertificateerror.h index 82ac281be..f8805e8a7 100644 --- a/src/webenginewidgets/api/qwebenginecertificateerror.h +++ b/src/webenginewidgets/api/qwebenginecertificateerror.h @@ -42,11 +42,12 @@ #include -#include +#include #include QT_BEGIN_NAMESPACE +class CertificateErrorController; class QWebEngineCertificateErrorPrivate; class QWEBENGINEWIDGETS_EXPORT QWebEngineCertificateError { @@ -78,10 +79,20 @@ public: bool isOverridable() const; QString errorDescription() const; + QWebEngineCertificateError(const QWebEngineCertificateError &other); + QWebEngineCertificateError& operator=(const QWebEngineCertificateError &other); + + void defer(); + bool deferred() const; + + void rejectCertificate(); + void ignoreCertificateError(); + bool answered() const; + private: - Q_DISABLE_COPY(QWebEngineCertificateError) - Q_DECLARE_PRIVATE(QWebEngineCertificateError) - QScopedPointer d_ptr; + friend class QWebEnginePagePrivate; + QWebEngineCertificateError(const QSharedPointer &controller); + QExplicitlySharedDataPointer d; }; QT_END_NAMESPACE -- cgit v1.2.1 From 8d045ce2a4cc65660bdf6ee8b555899c5c6119de Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Mon, 26 Aug 2019 13:46:35 +0200 Subject: Api to get certificate's chain on error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expose certificate's chain on validation error starting with the immediate certificate and ending with the CA's certificate. [ChangeLog][QtWebEngineWidgets][QWebEngineCertificateError] New method to get the peer's chain of digital certificates. Fixes: QTBUG-51176 Change-Id: I799dfe9e44f9f2517f4691d175beee256114af79 Reviewed-by: Michael BrĂ¼ning --- src/webenginewidgets/api/qwebenginecertificateerror.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/webenginewidgets/api/qwebenginecertificateerror.h') diff --git a/src/webenginewidgets/api/qwebenginecertificateerror.h b/src/webenginewidgets/api/qwebenginecertificateerror.h index f8805e8a7..b2dd65a9f 100644 --- a/src/webenginewidgets/api/qwebenginecertificateerror.h +++ b/src/webenginewidgets/api/qwebenginecertificateerror.h @@ -44,6 +44,7 @@ #include #include +#include QT_BEGIN_NAMESPACE @@ -89,6 +90,8 @@ public: void ignoreCertificateError(); bool answered() const; + QList chain() const; + private: friend class QWebEnginePagePrivate; QWebEngineCertificateError(const QSharedPointer &controller); -- cgit v1.2.1