diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-11-07 16:38:05 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-11-10 11:05:49 +0000 |
commit | 2d49b1b20f3275316310df599f1363ac86b8f078 (patch) | |
tree | e8cf40cbbd7a77c389f11241acc810be34217853 /src/core | |
parent | c1799923be3fb6d68391d5d4729c2d542424a734 (diff) |
Fix sites with optional client certificate support
We fail to load pages that supports client certificates because we
didn't implement the client certificate selection.
This patch makes a small implementation that selects no certificate
whenever a client certificate is requested.
Task-number: QTBUG-56206
Change-Id: I95394d9664c7e8e4d03d9e63e5043da81e2672a4
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/content_browser_client_qt.cpp | 8 | ||||
-rw-r--r-- | src/core/content_browser_client_qt.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index bff0557a8..fd6bd1f86 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -47,6 +47,7 @@ #include "content/browser/renderer_host/render_view_host_delegate.h" #include "content/public/browser/browser_main_parts.h" #include "content/public/browser/child_process_security_policy.h" +#include "content/public/browser/client_certificate_delegate.h" #include "content/public/browser/media_observer.h" #include "content/public/browser/quota_permission_context.h" #include "content/public/browser/render_frame_host.h" @@ -434,6 +435,13 @@ void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webCont *result = content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY; } +void ContentBrowserClientQt::SelectClientCertificate(content::WebContents * /*webContents*/, + net::SSLCertRequestInfo * /*certRequestInfo*/, + scoped_ptr<content::ClientCertificateDelegate> delegate) +{ + delegate->ContinueWithCertificate(nullptr); +} + content::LocationProvider *ContentBrowserClientQt::OverrideSystemLocationProvider() { #ifdef QT_USE_POSITIONING diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h index 1878e3d27..2b023db5f 100644 --- a/src/core/content_browser_client_qt.h +++ b/src/core/content_browser_client_qt.h @@ -102,6 +102,9 @@ public: bool expired_previous_decision, const base::Callback<void(bool)>& callback, content::CertificateRequestResultType* result) Q_DECL_OVERRIDE; + virtual void SelectClientCertificate(content::WebContents* web_contents, + net::SSLCertRequestInfo* cert_request_info, + scoped_ptr<content::ClientCertificateDelegate> delegate) Q_DECL_OVERRIDE; content::LocationProvider* OverrideSystemLocationProvider() Q_DECL_OVERRIDE; content::DevToolsManagerDelegate *GetDevToolsManagerDelegate() Q_DECL_OVERRIDE; virtual net::URLRequestContextGetter *CreateRequestContext(content::BrowserContext *browser_context, content::ProtocolHandlerMap *protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptorss) Q_DECL_OVERRIDE; |