summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebenginepage.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-06-21 12:16:00 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-07-08 19:23:08 +0000
commit10877c3ec0184e6c2a07b8775d32c8efc38a29a3 (patch)
treee5e1c69e2008205b2178c940c47c1349d6e41c7b /src/webenginewidgets/api/qwebenginepage.cpp
parenta83fd13f62673ce439bdfea55238f9d8ef8676ce (diff)
Enable client certificate store
Creates the default client cerficate store for the platform and when given a choice of client certificates forwards to the choice to the application. Only a Widgets API for now. Task-number: QTBUG-54877 Change-Id: Ie15152398d5769579fa0c07e3e3035c2374e9940 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.cpp')
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index 2bb19361a..885ad7a69 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -50,6 +50,7 @@
#if QT_CONFIG(webengine_printing_and_pdf)
#include "printing/pdfium_document_wrapper_qt.h"
#endif
+#include "qwebenginecertificateerror.h"
#include "qwebenginefullscreenrequest.h"
#include "qwebenginehistory.h"
#include "qwebenginehistory_p.h"
@@ -1632,6 +1633,36 @@ void QWebEnginePagePrivate::allowCertificateError(const QSharedPointer<Certifica
controller->accept(accepted);
}
+void QWebEnginePagePrivate::selectClientCert(const QSharedPointer<ClientCertSelectController> &controller)
+{
+#if QT_CONFIG(ssl)
+ Q_Q(QWebEnginePage);
+ QWebEngineClientCertSelection certSelection(controller);
+
+ Q_EMIT q->selectClientCertificate(certSelection);
+#else
+ Q_UNUSED(controller);
+#endif
+}
+
+#if QT_CONFIG(ssl)
+/*!
+ \fn void QWebEnginePage::selectClientCertificate(QWebEngineClientCertSelection clientCertSelection)
+ \since 5.12
+
+ This signal is emitted when a web site requests an SSL client certificate, and one or more were
+ found in system's client certificate store.
+
+ Handling the signal is asynchronous, and loading will be waiting until a certificate is selected,
+ or the last copy of \a clientCertSelection is destroyed.
+
+ If the signal is not handled, \a clientCertSelection is automatically destroyed, and loading
+ will continue without a client certificate.
+
+ \sa QWebEngineClientCertSelection
+*/
+#endif
+
void QWebEnginePagePrivate::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID)
{
Q_Q(QWebEnginePage);