summaryrefslogtreecommitdiff
path: root/src/core/api
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-10-26 10:04:00 +0200
committerMichal Klocek <michal.klocek@qt.io>2022-11-18 15:10:18 +0100
commit2aaaf875327b553eafa29a6ca943893f6e362ef9 (patch)
tree9059de136e8ff39d98d34d75e61667c9d1c902b8 /src/core/api
parent16ae468b1034fc2a44b80dd4d964984771d663fa (diff)
downloadqtwebengine-2aaaf875327b553eafa29a6ca943893f6e362ef9.tar.gz
Doc: Improve QWebEngineClientCertificateStore documentation
Fixes: QTBUG-106497 Pick-to: 6.4 Change-Id: Ic10d2d54722b071eaacd9f7cb74b08c8ecedcd65 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src/core/api')
-rw-r--r--src/core/api/qwebengineclientcertificatestore.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/core/api/qwebengineclientcertificatestore.cpp b/src/core/api/qwebengineclientcertificatestore.cpp
index 243797193..3d231c05f 100644
--- a/src/core/api/qwebengineclientcertificatestore.cpp
+++ b/src/core/api/qwebengineclientcertificatestore.cpp
@@ -20,7 +20,21 @@ QT_BEGIN_NAMESPACE
The class allows to store client certificates in an in-memory store.
When a web site requests an SSL client certificate, the QWebEnginePage::selectClientCertificate
signal is emitted with matching certificates from the native certificate store or the in-memory store.
- The getInstance() method can be used to access the single instance of the class.
+
+ The class instance can be obtained with the QWebEngineProfile::clientCertificateStore() method.
+
+ \code
+ QFile certFile(":/resouces/certificate.crt");
+ certFile.open(QIODevice::ReadOnly);
+ const QSslCertificate cert(certFile.readAll(), QSsl::Pem);
+
+ QFile keyFile(":/resources/privatekey.key");
+ keyFile.open(QIODevice::ReadOnly);
+ const QSslKey sslKey(keyFile.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, "");
+
+ QWebEngineProfile profile;
+ profile.clientCertificateStore()->add(cert, sslKey);
+ \endcode
*/
QWebEngineClientCertificateStore::QWebEngineClientCertificateStore(QtWebEngineCore::ClientCertificateStoreData *storeData)