summaryrefslogtreecommitdiffstats
path: root/src/network/doc/snippets/code/src_network_ssl_qsslconfiguration.cpp
blob: edc542ac3f5f31e52b548aa64efe8ca356265000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

//! [0]
QSslConfiguration config = sslSocket.sslConfiguration();
config.setProtocol(QSsl::TlsV1_2);
sslSocket.setSslConfiguration(config);
//! [0]


//! [1]
QSslConfiguration tlsConfig = QSslConfiguration::defaultConfiguration();
tlsConfig.setCiphers(QStringLiteral("DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:AES256-SHA"));
//! [1]