I’ve been working with SSL in Qt, where I need to set a specific protocol (instead of the default “secure protocols”). It looks like this works:
QSslConfiguration config = QSslConfiguration::defaultConfiguration();
config.setProtocol(QSsl::TlsV1_0);
QSslConfiguration::setDefaultConfiguration(config);
But it makes me uncomfortable to set the protocol in a global way like this, instead of setting it on the QWebPage or QWebView or something. Am I missing something obvious or is this really the best way to do this? I know I can set it on an SSL socket, but I’m using QtWebKit, and don’t have access to the individual sockets.
The way I’ve found to do this is to extend
QNetworkAccessManagerand set the protocol increateRequest:Then I can set it in my
QWebpageusingsetNetworkAccessManager.