views:

281

answers:

1

Hi

Is there any way to replace QSslSocket used by QNetworkAccessManager with my own implementation?

I was really looking forward to use WebKit!!

I'm working on attaching PKCS11 implementation to our Qt based software.

So far the only way I found is to use QHttp - but doc says that this class should not be used..

I find QNetworkAccessManager very limiting so far. Yes its simple - but it is not the point of this framework.

???

+1  A: 

You cannot right now replace the QSslSocket inside the HTTP implementation. The only thing you could do is override createRrequest of your QNAM and completely override the HTTP implementation.

What exactly needs to be done to use PKCS11? Would you need to modify some code in src/network/ssl/qsslsocket* and change the SSLContext? Or does the HTTP layer also need change?

guruz
I reached the same conclusion.Overriding QNetworkAccessManager/QNetworkReply is the only way, then inside QNetworkReply - QHttp can be used, and it exposes setSocket. I don't want to patch Qt as I'm heavy beta builds user, too much headache to port changes over.For everyone who will face the same task -read this post:http://lists.trolltech.com/qt-interest/2008-11/thread00002-0.htmlPKCS11 use:I need to use certificate from the Smartcard for client certificate authentication. Subclassing QSslSocket/QTcpSocket would be enough if QNetworkAccessManager would expose API to set it.
Buble