Qt QNetworkAccessManager with SSL

I am completely new to SSL (and new to Qt too). I want to create an SSL encrypted connection and have not found any good examples regarding the general structure.

QNetworkAccessManager qnam;
QSslConfiguration sslConfiguration(QSslConfiguration::defaultConfiguration());
SslConfiguration.setProtocol(QSsl::SslV3);
QNetworkRequest req;
req.setSslConfiguration(sslConfiguration);
req.setUrl(QUrl("https://www.address.tld/"));

QNetworkReply *rep = qnam->get(req);

Is this how it works or do I need to do something further?

Hello

+4
source share
1 answer

You may have asked this question at a time when there were no examples that you could follow. There are a few examples at the moment. Go to the welcome page in QT Creator and select Examples (under the "Projects" button in the left pane.) Then enter "ssl" in the search field. On my system, I see three examples. NTN.

0
source

All Articles