summaryrefslogtreecommitdiffstats
path: root/src/network/configure.json
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2018-06-25 16:30:36 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2018-07-13 04:50:38 +0000
commitd74ced697e96cf89ad382ccc5f730f55df955c36 (patch)
treed21dd386b9b6a0d3cd8596332ce240a0a301930e /src/network/configure.json
parent58065cedf753032477487799845b4414a6476a39 (diff)
Extend the feature 'dtls' to handle missing DTLS support in OpenSSL
OpenSSL has 'no-dtls' configure option (or can be too ancient to properly support it), we shall respect such builds. This patch extends configure.json with a 'dtls' test and adds protection against linkage/compile-time issues in the QtNetwork's code. Change-Id: I0c0dd94f5c226115cee4285b82c83aa546555aea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/configure.json')
-rw-r--r--src/network/configure.json17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/network/configure.json b/src/network/configure.json
index 5245ba06b6..0215ad73c5 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -14,6 +14,7 @@
"openssl": { "type": "optionalString", "values": [ "no", "yes", "linked", "runtime" ] },
"openssl-linked": { "type": "void", "name": "openssl", "value": "linked" },
"openssl-runtime": { "type": "void", "name": "openssl", "value": "runtime" },
+ "dtls": "boolean",
"sctp": "boolean",
"securetransport": "boolean",
"ssl": "boolean",
@@ -149,6 +150,19 @@
"type": "compile",
"test": "unix/openssl11",
"use": "openssl"
+ },
+ "dtls": {
+ "label": "DTLS support in OpenSSL",
+ "type": "compile",
+ "test": {
+ "include": "openssl/ssl.h",
+ "tail": [
+ "#if defined(OPENSSL_NO_DTLS) || !defined(DTLS1_2_VERSION)",
+ "# error OpenSSL without DTLS support",
+ "#endif"
+ ]
+ },
+ "use": "openssl"
}
},
@@ -220,7 +234,7 @@
"label": "DTLS",
"purpose": "Provides a DTLS implementation",
"section": "Networking",
- "condition": "features.openssl",
+ "condition": "features.openssl && tests.dtls",
"output": [ "publicFeature" ]
},
"opensslv11": {
@@ -353,6 +367,7 @@ For example:
"openssl",
"openssl-linked",
"opensslv11",
+ "dtls",
"sctp",
"system-proxies"
]