summaryrefslogtreecommitdiffstats
path: root/src/core/content_browser_client_qt.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2020-04-28 14:45:18 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-08-14 16:34:37 +0200
commita2a9ea11f95b4a5347f599d8a28151166ad00a71 (patch)
tree609329b16e7e3febfe600f10c4ec776aa05e9eb2 /src/core/content_browser_client_qt.cpp
parent4c78cf32fc302a29a61d2fb50551333b5f79051c (diff)
Move QWebEngineCertificateError to core and use it in QML
Update qml certificate error test. Task-number: QTBUG-74585 Change-Id: I9383052bd1e37160d03e3d66e8f2e4a749023736 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/content_browser_client_qt.cpp')
-rw-r--r--src/core/content_browser_client_qt.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 32013849b..c39d28fef 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -302,37 +302,11 @@ void ContentBrowserClientQt::GetQuotaSettings(content::BrowserContext* context,
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
}
-// Copied from chrome/browser/ssl/ssl_error_handler.cc:
-static int IsCertErrorFatal(int cert_error)
-{
- switch (cert_error) {
- case net::ERR_CERT_COMMON_NAME_INVALID:
- case net::ERR_CERT_DATE_INVALID:
- case net::ERR_CERT_AUTHORITY_INVALID:
- case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM:
- case net::ERR_CERT_WEAK_KEY:
- case net::ERR_CERT_NAME_CONSTRAINT_VIOLATION:
- case net::ERR_CERT_VALIDITY_TOO_LONG:
- case net::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED:
- case net::ERR_CERT_SYMANTEC_LEGACY:
- return false;
- case net::ERR_CERT_CONTAINS_ERRORS:
- case net::ERR_CERT_REVOKED:
- case net::ERR_CERT_INVALID:
- case net::ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY:
- case net::ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN:
- return true;
- default:
- NOTREACHED();
- }
- return true;
-}
-
void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webContents,
int cert_error,
const net::SSLInfo &ssl_info,
const GURL &request_url,
- bool is_main_frame_request,
+ bool /* is_main_frame_request */,
bool strict_enforcement,
base::OnceCallback<void(content::CertificateRequestResultType)> callback)
{
@@ -344,8 +318,6 @@ void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webCont
cert_error,
ssl_info,
request_url,
- is_main_frame_request,
- IsCertErrorFatal(cert_error),
strict_enforcement,
std::move(callback))));
contentsDelegate->allowCertificateError(errorController);