diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-22 17:24:13 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-23 08:52:36 +0000 |
commit | f1a7977f92df4578891ea54b12a62d6054b16b55 (patch) | |
tree | 67205b7b78aca192248970a0c6e9d041970ce2e6 /examples/webenginewidgets/simplebrowser | |
parent | 7430a9dae01f8d77a7fbbf163327ea65894cf8bb (diff) |
Allow client certificates without openssl
We don't use OpenSSL, but only depended on it because QtNetwork didn't
define QSslCertificate without an SSL backend.
I changed that in QtNetwork 5.12, so we only rely on a QtNetwork SSL
backend with older Qt versions.
Task-number: QTBUG-54877
Change-Id: I16f3077235f5c48610597868608ef2e5ca2efa99
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/webenginewidgets/simplebrowser')
-rw-r--r-- | examples/webenginewidgets/simplebrowser/webpage.cpp | 4 | ||||
-rw-r--r-- | examples/webenginewidgets/simplebrowser/webpage.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/webenginewidgets/simplebrowser/webpage.cpp b/examples/webenginewidgets/simplebrowser/webpage.cpp index ab9dce4b8..e44410284 100644 --- a/examples/webenginewidgets/simplebrowser/webpage.cpp +++ b/examples/webenginewidgets/simplebrowser/webpage.cpp @@ -66,7 +66,7 @@ WebPage::WebPage(QWebEngineProfile *profile, QObject *parent) connect(this, &QWebEnginePage::featurePermissionRequested, this, &WebPage::handleFeaturePermissionRequested); connect(this, &QWebEnginePage::proxyAuthenticationRequired, this, &WebPage::handleProxyAuthenticationRequired); connect(this, &QWebEnginePage::registerProtocolHandlerRequested, this, &WebPage::handleRegisterProtocolHandlerRequested); -#if QT_CONFIG(ssl) +#if !defined(QT_NO_SSL) || QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) connect(this, &QWebEnginePage::selectClientCertificate, this, &WebPage::handleSelectClientCertificate); #endif } @@ -197,7 +197,7 @@ void WebPage::handleRegisterProtocolHandlerRequested(QWebEngineRegisterProtocolH } //! [registerProtocolHandlerRequested] -#if QT_CONFIG(ssl) +#if !defined(QT_NO_SSL) || QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) void WebPage::handleSelectClientCertificate(QWebEngineClientCertificateSelection selection) { // Just select one. diff --git a/examples/webenginewidgets/simplebrowser/webpage.h b/examples/webenginewidgets/simplebrowser/webpage.h index 0b351ab31..908295894 100644 --- a/examples/webenginewidgets/simplebrowser/webpage.h +++ b/examples/webenginewidgets/simplebrowser/webpage.h @@ -69,7 +69,7 @@ private slots: void handleFeaturePermissionRequested(const QUrl &securityOrigin, Feature feature); void handleProxyAuthenticationRequired(const QUrl &requestUrl, QAuthenticator *auth, const QString &proxyHost); void handleRegisterProtocolHandlerRequested(QWebEngineRegisterProtocolHandlerRequest request); -#if QT_CONFIG(ssl) +#if !defined(QT_NO_SSL) || QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) void handleSelectClientCertificate(QWebEngineClientCertificateSelection clientCertSelection); #endif }; |