QtCoap on OS-X is missing DTLS support -> QT_CONFIG(dtls) == false
-
I want to play around with the QtCOAP plugin. Unfortunately the DTLS support is missing on my OS-X Catalina. All I got is this error:
qt.coap.connection: DTLS is disabled, falling back to QtCoap::NoSecurity mode.
I have fully installed Qt 5.14.1 (with sources) with the online installer and compiled the COAP Plugin afterwards by myself with the prebuilt qmake.
The DTLS specific parts in the QtCoap code are wrapped within
#if QT_CONFIG(dtls)
blocks
(e.g. qcoapqudpconnection_p.h) . Which are resolved to false.What do I need to do to enable DTLS support for QtCoap?
Thanks in advance! -
Hi,
From a quick look at the sources, it seems that DTLS is currently only available using OpenSSL. By default Qt is built using the SecureTranport framework on macOS which is the official cryptographic library for that OS.
You can rebuild the qtbase module to use OpenSSL instead but ensure to install the latest version of the 1.1 series.