Details
-
Bug
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
5.0.1
-
None
Description
I'm have nginx webserver with proxying websockets.
I'm generate self-signed CA certificates, and generate clients certificates, signed by CA certificates.
In my application I subclass QNetworkAccessManager as:
QNetworkReply* QNetworkAccessManagerEx::createRequest(Operation op, const QNetworkRequest & req, QIODevice * outgoingData)
{ QNetworkRequest myReq = req; QSslConfiguration conf = req.sslConfiguration(); conf.setPeerVerifyMode(QSslSocket::VerifyNone); QFile certFile("client01.crt"); certFile.open(QIODevice::ReadOnly); conf.setLocalCertificate(QSslCertificate(certFile.readAll())); QFile keyFile("client01.key"); keyFile.open(QIODevice::ReadOnly); QSslKey key(keyFile.readAll(), QSsl::Rsa); conf.setPrivateKey(key); certFile.close(); myReq.setSslConfiguration(conf); QNetworkReply *repl = QNetworkAccessManager::createRequest( op, myReq, outgoingData ); return repl; }And set my QNetworkAccessManagerEx to QWebView:
ui->webView->page()->setNetworkAccessManager(&networkAccessManager);
If, navigate to site websocket.org, and trying to connect to secure websocket, all working correctly, and QWebView appeals to my QNetworkAccessManagerEx::createRequest(…)
If navigate to my local web server, QWebView appeals to my QNetworkAccessManagerEx::createRequest(…) only during loading web page, after that, when I want connect to websocket manually (button on web page) QWebView dont appeals to QNetworkAccessManagerEx::createRequest(…).
I tried call ignoreSslErrors(), but no effect.
It seems that the signal and an indication of client certificates do not reach the engine javascript in QWebView.
Attachments
Issue Links
- relates to
-
QTBUG-19828 Qt should issue a signal when server requests a SSL client authentication
-
- Open
-