mercredi 6 mai 2015

Custom QSslSocket for QNetworkAccessManager

In my project I need to use a specific version of OpenSSL. I'm using both Qt 4.8.6 and Qt 5.4.0. I'd like to create a custom QSslSocket to be passed to QNetworkAccessManager, which will be used for a QWebView.

I noticed that in Qt 4.8.6 only TLS 1.0 is supported, newer protocol versions aren't.

Is there a way to pass a subclassed QSslSocket (with a TLS 1.2 version) to QNetworkAccessManager in an easy way? Looking at the source code, it is hidden from public usage (QSslSocket is a friend of private implementation)?

Note: I don't want to use QHttp because it's not public anymore in newer Qt libraries, making it hard to be portable.

Edit: There's a similar question (QNetworkAccessManager/QNetworkReply with custom QTcpSocket?), made 5 years ago, but it still cannot be possible to modify the QSslSocket directly. The answer given back then is too generic

Aucun commentaire:

Enregistrer un commentaire