summaryrefslogtreecommitdiffstats
path: root/src/network/doc/snippets
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-06-12 11:11:08 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-07-01 11:26:15 +0200
commit37d9e44cd010c9844b0dbe2b25f307eab15b3ea8 (patch)
tree930a202df40ba87e2d37532b07dd21be847531c1 /src/network/doc/snippets
parent4fbb040f754b7db310018394dd7ea6f5c997d50e (diff)
QSslConfiguration::setCiphers - introduce the overload taking QString
We had such an overloaded version in QSslSocket, it was deprecated without providing any alternative. Now this function has some use and may be introduced in Qt6, as QSslConfiguration::setCiphers(const QString &). Last but not the least - a useless and strange auto-test was removed (it was creating a list of 5 QSslCiphers each with isNull() == true). That's becasue '!MD5' or 'ALL' (for example) is not a cipher to be found in supportedCiphers. Change-Id: I47eb4c0faa9b52885e883751dd992cd9cb3d26fe Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/doc/snippets')
-rw-r--r--src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp b/src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp
index 5d90dde5ea..b857a57a63 100644
--- a/src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp
+++ b/src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp
@@ -53,3 +53,10 @@ QSslConfiguration config = sslSocket.sslConfiguration();
config.setProtocol(QSsl::TlsV1_0);
sslSocket.setSslConfiguration(config);
//! [0]
+
+
+//! [1]
+QSslConfiguration tlsConfig = QSslConfiguration::defaultConfiguration();
+tlsConfig.setCiphers(QStringLiteral("DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA"));
+//! [1]
+