From 0b1025b8aea4aa0336671f7e908287d65490d120 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 1 Aug 2018 12:57:44 +0200 Subject: Make it possible to enable OCSP on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code follows Chromium and also set a CertNetFetcher on both Linux and macOS, but it appears to be currently unused. [ChangeLog][QWebEngineProfile] A profile can now be designated to download OCSP records and thus enable OCSP verification on Linux. Task-number: QTBUG-58059 Task-number: QTBUG-71164 Change-Id: I84fd34d4351cb7aa4417ce4058f97bad4b8d0cd4 Reviewed-by: Jüri Valdmann --- examples/webengine/quicknanobrowser/ApplicationRoot.qml | 3 ++- examples/webenginewidgets/simplebrowser/main.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/webengine/quicknanobrowser/ApplicationRoot.qml b/examples/webengine/quicknanobrowser/ApplicationRoot.qml index 67b686541..3bc571546 100644 --- a/examples/webengine/quicknanobrowser/ApplicationRoot.qml +++ b/examples/webengine/quicknanobrowser/ApplicationRoot.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.1 -import QtWebEngine 1.2 +import QtWebEngine 1.9 QtObject { id: root @@ -57,6 +57,7 @@ QtObject { property QtObject defaultProfile: WebEngineProfile { storageName: "Profile" offTheRecord: false + useForGlobalCertificateVerification: true } property QtObject otrProfile: WebEngineProfile { diff --git a/examples/webenginewidgets/simplebrowser/main.cpp b/examples/webenginewidgets/simplebrowser/main.cpp index 96b1eab97..5a8a0e65d 100644 --- a/examples/webenginewidgets/simplebrowser/main.cpp +++ b/examples/webenginewidgets/simplebrowser/main.cpp @@ -52,6 +52,7 @@ #include "browserwindow.h" #include "tabwidget.h" #include +#include #include QUrl commandLineUrlArgument() @@ -73,6 +74,8 @@ int main(int argc, char **argv) app.setWindowIcon(QIcon(QStringLiteral(":AppLogoColor.png"))); QWebEngineSettings::defaultSettings()->setAttribute(QWebEngineSettings::PluginsEnabled, true); + QWebEngineSettings::defaultSettings()->setAttribute(QWebEngineSettings::DnsPrefetchEnabled, true); + QWebEngineProfile::defaultProfile()->setUseForGlobalCertificateVerification(); QUrl url = commandLineUrlArgument(); -- cgit v1.2.3