summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslcontext_opensslpre11.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2018-04-16 11:38:46 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2018-04-17 17:10:12 +0000
commitc555c8b9f5c5bb1f390d94cf43d249e74ecb86f6 (patch)
tree467b82e7d4347a114697f06d08fe787b923eb0fe /src/network/ssl/qsslcontext_opensslpre11.cpp
parent3ac029f674edea1cc91014345f445a9a8d1fc89f (diff)
Add QSsl::Dtls1_0OrLater enumerator
... to make DTLS protocols work more like TLS protocol versions. Also, handle (as 'unsupported' for now) those new constants in a switch statement, when creating SSL_CTX (fixing build errors). Change-Id: Ia444184ca191d8665e37046b0b9120e43ec5893a Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/ssl/qsslcontext_opensslpre11.cpp')
-rw-r--r--src/network/ssl/qsslcontext_opensslpre11.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/ssl/qsslcontext_opensslpre11.cpp b/src/network/ssl/qsslcontext_opensslpre11.cpp
index eea821804f..7994892cfc 100644
--- a/src/network/ssl/qsslcontext_opensslpre11.cpp
+++ b/src/network/ssl/qsslcontext_opensslpre11.cpp
@@ -73,6 +73,13 @@ void QSslContext::initSslContext(QSslContext *sslContext, QSslSocket::SslMode mo
bool unsupportedProtocol = false;
init_context:
switch (sslContext->sslConfiguration.protocol()) {
+ case QSsl::DtlsV1_0:
+ case QSsl::DtlsV1_0OrLater:
+ case QSsl::DtlsV1_2:
+ case QSsl::DtlsV1_2OrLater:
+ sslContext->ctx = 0;
+ unsupportedProtocol = true;
+ break;
case QSsl::SslV2:
#ifndef OPENSSL_NO_SSL2
sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv2_client_method() : q_SSLv2_server_method());