From 326441ae71afd215f7471222f0ea82568d87ff1a Mon Sep 17 00:00:00 2001 From: Jannis Voelker Date: Mon, 24 Aug 2020 15:22:59 +0200 Subject: CMake: Port the open62541 plugin to OpenSSL Open62541 v1.1 has been extended with an OpenSSL based security plugin. This change removes the mbedTLS dependency for the CMake build of the open62541 plugin and uses FindWrapOpenSSL.cmake to detect security support. The bundled open62541 amalgamation build contains the changes from https://github.com/open62541/open62541/pull/3876 [ChangeLog][open62541 plugin] Security support now uses OpenSSL instead of mbedTLS Change-Id: I29a15c08a67593219a6c637116f84d27c0702db5 Reviewed-by: Alexandru Croitor --- cmake/FindMbedtls.cmake | 67 --------------------- .../opcuaviewer/pki/own/certs/opcuaviewer.der | Bin 1121 -> 1610 bytes .../opcuaviewer/pki/own/private/opcuaviewer.pem | 52 ++++++++-------- .../pki/trusted/certs/open62541-testserver.der | Bin 1127 -> 1161 bytes src/3rdparty/open62541/open62541.c | 7 ++- src/opcua/configure.cmake | 46 ++++++-------- src/opcua/doc/src/qtopcua.qdoc | 4 ++ src/plugins/opcua/open62541/CMakeLists.txt | 22 ++++++- src/plugins/opcua/open62541/qopen62541node.h | 2 +- tests/auto/clientSetupInCpp/CMakeLists.txt | 2 +- tests/auto/declarative/CMakeLists.txt | 2 +- tests/auto/qopcuaclient/CMakeLists.txt | 2 +- .../pki/trusted/certs/open62541-testserver.der | Bin 1127 -> 1161 bytes tests/open62541-testserver/CMakeLists.txt | 22 ++++++- .../pki/own/certs/open62541-testserver.der | Bin 1127 -> 1161 bytes .../pki/own/private/open62541-testserver.der | Bin 1216 -> 1675 bytes .../pki/trusted/certs/opcuaviewer.der | Bin 1121 -> 1610 bytes 17 files changed, 96 insertions(+), 132 deletions(-) delete mode 100644 cmake/FindMbedtls.cmake diff --git a/cmake/FindMbedtls.cmake b/cmake/FindMbedtls.cmake deleted file mode 100644 index 9e29ea1..0000000 --- a/cmake/FindMbedtls.cmake +++ /dev/null @@ -1,67 +0,0 @@ -#.rst: -# FindMbedtls -# --------- -# -# Try to locate the mbedTLS library. -# If found, this will define the following variables: -# -# ``Mbedtls_FOUND`` -# True if the mbedtls library is available -# ``Mbedtls_INCLUDE_DIRS`` -# The mbedTLS include directories -# ``Mbedx509_LIBRARIES`` -# The mbedx509 library for linking -# ``Mbedcrypto_LIBRARIES`` -# The mbedcrypto library for linking -# -# If ``Mbedtls_FOUND`` is TRUE, it will also define the following -# imported targets: -# -# ``mbedx509`` -# The mbedx509 library -# ``mbedcrypto`` -# The mbedcrypto library -# ``mbedtls`` -# An interface library combining mbedx509 and mbedcrypto - - -find_path(Mbedtls_INCLUDE_DIRS - NAMES mbedtls/x509_crt.h - HINTS ${MBEDTLS_INCDIR}) - -find_library(Mbedx509_LIBRARIES - NAMES mbedx509 - HINTS ${MBEDTLS_LIBDIR}) - -find_library(Mbedcrypto_LIBRARIES - NAMES mbedcrypto - HINTS ${MBEDTLS_LIBDIR}) - -if (NOT Mbedtls_INCLUDE_DIRS STREQUAL "Mbedtls_INCLUDE_DIRS-NOTFOUND" - AND NOT Mbedx509_LIBRARIES STREQUAL "Mbedx09_LIBRARIES-NOTFOUND" - AND NOT Mbedcrypto_LIBRARIES STREQUAL "Mbedcrypto_LIBRARIES-NOTFOUND") - set(Mbedtls_FOUND ON) -endif() - -if (Mbedtls_FOUND) - add_library(mbedx509 UNKNOWN IMPORTED) - set_target_properties(mbedx509 PROPERTIES - IMPORTED_LOCATION "${Mbedx509_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${Mbedtls_INCLUDE_DIRS}") - - add_library(mbedcrypto UNKNOWN IMPORTED) - set_target_properties(mbedcrypto PROPERTIES - IMPORTED_LOCATION "${Mbedcrypto_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${Mbedtls_INCLUDE_DIRS}") - - add_library(mbedtls INTERFACE IMPORTED) - set_property(TARGET mbedtls PROPERTY - INTERFACE_LINK_LIBRARIES mbedx509 mbedcrypto) -endif() - -mark_as_advanced(Mbedtls_INCLUDE_DIRS Mbedx509_LIBRARIES Mbedcrypto_LIBRARIES) - -include(FeatureSummary) -set_package_properties(Mbedtls PROPERTIES - URL "https://tls.mbed.org/" - DESCRIPTION "The mbedTLS library") diff --git a/examples/opcua/opcuaviewer/pki/own/certs/opcuaviewer.der b/examples/opcua/opcuaviewer/pki/own/certs/opcuaviewer.der index ef7ef42..638b3b9 100644 Binary files a/examples/opcua/opcuaviewer/pki/own/certs/opcuaviewer.der and b/examples/opcua/opcuaviewer/pki/own/certs/opcuaviewer.der differ diff --git a/examples/opcua/opcuaviewer/pki/own/private/opcuaviewer.pem b/examples/opcua/opcuaviewer/pki/own/private/opcuaviewer.pem index 52aeb30..398bdf6 100644 --- a/examples/opcua/opcuaviewer/pki/own/private/opcuaviewer.pem +++ b/examples/opcua/opcuaviewer/pki/own/private/opcuaviewer.pem @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDj0NCbOXIToCPB -JQetcDC+VaU8YtwhFb0WeeEPd18x6pNdnnYtEdQe8dcHD+7H2MT7tAMFOfvI2oMa -90whLfErqXs9onUVrAPTO4g3zdonim5HqB/q7TuRapmlgUxltXo4anPm/I4UA6M8 -R9lH/PvErm1IUs5G83eeq8V5a53Y+lG8nOiuOI2wtep9Vzh8fK9esSr17L6dRj+4 -pm9tIjyBrAe3B+/XwHu4ZdYqY7q8ZZscZcjxStRakOnyU1DI95VplyRnlp6MSEr4 -w18GRdfhcC7Y7zF34h/FB0s0VneIycqcyjrninNtwN7XjkpPJz0wkQCvUsTm6mQP -wyC5naehAgMBAAECggEAcnuvOTInF6G0Fg2rzAbDGAMmJDBx+tZXzYG2DfWpCwac -w8EsFf4NoPdbXZsuHZPbebm+gtPeqdLVa6m2wj26InzrB9AqEpf83BvgmlqCNLim -LrBYSdCpzKvLRpaxc7M9Fji4we1M4NXrJBHfKQQC6ZXWKTAjpRgYls4vUJM6IZzG -oIkclpxKDZGdgea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2D/BaroMqXMCgYAxNyTJ7/G7Grour15LKXFyMzo7PbYdm9A3pWSabjVOTkwDsO86 +oj3YmgvhHViZspRhGpRLzNWrGUX4FnCS3cNCNBteNAkGbfA7+rw8RQTOM+4vcTfB +D8+n0GaNNw2r6G1B/03Cz6KqJ/ShtqqWlbnrJTiD+X4T7ACHchsKQpOhmQKBgF6C +XM+mX6TPRpsUF2BzmW4SRtbvMOIrbNi1+gRuy6cvpc0740CpVGWYXhbpl/hzh3hi +MLOBXKN6XVHLtdsaHTuRibQzEGzq+mM7PeZF9HFLG27M6f759dtnNFTgULTRVQXr +Fw5iUVKKR0KtJgxXDjyINE/2k8J6YCFGsUWe5YMpAoGBAJ+igv0nkfPYr6khJuDa +sKs+VNYodRQSrHywtn16GSTLKOimDDfzoUmnsU1RzlVawfDmWurjrxMsq/xLcu2K +YdhcRPeDn2YugzIQd6SA75RuLwO6duJthw9ppLXzsEiRzVlvtQ2TCwWcnuSZPtV7 +xOLrnCjh6l8tY52zeNMvUXvO -----END PRIVATE KEY----- diff --git a/examples/opcua/opcuaviewer/pki/trusted/certs/open62541-testserver.der b/examples/opcua/opcuaviewer/pki/trusted/certs/open62541-testserver.der index 0bead45..e32d2c3 100644 Binary files a/examples/opcua/opcuaviewer/pki/trusted/certs/open62541-testserver.der and b/examples/opcua/opcuaviewer/pki/trusted/certs/open62541-testserver.der differ diff --git a/src/3rdparty/open62541/open62541.c b/src/3rdparty/open62541/open62541.c index 2ca1f25..041cd56 100644 --- a/src/3rdparty/open62541/open62541.c +++ b/src/3rdparty/open62541/open62541.c @@ -60855,8 +60855,11 @@ UA_OpenSSL_LoadLocalCertificate(const UA_ByteString *certificate, UA_ByteString X509_free(cert); if (length > 0) { - target->length = (size_t) length; - target->data = derData; + UA_ByteString temp; + temp.length = (size_t) length; + temp.data = derData; + UA_ByteString_copy(&temp, target); + OPENSSL_free(derData); return UA_STATUSCODE_GOOD; } diff --git a/src/opcua/configure.cmake b/src/opcua/configure.cmake index cf54680..1777211 100644 --- a/src/opcua/configure.cmake +++ b/src/opcua/configure.cmake @@ -13,34 +13,12 @@ set_property(CACHE INPUT_open62541 PROPERTY STRINGS undefined no qt system) if (INPUT_open62541 STREQUAL "system") qt_find_package(Open62541 PROVIDED_TARGETS open62541) endif() -qt_find_package(Mbedtls PROVIDED_TARGETS mbedtls) qt_find_package(Uacpp PROVIDED_TARGETS uacpp) find_package(WrapOpenSSL 1.1) # special case end #### Tests -# special case begin -qt_config_compile_test(mbedtls - LABEL "mbedTLS support" - LIBRARIES - mbedtls - CODE -"#include -#include - -int main(int argc, char *argv[]) -{ - mbedtls_pk_context pk; - mbedtls_pk_init( &pk ); - - mbedtls_x509_crt remoteCertificate; - mbedtls_x509_crt_init(&remoteCertificate); - - return 0; -} -") -# special case end # special case begin if (INPUT_open62541 STREQUAL "system") @@ -106,6 +84,11 @@ int main(int /*argc*/, char ** /*argv*/) }") # special case end +# Find out if the system open62541 is built with encryption support +include(CheckSymbolExists) +if (Open62541_FOUND) + check_symbol_exists(UA_ENABLE_ENCRYPTION ${Open62541_INCLUDE_DIRS}/open62541.h OPEN62541_SYSTEM_ENCRYPTION) +endif() #### Features @@ -127,10 +110,12 @@ qt_feature("uacpp" PRIVATE LABEL "Unified Automation C++ SDK" CONDITION TEST_uacpp # special case ) -qt_feature("mbedtls" PRIVATE - LABEL "mbedtls" - CONDITION Mbedtls_FOUND AND TEST_mbedtls # special case -) +# special case begin +#qt_feature("mbedtls" PRIVATE +# LABEL "mbedtls" +# CONDITION Mbedtls_FOUND AND TEST_mbedtls # special case +#) +# special case end qt_feature("ns0idnames" PRIVATE LABEL "Support for namespace 0 NodeId names" PURPOSE "Provides names for the QOpcUa::NodeIds::Namespace0 enum." @@ -145,12 +130,19 @@ qt_feature("gds" PUBLIC PRIVATE PURPOSE "Enables QOpcUaClient to interact with a global discovery server" CONDITION WrapOpenSSL_FOUND # special case ) +# special case begin +qt_feature("open62541-security" PUBLIC PRIVATE + LABEL "Open62541 security support" + PURPOSE "Enables the open62541 plugin to connect to servers with signing and encryption" + CONDITION (WrapOpenSSL_FOUND AND QT_FEATURE_open62541 AND NOT QT_FEATURE_system_open62541) OR OPEN62541_SYSTEM_ENCRYPTION +) +# special case end qt_feature_definition("gds" "QT_NO_GDS" NEGATE VALUE "1") qt_configure_add_summary_section(NAME "Qt Opcua") qt_configure_add_summary_entry(ARGS "open62541") qt_configure_add_summary_entry(ARGS "uacpp") qt_configure_add_summary_entry(ARGS "ns0idnames") qt_configure_add_summary_entry(ARGS "ns0idgenerator") -qt_configure_add_summary_entry(ARGS "mbedtls") +qt_configure_add_summary_entry(ARGS "open62541-security") # special case qt_configure_add_summary_entry(ARGS "gds") qt_configure_end_summary_section() # end of "Qt Opcua" section diff --git a/src/opcua/doc/src/qtopcua.qdoc b/src/opcua/doc/src/qtopcua.qdoc index d8eda07..977d9c9 100644 --- a/src/opcua/doc/src/qtopcua.qdoc +++ b/src/opcua/doc/src/qtopcua.qdoc @@ -399,6 +399,10 @@ The Open62541 plugin is available under the same licenses as Qt OPC UA. The Open62541 library itself is licensed under \l {https://open62541}{Mozilla Public License v2.0}. + The security support is provided by the OpenSSL plugins of the open62541 library. + If the open62541 plugin is built with security support and OpenSSL is not available + on the target system, the open62541 plugin will fail to load. + \section2 UA CPP The UA CPP plugin is available under commercial licenses from \l{The Qt Company}. diff --git a/src/plugins/opcua/open62541/CMakeLists.txt b/src/plugins/opcua/open62541/CMakeLists.txt index 59c4dfc..3e97746 100644 --- a/src/plugins/opcua/open62541/CMakeLists.txt +++ b/src/plugins/opcua/open62541/CMakeLists.txt @@ -40,13 +40,29 @@ qt_extend_target(QOpen62541Plugin CONDITION QT_FEATURE_open62541 AND NOT QT_FEAT ../../../3rdparty/open62541 ) -qt_extend_target(QOpen62541Plugin CONDITION QT_FEATURE_mbedtls AND QT_FEATURE_open62541 AND NOT QT_FEATURE_system_open62541 +# special case begin +#qt_extend_target(QOpen62541Plugin CONDITION QT_FEATURE_mbedtls AND QT_FEATURE_open62541 AND NOT QT_FEATURE_system_open62541 +# DEFINES +# UA_ENABLE_ENCRYPTION +# UA_ENABLE_ENCRYPTION_MBEDTLS +# LIBRARIES +# mbedtls +#) +#special case end + +# special case begin +if (QT_FEATURE_open62541_security AND NOT QT_FEATURE_system_open62541) + find_package(WrapOpenSSL 1.1) +endif() + +qt_extend_target(QOpen62541Plugin CONDITION QT_FEATURE_open62541_security AND WrapOpenSSL_FOUND AND QT_FEATURE_open62541 AND NOT QT_FEATURE_system_open62541 DEFINES UA_ENABLE_ENCRYPTION - UA_ENABLE_ENCRYPTION_MBEDTLS + UA_ENABLE_ENCRYPTION_OPENSSL LIBRARIES - mbedtls + WrapOpenSSL::WrapOpenSSL ) +# special case end qt_extend_target(QOpen62541Plugin CONDITION QT_FEATURE_open62541 AND WIN32 AND MSVC AND NOT QT_FEATURE_system_open62541 # special case PUBLIC_LIBRARIES diff --git a/src/plugins/opcua/open62541/qopen62541node.h b/src/plugins/opcua/open62541/qopen62541node.h index f5e5133..ba96d85 100644 --- a/src/plugins/opcua/open62541/qopen62541node.h +++ b/src/plugins/opcua/open62541/qopen62541node.h @@ -54,7 +54,7 @@ public: bool enableMonitoring(QOpcUa::NodeAttributes attr, const QOpcUaMonitoringParameters &settings) override; bool disableMonitoring(QOpcUa::NodeAttributes attr) override; bool modifyMonitoring(QOpcUa::NodeAttribute attr, QOpcUaMonitoringParameters::Parameter item, const QVariant &value) override; - bool browse(const QOpcUaBrowseRequest &request); + bool browse(const QOpcUaBrowseRequest &request) override; QString nodeId() const override; bool writeAttribute(QOpcUa::NodeAttribute attribute, const QVariant &value, QOpcUa::Types type, const QString &indexRange) override; diff --git a/tests/auto/clientSetupInCpp/CMakeLists.txt b/tests/auto/clientSetupInCpp/CMakeLists.txt index 5fa034e..6a58c4e 100644 --- a/tests/auto/clientSetupInCpp/CMakeLists.txt +++ b/tests/auto/clientSetupInCpp/CMakeLists.txt @@ -27,7 +27,7 @@ qt_add_test(tst_clientSetupInCpp ## Scopes: ##################################################################### -qt_extend_target(tst_clientSetupInCpp CONDITION QT_FEATURE_mbedtls +qt_extend_target(tst_clientSetupInCpp CONDITION QT_FEATURE_open62541_security # special case DEFINES SERVER_SUPPORTS_SECURITY ) diff --git a/tests/auto/declarative/CMakeLists.txt b/tests/auto/declarative/CMakeLists.txt index 40ade46..0818bfb 100644 --- a/tests/auto/declarative/CMakeLists.txt +++ b/tests/auto/declarative/CMakeLists.txt @@ -27,7 +27,7 @@ qt_add_test(tst_opcua ## Scopes: ##################################################################### -qt_extend_target(tst_opcua CONDITION QT_FEATURE_mbedtls +qt_extend_target(tst_opcua CONDITION QT_FEATURE_open62541_security # special case DEFINES SERVER_SUPPORTS_SECURITY ) diff --git a/tests/auto/qopcuaclient/CMakeLists.txt b/tests/auto/qopcuaclient/CMakeLists.txt index 768d4f3..a098ffc 100644 --- a/tests/auto/qopcuaclient/CMakeLists.txt +++ b/tests/auto/qopcuaclient/CMakeLists.txt @@ -31,7 +31,7 @@ qt_add_resource(tst_qopcuaclient "data" ## Scopes: ##################################################################### -qt_extend_target(tst_qopcuaclient CONDITION QT_FEATURE_mbedtls +qt_extend_target(tst_qopcuaclient CONDITION QT_FEATURE_open62541_security AND QT_FEATURE_open62541 # special case DEFINES SERVER_SUPPORTS_SECURITY ) diff --git a/tests/auto/security/pki/trusted/certs/open62541-testserver.der b/tests/auto/security/pki/trusted/certs/open62541-testserver.der index 0bead45..e32d2c3 100644 Binary files a/tests/auto/security/pki/trusted/certs/open62541-testserver.der and b/tests/auto/security/pki/trusted/certs/open62541-testserver.der differ diff --git a/tests/open62541-testserver/CMakeLists.txt b/tests/open62541-testserver/CMakeLists.txt index 61e98bb..c137acb 100644 --- a/tests/open62541-testserver/CMakeLists.txt +++ b/tests/open62541-testserver/CMakeLists.txt @@ -64,13 +64,29 @@ qt_extend_target(open62541-testserver CONDITION QT_FEATURE_open62541 AND NOT QT_ ../../src/3rdparty/open62541 ) -qt_extend_target(open62541-testserver CONDITION QT_FEATURE_mbedtls AND QT_FEATURE_open62541 AND NOT QT_FEATURE_system_open62541 +# special case begin +#qt_extend_target(open62541-testserver CONDITION QT_FEATURE_mbedtls AND QT_FEATURE_open62541 AND NOT QT_FEATURE_system_open62541 +# DEFINES +# UA_ENABLE_ENCRYPTION +# UA_ENABLE_ENCRYPTION_MBEDTLS +# LIBRARIES +# mbedtls +#) +# special case end + +# special case begin +if (QT_FEATURE_open62541_security AND NOT QT_FEATURE_system_open62541) + find_package(WrapOpenSSL 1.1) +endif() + +qt_extend_target(open62541-testserver CONDITION QT_FEATURE_open62541_security AND WrapOpenSSL_FOUND AND QT_FEATURE_open62541 AND NOT QT_FEATURE_system_open62541 DEFINES UA_ENABLE_ENCRYPTION - UA_ENABLE_ENCRYPTION_MBEDTLS + UA_ENABLE_ENCRYPTION_OPENSSL LIBRARIES - mbedtls + WrapOpenSSL::WrapOpenSSL ) +# special case end qt_extend_target(open62541-testserver CONDITION QT_FEATURE_open62541 AND WIN32 AND MSVC AND NOT QT_FEATURE_system_open62541 # special case PUBLIC_LIBRARIES diff --git a/tests/open62541-testserver/pki/own/certs/open62541-testserver.der b/tests/open62541-testserver/pki/own/certs/open62541-testserver.der index 0bead45..e32d2c3 100644 Binary files a/tests/open62541-testserver/pki/own/certs/open62541-testserver.der and b/tests/open62541-testserver/pki/own/certs/open62541-testserver.der differ diff --git a/tests/open62541-testserver/pki/own/private/open62541-testserver.der b/tests/open62541-testserver/pki/own/private/open62541-testserver.der index 4c6f6e2..56fb177 100644 Binary files a/tests/open62541-testserver/pki/own/private/open62541-testserver.der and b/tests/open62541-testserver/pki/own/private/open62541-testserver.der differ diff --git a/tests/open62541-testserver/pki/trusted/certs/opcuaviewer.der b/tests/open62541-testserver/pki/trusted/certs/opcuaviewer.der index ef7ef42..638b3b9 100644 Binary files a/tests/open62541-testserver/pki/trusted/certs/opcuaviewer.der and b/tests/open62541-testserver/pki/trusted/certs/opcuaviewer.der differ -- cgit v1.2.3