Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.0
Description
In simple browser example,
1. Use QSslCertificate::importPkcs12() to import client cert, and add to QWebEngineClientCertificateStore
/browser.cpp BrowserWindow *Browser::createWindow(bool offTheRecord) { ... auto certStore = profile->clientCertificateStore(); QFile keyFile("user.p12"); if (keyFile.open(QIODevice::ReadOnly)) { QSslKey client_key; QSslCertificate client_cert; if (QSslCertificate::importPkcs12(&keyFile, &client_key, &client_cert)) { certStore->add(client_cert, client_key); } } ... }
2. Check for the client cert in WebPage::handleSelectClientCertificate() slot.
// webpage.cpp void WebPage::handleSelectClientCertificate(QWebEngineClientCertificateSelection selection) { for (auto& cert : selection.certificates()) { ... } }
However only system client certs are in the selection. And if I do not install any client cert to Windows system , the signal will not be emitted at all.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-86132 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
640935,2 | Make client certifcate work without CA | 5.15 | qt/qtwebengine | Status: NEW | 0 | 0 |