diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-04-16 11:38:46 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-04-17 17:10:12 +0000 |
commit | c555c8b9f5c5bb1f390d94cf43d249e74ecb86f6 (patch) | |
tree | 467b82e7d4347a114697f06d08fe787b923eb0fe /src/network/ssl/qsslcontext_openssl11.cpp | |
parent | 3ac029f674edea1cc91014345f445a9a8d1fc89f (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_openssl11.cpp')
-rw-r--r-- | src/network/ssl/qsslcontext_openssl11.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/ssl/qsslcontext_openssl11.cpp b/src/network/ssl/qsslcontext_openssl11.cpp index 5c68ed41db..0f4878c98d 100644 --- a/src/network/ssl/qsslcontext_openssl11.cpp +++ b/src/network/ssl/qsslcontext_openssl11.cpp @@ -139,6 +139,13 @@ init_context: minVersion = TLS1_2_VERSION; maxVersion = TLS_MAX_VERSION; break; + case QSsl::DtlsV1_0: + case QSsl::DtlsV1_0OrLater: + case QSsl::DtlsV1_2: + case QSsl::DtlsV1_2OrLater: + sslContext->errorStr = QSslSocket::tr("unsupported protocol"); + sslContext->errorCode = QSslError::UnspecifiedError; + return; case QSsl::SslV2: // This protocol is not supported by OpenSSL 1.1 and we handle // it as an error (see the code above). |