Commit Graph

963 Commits

Author SHA1 Message Date
Noel Graf
b30001429d fix(pubsub): Integrate the mqtt-c library as a Git submodule in 1.3 2022-06-14 11:36:55 +02:00
Julius Pfrommer
eef770ba37
Merge pull request #5196 from open62541/1.3
Merge 1.3 to master
2022-06-13 14:28:24 +02:00
Leo-Paul Geneau
40808b0ddb fix(cmake): check if CMAKE_CXX_COMPILER_VERSION is defined 2022-06-12 23:52:15 +02:00
andreasebner
b0f0843104 fix(ci) set correct release number 2022-06-10 15:59:48 +02:00
Noel Graf
02f101df73
feat(server) allow UA_NODESET_DIR to be custom defined. (#5138)
This makes it easier for developers to keep all ua-nodesets XML
definitions in a common location.

Signed-off-by: Björn Esser <b.esser@pengutronix.de>

Co-authored-by: Björn Esser <b.esser@pengutronix.de>
2022-06-07 11:04:03 +02:00
Julius Pfrommer
495174535e refactor(deps): Rename atoi -> parse_num 2022-06-04 12:41:19 +02:00
Julius Pfrommer
c90e2b4a0d refactor(deps): Simplify and rework the cj5 library 2022-06-04 12:41:19 +02:00
Noel Graf
acaa87d1c7 fix(pubsub): Switching the MQTT library to upstream. 2022-05-30 09:09:02 +02:00
Noel Graf
d952f76fa3
refactor(core): remove needless x${VAR} tricks (#5129)
Co-authored-by: Rolf Eike Beer <eb@emlix.com>
2022-05-16 16:03:34 +02:00
arozhkov
e33ccf0f03 fix(cmake): Added the use of the UA_PACK_DEBIAN flag to disable the formation of packages through CPack so that there are no conflicts with another projects. 2022-05-11 14:05:06 +02:00
MartinaFelberFEM
17949178e1
docs(pubsub) add a warning for PubSub monitoring + bufmalloc + fast-path build 2022-05-10 22:26:12 +02:00
andreasebner
b7614c88d5
feat(server) remove namespace LATEST_1_05 flag (#5096) 2022-05-04 15:36:15 +02:00
Noel Graf
dc54a9b988 fix(cmake): UA_ENABLE_MQTT_TLS_OPENSSL flag is automatically set if the UA_ENABLE_MQTT_TLS flag is set. 2022-05-03 19:52:29 +02:00
Julius Pfrommer
09cf7c295b feat(core): Enable the EventLoop UDP support in the default build 2022-04-20 20:35:29 +02:00
Andreas Ebner
2e88fee22d fix(server) adjust regex for latest nodeset flag 2022-04-20 08:48:38 +02:00
Noel Graf
07c2fab194 fix(cmake): UA_ENABLE_MQTT_TLS_OPENSSL flag is automatically set if the UA_ENABLE_MQTT_TLS flag is set. 2022-04-09 09:59:04 +02:00
Julius Pfrommer
be9fbf4f61
Merge pull request #4959 from open62541/1.3
Merge 1.3 to master
2022-03-06 22:04:00 +01:00
Julius Pfrommer
27d52b3371 build(core): JSON encoding is no longer experimental 2022-02-28 08:25:17 +01:00
Noel Graf
cf5ae9e642 fix(nc): Create a Latest Flag which sets the NS0 to the latest Nodeset2.xml version. Fix a bug in the generation of the types.
(cherry picked from commit 3befc2181a)
2022-02-07 23:18:10 +01:00
Julius Pfrommer
759210672b refactor(server): Split event filter into separate file
(cherry picked from commit 482c98760b)
2022-02-06 14:32:20 +01:00
Julius Pfrommer
16247cfaef Merge remote-tracking branch 'origin/1.3' 2022-02-01 21:28:23 +01:00
Noel Graf
3befc2181a fix(nc): Create a Latest Flag which sets the NS0 to the latest Nodeset2.xml version. Fix a bug in the generation of the types. 2022-01-31 16:08:50 +01:00
Julius Pfrommer
172f0528e9 refactor(server): Move server diagnostics into dedicated source file 2022-01-30 00:24:49 +01:00
Julius Pfrommer
802cbb4e2c Merge remote-tracking branch 'origin/1.3' 2022-01-19 12:48:39 +01:00
Julius Pfrommer
85ab83c827 fix(server): Fix building with Subscriptions disabled 2022-01-19 07:01:02 +01:00
Julius Pfrommer
00ce89cbca refactor(server): Disable diagnostics by default
They add >300kb to the binary size due to the large NodeSet
2022-01-19 07:01:02 +01:00
Julius Pfrommer
c9064a43cd
Merge pull request #4891 from open62541/1.3
Merge 1.3 to master
2022-01-06 19:52:04 +01:00
Julius Pfrommer
c6f1abd8cd feat(server): Add UA_ENABLE_DIAGNOSTICS flag and basic support 2022-01-06 07:58:30 +01:00
Julius Pfrommer
0c1cc5aeb2 feat(el): Add InterruptManager API and a POSIX signal implementation 2022-01-03 13:13:39 +01:00
Julius Pfrommer
37679473d0 refactor(el): Switch to epoll for the EventLoop on Linux 2022-01-03 13:13:39 +01:00
Julius Pfrommer
5082bf32e7 refactor(el): The EventLoop contains methods pointers
This allows several EventLoop implementations to be run concurrently.
2022-01-03 13:13:39 +01:00
Julius Pfrommer
482c98760b refactor(server): Split event filter into separate file 2021-12-22 09:59:08 +01:00
Julius Pfrommer
5de6a2e7c3 Revert "Merge branch 'master' into 1.3"
This reverts commit 2f2b9fea7d, reversing
changes made to 271f3dcb01.
2021-12-18 14:34:34 +01:00
Julius Pfrommer
34221e1664
Merge pull request #4849 from open62541/1.3
Merge 1.3 to master
2021-12-14 14:07:39 +01:00
Julius Pfrommer
6b77e5e15e Merge branch '1.2' into merge_12_13_3 2021-12-14 11:38:49 +01:00
Julius Pfrommer
6fd48c2e95 fix(build): Don't use regex to get the install path for includes
The path might contain regex-sensitive character (like '+').
See #4842.
2021-12-14 11:36:24 +01:00
Mark Giraud
506c785bcb
feat(build): Move modules to cmake3.12 (or less) specific directory such that they are not included for newer cmake versions. (#4824)
Newer cmake versions already have these modules packaged and we should use those in favor of possibly outdated ones.
2021-12-07 16:01:28 +01:00
Julius Pfrommer
33d272d519 fix(build): Don't use the check_add macro for the -m32 compiler option 2021-12-01 01:36:51 +01:00
Julius Pfrommer
9c2d61ae66 feat(core): Add EventLoop and POSIX TCP EventSource
Co-authored-by: Jan Hermes <jan@hermes-technology.de>
2021-11-25 16:03:02 +01:00
Julius Pfrommer
9268fc3fc6 refactor(core): Move ua_timer.* to /arch/common 2021-11-25 16:03:02 +01:00
andreasebner
d6f77abdcd
feat(ci) add github action to enable codecov integration and coverage testing (#4767) 2021-11-17 13:18:45 +01:00
Julius Pfrommer
c437223cfd Merge remote-tracking branch 'origin/1.3' into merge_13_master_3 2021-11-12 10:05:18 +01:00
Julius Pfrommer
ef6deabb52 refactor(core): Pull out ZIP_FFS32 from ziptree.h into ziptree.c 2021-11-11 07:45:27 +01:00
kimim
0881e25994 disable PUBSUB_MQTT for WIN32 again 2021-11-05 15:48:38 +01:00
kimim
f415f3116d fix compile error reported in issue #4727 2021-11-05 15:48:38 +01:00
Julius Pfrommer
55d8961c9b
Merge pull request #4750 from open62541/1.3
Merge 1.3 to master
2021-11-05 09:16:20 +01:00
Julius Pfrommer
90bc24291b fix(build): Build amalgamation with multithreading enabled
Co-authored-by: kimim <kimi.im@outlook.com>
2021-11-04 19:33:51 +01:00
Silvio Traversaro
38ff3518b6 Fix handling of UA_FORCE_WERROR CMake option on MSVC 2021-11-04 14:04:51 +01:00
Opcua_Tsn_Team_Kalycito
8be2e79cb4
refactor(build): Modify CMake option for TPM Encryption (#4714)
- Remove mutually exclusive CMake option to support both
   PKCS11 and Keystore

Change-Id: Ib4c89959df29b6d1a2b298fb239e9210767968a0
2021-10-22 17:19:47 +02:00
Opcua_Tsn_Team_Kalycito
b9a8fcbd3b
[REVIEW] Pubsub Encryption using key stored in TPM (#4560)
* feat(pubsub): Add PubSub example to use keys stored in TPM

 - Need to encrypt the AES and HMAC keys using the key stored
   in TPM, before running the PubSub application
 - The PubSub application decrypts the keys available in the
   filesystem using the TPM key

Change-Id: I41c7906675333fa46673dabae1bb6d6d1c3fbecc

* feat(tools): Support to encrypt the key file using TPM key

 - Add cert_encrypt_tpm.c to read the key file present in the
   file system, encrypt it using the key stored in TPM and
   store the encrypted data in different file
 - Delete the original key after creating encrypted key

Change-Id: I9fc77ebf0c76a990c70f4d228950fba09fc39c51

* docs(pubsub): Add README for PubSub TPM keystore application

 - README includes environment setup
 - Steps to generate encryption and signing keys for PubSub
 - Steps to use TPM keys to encrypt the keys in filesystem
 - Build and run Pubsub application
 - Change CMake build flag

Change-Id: I025662bd36ed9f27c7c23b8eda6e2f52cad82021

Co-authored-by: andreasebner <andreas.ebner@iosb.fraunhofer.de>
2021-10-08 14:04:47 +02:00
Divya Prasanth Prabhakaran
379ee51171 feat(ex): Add client server example to use keys stored in TPM
- Encrypt the private key using the key stored in TPM
   and remove the unencrypted private key from the filesystem
 - Used the encrypted key intermittently for software-based
   encryption/decryption

Change-Id: I46fc24102365292d9af6b51c582e3a3f74b2af5e
2021-10-02 12:23:09 +02:00
Julius Pfrommer
c4ff4bac48 refactor(build): Enable Event-support by default; Mark some options advanced 2021-09-26 17:02:53 +02:00
Divya Prasanth Prabhakaran
b984eecc53 fix(build): Modify TPM security build option
Change-Id: Ibeeea2ad3bd47d7b88738bb4b0177647d3b1d2b5
2021-09-21 17:21:58 +02:00
Opcua_Tsn_Team_Kalycito
8a3386a1cd
[REVIEW] PubSub hardware encryption and decryption using pkcs11 (#4435) 2021-08-27 12:51:34 +02:00
Julius Pfrommer
aafec2429c fix(build) Correctly test for multithreading in test builds 2021-08-25 00:01:32 +02:00
Julius Pfrommer
0d69be31e8 fix(build): Remove a warning for the old UA_MULTITHREADING config 2021-08-25 00:01:32 +02:00
Julius Pfrommer
4d3422524c refactor(core): Don't generate headers with internal encoding functions 2021-08-16 10:21:51 +02:00
Julius Pfrommer
cda865a901 fix(tests): Add MQTT plugin to build dependencies 2021-08-16 10:21:51 +02:00
Christian von Arnim
bdb94e177e feat(sec): Add UA_CreateCertificate
Implementation for OpenSSL and LibreSSL

Co-authored-by: Julius Pfrommer <julius.pfrommer@web.de>
2021-08-09 16:38:57 +02:00
Fabrice Fontaine
5edb3a0283
feat(build): add UA_FORCE_WERROR to CMakeLists.txt
Allow the user to disable -Werror to avoid the following build failures:

/tmp/instance-0/output-1/build/open62541-v1.2.2/arch/network_tcp.c: In function 'connection_recv':
/tmp/instance-0/output-1/build/open62541-v1.2.2/arch/network_tcp.c:96:5: error: conversion to 'unsigned int' from 'int' may change the sign of the result [-Werror=sign-conversion]
   96 |     UA_fd_set(connection->sockfd, &fdset);
      |     ^~~~~~~~~

/tmp/instance-6/output-1/build/open62541-v1.2.2/plugins/ua_pubsub_udp.c: In function 'UA_PubSubChannelUDPMC_receive':
/tmp/instance-6/output-1/build/open62541-v1.2.2/plugins/ua_pubsub_udp.c:477:21: error: conversion to '__suseconds_t' {aka 'int'} from 'UA_UInt32' {aka 'unsigned int'} may change the sign of the result [-Werror=sign-conversion]
  477 |     tmptv.tv_usec = (long int)(timeout % 1000000);
      |                     ^

Fixes:
 - http://autobuild.buildroot.org/results/911811de81d8abb2a31feb8f27af1592641c6fbc
 - http://autobuild.buildroot.org/results/f0187b3f2d62e955fddeef4e90f84ba4fd642bd2

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-08-02 14:29:26 +02:00
Julius Pfrommer
2aa1790de6 refactor(pubsub): Split out ua_pubsub_writergroup.c 2021-07-30 18:41:50 +02:00
Julius Pfrommer
7afa3c30ca refactor(pubsub): Split out ua_pubsub_readergroup.c 2021-07-30 18:41:50 +02:00
Mark Giraud
4d4e206ef5 refactor: use newer FinPython3 package in order to allow finding python versions installed with pyenv 2021-07-21 16:53:02 +02:00
Julius Pfrommer
e1f8fd3b18 fix(build): Fix building for oss-fuzz 2021-07-17 18:39:29 +02:00
Julius Pfrommer
9bed4cd765 refactor(build) Simplify setting the -m32 flag for 32bit builds 2021-07-17 18:39:29 +02:00
Julius Pfrommer
c1d763f92e feat(tools): Add "ua" shell tool for interacting with OPC UA servers
Only the getendpoints and read service are implemented at this time.
2021-07-16 08:59:33 +02:00
Christian von Arnim
fe9f995568 feat(plugin): Add LibreSSL encryption 2021-07-14 09:20:29 +02:00
Christian von Arnim
a1c5252cb4 Fix(plugin): Openssl versions less than 1.1
Extract version specific code to ua_openssl_version_abstraction.h
2021-07-09 13:28:59 +02:00
Christian von Arnim
b82ad4df1b build(plugin): Simplify encryption to single parameter.
Possible options for UA_ENABLE_ENCRYPTION are OFF, MBEDTLS, OPENSSL
2021-07-08 13:23:07 +02:00
Julius Pfrommer
6dc9b111a3 style(build): Improve comments in CMakeLists.txt 2021-07-02 09:34:37 +02:00
Julius Pfrommer
75548afac3 fix(build): Generate position-independent code for shared libraries 2021-07-02 09:34:37 +02:00
Julius Pfrommer
1223370659 refactor(ci): Simplify version number handling 2021-07-02 09:34:37 +02:00
Mark Giraud
d803a741bd refactor(pubsub): Fix check macros and slightly clean up branches by using switch case 2021-07-01 16:41:00 +02:00
Julius Pfrommer
deabb8b14f refactor(build): Move open62541.pc.in to /tools 2021-06-04 20:37:19 +02:00
Julius Pfrommer
c17de58e4b fix(build): Enable PubSub encryption only (no client/server) 2021-06-04 15:13:35 +02:00
Julius Pfrommer
656021576e fix(ci): Fix building the fuzzing tests for oss-fuzz 2021-05-27 08:51:10 +02:00
JanSurft
4cfd79c905
feat(pubsub): decryption (#4418)
* test(pubsub): disable false-negative test

The "Test_many_components" is failing under specific circumstances,
disable it until it is fixed (correctly set the publisher-ids,
writergroup-ids, datasetwriter-ids).

* feat(pubsub): decryption

Adding the possibility to verify and decrypt pubsub networkmessages.

* test(pubsub): add decryption test

* feat(pubsub): subscriber encryption example

* test(pubsub): integration-test pubsub encrypted
2021-05-21 19:01:23 +02:00
Jan Hermes
47afdab8c1 feat(plugin): aes256 encryption
Adds support for aes256 encryption in pubsub.
2021-05-21 11:20:42 +02:00
JanSurft
d7bbf512c7
fix(build): remove testing source from build script (#4420)
Testing source-file testing_networklayers.c breaks
build when UA_DEBUG_DUMP_PKGS is enabled because
of missing dependencies (e.g. testing_lock) which are
only build for the testing-build.
2021-05-20 12:21:40 +02:00
Jan Hermes
f46aec5092 build: fix typo in build-scrypt 2021-05-19 13:30:46 +02:00
Jan Hermes
f8347409b8 refactor(core): add check macros
The macros provide a way for cleaner error handling of
return codes (e.g. UA_StatusCode) and append additional
information to logging messages.

Adding file and line numbers to logging messages can be
activated and deactivted via CMake flag.
UA_DEBUG_FILE_LINE_INFO
2021-05-14 15:44:27 +02:00
basyskom-jvoe
8c31fd4dd6
feat(pubsub): Add TLS support for PubSub via MQTT (#3637)
* Add TLS support for MQTT

- OpenSSL only for now
- New connection options mqttUseTLS, mqttCertPath and mqttCaPath

* Add UA_ENABLE_MQTT_TLS option to CMakeLists.txt

* Add client certificate support for MQTT TLS

* Add fallback to DER for client certificate and key

* Use default path if neither mqttCertPath nor mqttCaPath are specified

* Rename mqttCertPath to mqttCaFilePath

* Extend MQTT PubSub example with TLS support

* Fix possible memory leak for mqtt client certificate and private key

* Fix UA_PubSubChannelDataMQTT initialization

* Handle SSL_WANT_READ on connect
2021-04-28 15:37:26 +02:00
Julius Pfrommer
fbc3a4c184 refactor(build): Make PubSub a non-advanced build option 2021-04-17 09:28:39 +02:00
Julius Pfrommer
507113bb4c fix(build): Fix the amalagamation build 2021-04-06 22:24:51 +02:00
Holger Zipper
529aceba51 feat(plugin): Add PubSub-Aes128-CTR encryption plugin 2021-04-05 22:18:58 +02:00
Julius Pfrommer
5ab671ce19 feat(pubsub): Add UA_ENABLE_PUBSUB_ENCRYPTION configuration option 2021-04-05 22:18:58 +02:00
Martina Felber
2285bd00a8 perf(pubsub): Usage of memory pool
Provide a build option to use a static memory buffer instead of
allocations on heap for time critical PubSub parts.
2021-04-03 21:43:02 +02:00
Julius Pfrommer
0d03a87833 refactor(core): Cleanup unused multithreading level 2021-03-30 18:34:24 +02:00
Julius Pfrommer
fa5ed7a4ef Merge branch '1.2' 2021-03-10 22:51:53 +01:00
Julius Pfrommer
ce4b5b513f Merge branch '1.1' into 1.2 2021-03-06 13:40:39 +01:00
Julius Pfrommer
0ad22ad7c5 fix(build): Remove compiler flag that breaks fuzz build
The flag fsanitize-coverage=trace-pc-guard,trace-cmp is no longer needed
for fuzzing and actually breaks the fuzz build now.
2021-03-06 09:04:41 +01:00
Suriya Narayanan Parthasarathi Vimala
0d4ca033a3 refactor(pubsub): Handling of XDP in ethernet.c plugin file
- Added XDP functionalities in ethernet.c
 - New connection config param(enableXdpSocket) to handle XDP

Change-Id: I37eda84d28a474e4c10cd163bf4395f2edd80fa6
2021-02-26 13:03:04 +01:00
Selva Suba Jenifer Joseph
a0806edd3b refactor(pubsub): Update XDP to 5.4 and above kernel
- Static library usage of bpf removed
 - XDP APIs modified with respect to new kernel of 5.4
 - TODO: c99 support

Change-Id: I16cb2092fa9c0385c8f6f6692d6938b4c7d5d9ca
2021-02-26 13:03:04 +01:00
Julius Pfrommer
bdb233e810 refactor(server): Remove the UA_ENABLE_MICRO_EMB_DEV_PROFILE option 2021-02-24 19:48:34 +01:00
Fabrice Fontaine
df0fdefa96 CMakeLists.txt: fix build without C++
This will fix the following build failure:

CMake Error at CMakeLists.txt:2 (project):
  The CMAKE_CXX_COMPILER:

    /srv/storage/autobuild/run/instance-3/output-1/host/bin/arm-linux-g++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

Fixes:
 - http://autobuild.buildroot.org/results/86ca6a5a01ecfc7030c6be0da81924436b41d057

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-01-14 14:46:41 +01:00
Julius Pfrommer
2809e7fc18
Merge pull request #4103 from open62541/1.2
Merge 1.2 -> master
2021-01-04 14:04:02 +01:00
Christian von Arnim
787b3d288f Fix: Build shared library with discovery multicast 2020-12-23 23:31:24 +01:00
Julius Pfrommer
c6d336e5f7 Merge remote-tracking branch 'origin/1.2' into merge_12_master_3 2020-12-19 12:32:05 +01:00
Julius Pfrommer
010ba7811f feat(core): Add reusable AA-tree implementation 2020-12-19 05:53:53 +01:00
Suriya Narayanan Parthasarathi Vimala
54bb4159b1 refactor(pubsub): Remove usage of separate ETF plugins
- Used connectionProperties for additional socket options of ETF

Change-Id: I9d21cebe82322a0034de49b8c6f6566e43ea8292
2020-12-11 13:21:57 +01:00
andreasebner
713e769ac6
Merge pull request #3616 from MartinaFelberFEM/pubsub_cb_design
[REVIEW] PubSub: Subscriber MessageReceiveTimeout
2020-12-01 11:05:18 +01:00
ccvca
f988696f15
fix(build): Check install directory for deps with full path (#4033) 2020-12-01 10:36:17 +01:00
Martina Felber
fd1a1bad89 feat(pubsub): monitoring (example DataSetReader MessageReceiveTimeout)
Added an optional feature to provide a general PubSub monitoring/timeout
handling backend. Build option UA_ENABLE_PUBSUB_MONITORING

The monitoring backend uses the server callback implementation per default.
An application can provide it's own monitoring/timer backend by setting the
monitoring callbacks in the server configuration.

The MessageReceiveTimeout handling of DataSetReaders is provided as an
monitoring example.
The timeout check starts after the DataSetReader has received the first message.
If there is no new message within the configured MessageReceiveTimeout the
DataSetReader state changes to error. An application can get a notification
about this timeout by providing a pubSubStateChangeCallback, which can be
configured at the server configuration.
When the DataSetReader receives a new message again, the state changes back to
operational.
2020-11-30 09:07:41 +01:00
Julius Pfrommer
11a872a39c fix(build): Fix using mbedtls with amalgamated build 2020-11-26 02:06:52 +01:00
Julius Pfrommer
5b7a3a14c3 Merge remote-tracking branch 'origin/1.1' into master 2020-11-15 23:18:48 +01:00
Julius Pfrommer
25c8c6a0bf Merge remote-tracking branch 'origin/1.0' into 1.1 2020-11-15 18:27:34 +01:00
Silvio Traversaro
b34cde0fd5
fix(build): Ensure that open62541_NODESET_DIR is used consistently (#4008) 2020-11-15 17:57:56 +01:00
Julius Pfrommer
17bfb463fd feat(build): Warn if Events are activated with the minimal ns0 2020-11-07 15:25:52 +01:00
basyskom-jvoe
bdae55012d
fix(core): PEM certificate handling for SecurityPolicy None (#3976)
If UA_ENABLE_ENCRYPTION_MBEDTLS is set, SecurityPolicy None will still
just copy the certificate data. If the input is PEM, the trailing null
byte is not added and mbedTLS will fail to parse the data.
This breaks the application URI check on server start.

In case of UA_ENABLE_ENCRYPTION_OPENSSL, there is a similar problem
if the PEM data is just copied into the local certificate byte string.
2020-10-28 15:48:07 +01:00
Suriya Narayanan Parthasarathi Vimala
7f360c5a9e refactor(pubsub): Support WG and RG NodeId for the custom callbacks
- Extra argument of WG and RG nodeId in add custom callback
 - Update the documentation
 - Support to remove callback in TSN examples

Change-Id: I611db8e5fdddaf704eee9491627cea137ef927d8
2020-10-23 21:34:26 +02:00
Julius Pfrommer
7e6c6c97f6 refactor(pubsub): Sane include order for PubSub definitions
The plugin header is freestanding. The server_pubsub.h adds definitions
on top of server.h.
2020-10-22 14:38:05 +02:00
Julius Pfrommer
7d6d676dc0 refactor(core): Use UA_Timer as the workqueue
The feature of internal worker threads is unusable at this time.
UA_Timer is an easier to understand replacement of the workqueue.

Delayed memory reclamation is still important.  For example when we
remove a session in the context of that session.
2020-10-18 15:21:40 +02:00
Julius Pfrommer
48ce6f3b02 refactor(core): ua_types_prettyprint.c -> ua_types_print.c 2020-10-11 18:11:31 +02:00
Julius Pfrommer
0be4d364fb feat(core): Add UA_print for pretty-printing datatypes
Most builtin datatypes are already supported.
2020-10-08 11:34:48 +02:00
Frank Meerkötter
b3d2afbca7
feat(build): Allow to disable IPO on the commandline (#3935)
Only check for (and potentially enable) IPO if the variable has
not been set yet. This allows to disable IPO on the commandline.

Reasoning: a consumer of the open62541 static library might decide
to not enable IPO. Currently open62541 is, via the requirement
that all objects files are IPO, forcing the consumer to also enable
IPO.
2020-10-08 10:50:46 +02:00
Frank Meerkötter
6e3a9cea86
refactor(build): Add a better description of these two features (#3946) 2020-10-08 10:35:40 +02:00
Julius Pfrommer
f11d23fc48 Update submodule dependency on libmdnsd 2020-10-03 23:29:33 +02:00
Julius Pfrommer
0db99235b0 refactor(core): Remove freestanding musl dependencies
We no longer target embedded architectures that do not even have a libc
implementation.
2020-10-03 10:50:36 +02:00
Christian von Arnim
0e8332fa8e Fix: check_server_userspace to work with 1.4.7 2020-09-21 11:04:34 +02:00
Fischer-Thomas
03a655667e
feat(pubsub): pubsub configuration from binary file (#3806) 2020-09-01 09:29:37 +02:00
basyskom-jvoe
c3f64e8e25
refactor(core): Always include the encryption plugins into the amalgamated files (#3838)
Currently, UA_ENABLE_ENCRYPTION_* must be activated to have the encryption plugins
included into the amalgamation files.

With this change, all encryption plugin files require guards to make sure they are
only built if the defines are set from outside at build time.
2020-08-14 12:00:44 +02:00
Mark Giraud
6b7e32fa05 feature: prepare open62541 for fuzzing with llvm 10 and above 2020-07-30 19:19:26 +02:00
Julius Pfrommer
37876370c1 refactor(tools): Simplify parsing the type definitions 2020-07-30 15:01:25 +02:00
Julius Pfrommer
0b01390536 fix(server): Use immutable nodes only when multicore >= 200 2020-07-07 17:06:25 +02:00
Julius Pfrommer
86726382d3 fix(core): Give chmod 644 to source files 2020-07-03 23:26:23 +02:00
Julius Pfrommer
921a182f1a refactor(plugins): Split pki_default into _none and _mbedtls 2020-07-03 23:26:23 +02:00
Julius Pfrommer
75a06f6378 refactor(plugins): Move mbedtls SecurityPolicies to a dedicated folder 2020-07-03 23:26:23 +02:00
Julius Pfrommer
8033f1596d refactor(server): Fold server_config.h into server.h 2020-07-03 23:26:23 +02:00
Julius Pfrommer
7460e8ebec refactor(client): Fold client_config.h into client.h 2020-07-03 23:26:23 +02:00
anzeskerjanc
9ca54d3830 build: add missing include dir for websocket 2020-07-01 19:25:40 +02:00
Julius Pfrommer
7d1d21a88c refactor(core): Simplify the malloc singleton option 2020-07-01 10:21:17 +02:00
andreasebner
0e520fe20f
feat(core/pubsub) External Data Source and Information model RT variables (#3739)
Extended/refactor the node value source structure to the new data source value backend concept, added the sceleton for a PubSub RT example with information model related nodes
2020-06-30 16:41:23 +02:00
Christian von Arnim
cedb4527b4 Search for MbedTLS when using CMake module 2020-06-17 09:30:22 +02:00
John
211f1be504
feat(core): Implement Aes128Sha256RsaOaep security policy 2020-06-16 00:31:32 +02:00
Stefan Profanter
3f54fc47f2
Merge remote-tracking branch 'upstream/1.1' into master
# Conflicts:
#	tools/azure-devops/win/install.ps1
2020-06-14 11:38:03 +02:00
Julius Pfrommer
ecbc93731d fix(plugin): Make OpenSSL SecurityPolicies work in amalgamated build 2020-06-12 10:50:34 +02:00
Julius Pfrommer
694ecf9191 refactor(build): Disable LDS per default 2020-06-08 20:23:59 +02:00
Stefan Profanter
632306622c fix(cmake): Disable hardening build on MingW (causes compilation to fail) 2020-06-08 12:03:12 +02:00
Julius Pfrommer
a11afcafb7 feat(plugin): Add a syslog logger plugin 2020-06-07 18:20:31 +02:00
Julius Pfrommer
a815f8ea2d Merge branch '1.1' 2020-05-31 16:14:28 +02:00
Julius Pfrommer
9d2504b989 refactor(build): Cosmetic fixes in CMakeLists.txt 2020-05-31 13:19:17 +02:00
Alexander Bluhm
fa043bf712 build: compile on OpenBSD
If OpenBSD CLang 8.0.1 is called with -mcet and -fcf-protection,
the resulting test binaries fail to execute.  Disable these options
on OpenBSD.
2020-05-30 10:20:48 +02:00
Selva Suba Jenifer Joseph
5d051fdbf9 feat(PubSub) XDP functionality with ETH over UADP
- New transport settings added for XDP functionality
 - Moved both XDP config and xdpsocket to plugins
 - Default values for defines in plugin

Change-Id: Ibd7760c9abab45c6f37ae324fec6dabc853cf797
2020-04-07 17:04:18 +02:00
Julius Pfrommer
14c69ad679 feat(core): Parsing of human-readable format for Guid and NodeId 2020-03-12 11:29:21 +01:00
Bin Lan
f71912485e add security policy Basic256Sha256 and PKI support with OpenSSL provider. 2020-03-12 07:43:27 +01:00
Suriya Narayanan Parthasarathi Vimala
06b1ddb8f5 refactor(PubSub): Design modification considering ETF transport settings
- New transport file created ua_pubsub_ethernet.c
 - Modification are removed in ethernet and udp .c files
 - New transport settings added for ETF functionality

Change-Id: Id11b1a06f67a8f96cd8713415f6b8472fae0b532
2020-03-06 14:06:21 +01:00
Suriya Narayanan Parthasarathi Vimala
7955eb503a refactor(PubSub): Thread based custom manager implementation
- Thread creation has been integrated with addRepeatedCallback
 - Introduction of RT Fixed offsets
 - Change from Datetime nodes to UInt64 nodes(for RT)

Change-Id: I361a1027dfe633e9b36d25bb74dad6d3a5774e01
2020-03-06 14:06:21 +01:00
Vidhya Duraisamy
77594938a3 feat(PubSub):Time triggered multithreaded application with ETF
- Run time triggered PubSub application using ETF at a publishing interval
   of 250 microseconds with qbv offset of 25us
 - Integrate time triggered functionality and publish
   OPCUA PubSub packets at calculated transmission time
 - Handle PubSub application for UDP and Ethernet over UADP
 - Implement Publisher and Subscriber as threads and handle
   in same core
 - Integrate target variable implementation in Subscriber thread
 - TODO: Write unit test cases to ensure no memory leaks are possible

Change-Id: I50982a32e126de82f4adb5e07b1ec626c0527f26
2020-03-06 14:06:21 +01:00
Julius Pfrommer
d1256c475e refactor(client): Remove file ua_client_worker.c 2020-03-03 20:37:11 +01:00
Julius Pfrommer
0b71406bce refactor(client): Move ua_client_connect_async.c -> ../src/client/ua_client_connect.c 2020-03-03 06:33:30 +01:00
Julius Pfrommer
66d9707e5b refactor(client): Remove old synchronous client connection 2020-03-03 06:33:30 +01:00
Piotr Nikiel
25b9248a45 fix order of files to amalgamate, before amalgamation would conflict with multithreading now it works 2020-02-27 20:20:12 +01:00
Julius Pfrommer
da7eebebe2 build(core): Rename UA_COMPILE_AS_CXX to UA_FORCE_CPP
For consistent naming of flags that force compiler settings.
2020-02-17 22:26:03 +01:00
Julius Pfrommer
99f1784ea4 build(core): Add CMake option UA_FORCE_32BIT 2020-02-17 22:26:03 +01:00
Julius Pfrommer
3c8157b01a refactor(server): Fold the SecureChannelManager into the Server 2020-02-02 20:05:04 +01:00
Julius Pfrommer
0e3792448e refactor(server): Move ua_securechannel_manager.c functions to ua_services_securechannel.c 2020-02-02 20:05:04 +01:00
Julius Pfrommer
371ac9e0bb refactor(core): Rename include/open62541/constants.h -> include/open62541/common.h 2020-02-02 13:17:52 +01:00
Julius Pfrommer
017ee76609 refactor(server): Fold SessionManager into Session Service-Set 2020-01-26 12:39:37 +01:00
Julius Pfrommer
c461a7fb24 fix(tests): Open custom SecureChannel for fuzz message dumping 2020-01-25 19:33:26 +01:00
damijans
3b767a8dd6 allow running multithreading related test when UA_MULTITHREADING is greater then 100 (#3371)
* multithreading related unit tests are not limited to UA_MULTITHREADING level 100

* fix: replaced tabs with spaces
2020-01-16 10:22:22 +01:00
Emerson de Freitas Barcelos
39447ed95c MSYS2/MinGW build fixes (#3347)
* MSYS2/MinGW build fixes

* RUNTIME DESTINATION changed as suggested
2020-01-11 22:07:06 +01:00
Julius Pfrommer
4c3cafccc6 refactor(core): Split off ua_securechannel_crypto.c 2020-01-06 09:27:53 +01:00
Sameer AL-Qadasi
ff87c2876d (feat): First Implementation of Alarms and Conditions (#2083)
* Update src/server/ua_subscription_events.c

* Alarms and Conditions First Implementation

implemented facets:
1- A&C Base Condition Server Facet (only mandatory)
2- A&C Enable Server Facet (only mandatory)
3- A&C Alarm Server Facet (only mandatory)
4- A&C Acknowledgeable Alarm Server Facet (complete, with ConfirmedState and Confirm Method)

Notes:
1) Change in ua_subscriptions_monitoreditem.c is related to issue #2114. Without that fix, the server crashes when generating OverflowEvents.

2) The Events: RefreshStart and RefreshEnd are abstract according to the specification. So to make it possible to create instances of them the fix in function "create_event()" is added (change abstract attribute of the EventType to false).

@basysKom-jvoe, I will be glad if you help reviewing the code:)

* some fixes

Update src/server/ua_subscription_alarms_conditions.c

* correcting example name

adding function prototype

* some fixes

1) keep events and A&C disabled and NS0 reduced in main CMakeLists
2) enable A&C in test scripts (Travis and Veyor)

* Update ua_subscription_alarms_conditions.c

fix som error handling

* Update ua_subscription_alarms_conditions.c

* fixing issues from first review

1) calculate size of array
2) correct misspelling
3) correct some comments

* Update ua_subscription_alarms_conditions.c

to retrigger travis test.
14 - subscription_events test fails randomly!

* fix memory leak issues

the function UA_NodeId_copy was used multiple times, however,  the memory allocated is not freed because only numeric NodeIds were used in testing. So using nun numeric NodeIds will cause memory leak.
Next commit/version should fix that issue.

* review fixes: comments 1 and 2

1) use new server logger function (PR rebase).
2) use values instead of pointers in A&C API functions for consistency

* Review: reduce indent

reducing indent by using "continue" inside if statements in loops

* Update tutorial_server_alarms_conditions.c

modify includes

* update to upstream master and fix some A&C Module issues

* fix CI test and some review issues

* fix some review issues

the previous commits fix issues mentioned in comments:
- https://github.com/open62541/open62541/pull/2083#discussion_r241070233
- https://github.com/open62541/open62541/pull/2083#discussion_r241072127
- https://github.com/open62541/open62541/pull/2083#discussion_r241076137
- https://github.com/open62541/open62541/pull/2083#discussion_r241076137
- https://github.com/open62541/open62541/pull/2083#discussion_r241079915
- https://github.com/open62541/open62541/pull/2083#discussion_r241082415
- https://github.com/open62541/open62541/pull/2083#discussion_r241083539
- https://github.com/open62541/open62541/pull/2083#discussion_r284586642
- https://github.com/open62541/open62541/pull/2083#discussion_r284587406
- https://github.com/open62541/open62541/pull/2083#discussion_r284589129

not resolved yet, need further discussion:
- https://github.com/open62541/open62541/pull/2083#discussion_r241072659
- https://github.com/open62541/open62541/pull/2083#discussion_r241075205

* some modification after rebase

* remove unused code + some fixes

* some fixes and modifications

changes:
- fix conflicting variable names
- pass FieldNames directly without help variable in
  "UA_Server_setConditionField"
- remove unused code
- add some comments
- correct indentation

* fix issues mentioned in review

* enable setting ConditionId when creating Condition Instances

* fix issues based on review

- pass variant instead of void* and type when setting Condition Fields and their Properties.

- Change RefreshEvents IsAbstract attribute to "False" when creating the Condition instead of doing that when generating the event.

- comment issue #2114 fix out (it seems to work fine after recent commits).

- modify A&C example according to changes.

* use A&C public API to set condition fields and properties

* check for Null pointer before comparing NodeIds

Co-Authored-By: andr <aandranikk@gmail.com>

* correct Typo

Co-Authored-By: andr <aandranikk@gmail.com>

* rebase + fix issues from review

some issues need further discussion before fixing them. Please see:
https://github.com/open62541/open62541/pull/2083#discussion_r326857289
https://github.com/open62541/open62541/pull/2083#discussion_r326857373

* fixup after rebase
2019-12-17 20:28:40 +01:00
Julius Pfrommer
91f6a20c63 Merge branch '1.0' 2019-12-16 21:09:21 +01:00
Andreas Ebner
4b52b9e49b feat(pubsub) extended pubsub fastpath with fixed offsets and static value source, memory fixes, added support for sequence number, added an direct pointer from DSW to the PDS to avoid lookup -> PTR will be updated during each PDS add/remove 2019-11-22 15:00:59 +01:00
Andreas Ebner
e5fbae7609 feat(pubsub) extended encoding layer with buffered message handling 2019-11-22 15:00:59 +01:00
Stefan Profanter
f68e134460 feat(ns): Add possibility to blacklist nodes from nodeset generator
Blacklisting nodes is now possible through a special blacklist file.
If a node is blacklisted, the node itself and all references to that node are deleted.

Example blacklist file content for blacklisting specific node ids

(lines starting with `#` are comments/deactivated)

```text
i=79
i=83
i=94
#i=95
#i=96
i=97
i=98
i=99

ns=http://opcfoundation.org/UA/DI/;i=6555
ns=http://opcfoundation.org/UA/DI/;i=6564
#ns=http://opcfoundation.org/UA/DI/;i=15031
#ns=http://opcfoundation.org/UA/DI/;i=15032
```
2019-11-22 13:10:16 +01:00
Stefan Profanter
fd8d593abd fix(cmake): Correctly remove architecture flags from CMAKE_C_FLAGS 2019-11-15 15:27:37 +01:00
Julius Pfrommer
3dce9f5ed5 refactor(server): Simplify the async operations intenally
The server config is simplified a bit. A single timeout is used for the
request. No changes to the public API otherwise.

Full integration tests for the async operations.
2019-11-10 16:50:18 +01:00
Stefan Profanter
addf2adfae fix(ns): Rename Minimal.xml to Reduced.xml to match CMake options
See also #3232
2019-11-08 20:08:09 +01:00
Julius Pfrommer
b0b902cbde feature(core): Make multithreading a non-experimental feature 2019-11-04 11:14:51 +01:00
Julius Pfrommer
e19d6f7e2d feat(build): Make UA_ENABLE_DA a visible build option 2019-11-04 11:14:51 +01:00
Nik625
9bcc632cde feature(server): Add reduced NodeSet for DataAccess support 2019-11-04 11:14:51 +01:00
Julius Pfrommer
c04429b824 fix(build): Fix use of check_c_compiler_flag and avoid add_definitions 2019-10-30 14:07:57 +01:00
Julius Pfrommer
35f2ca4116 refactor(server): Remove server/ua_server_methodqueue.h
Moves the queue elements to the AsyncOperationManager
2019-10-28 11:48:43 +01:00
Julius Pfrommer
8e5acfe8f4 refactor(server): Regroup async server methods in ua_server_async.c 2019-10-28 11:48:43 +01:00
Julius Pfrommer
c4cde43deb refactor(server): Rename UA_AsyncMethodManager to UA_AsyncOperationManager 2019-10-28 11:48:43 +01:00
Julius Pfrommer
d8ce2f9c14 refactor(server): Rename ua_asyncmethod_manager.c -> ua_server_async.c 2019-10-28 11:48:43 +01:00
Joachim Rahn
d05677afae build(core): Add static library to dev package 2019-10-26 09:30:26 +02:00
jrcoding
39be483320 feat(debian): add PDF and HTML docs including examples 2019-10-25 16:04:03 +02:00
Stefan Profanter
72d2dab1f2 ci: Add separate open62541-code-generation target required for freeRTOS and other builds 2019-10-24 20:28:14 +02:00
Julius Pfrommer
e97abd591a fix(core): Install dependencies to /include instead of /include/open62541 2019-10-21 17:09:53 +02:00
Julius Pfrommer
7cad87fa7c feature(plugin): Recover the old hash-map based Nodestore 2019-10-21 17:09:53 +02:00
Julius Pfrommer
ddd0fbfcfd refactor(server): Restore the NodeStore as a true plugin 2019-10-21 17:09:53 +02:00
Julius Pfrommer
10d0c89995 build(core): Make coverage generation an advanced option 2019-10-15 08:50:34 +02:00
Julius Pfrommer
288e6703e2 build(core): Make query an advanced option 2019-10-15 08:50:34 +02:00
Julius Pfrommer
6574a46bd1 build(core): Make static analysis an advanced CMake option 2019-10-15 08:50:34 +02:00
Julius Pfrommer
7019dadc3d build(core): Make historizing an advanced feature 2019-10-15 08:50:34 +02:00
Nikhil Vannan Krishnan
11c0679187 fix(pubsub): Fix Travis and Appveyor build 2019-10-10 07:08:13 +02:00
Lukas M
7ff1fe598f feat(pubsub): Add MQTT support
- Rebase to Master branch
 - Modify Server APIs un tutorial_pubsub_mqtt.c
 - TODO:Resolve unit test error in check_pubsub_connection_mqtt.c
2019-10-10 07:08:13 +02:00
Julius Pfrommer
abae79b2f7 refactor(pubsub): Split pubsub core into reader and writer 2019-09-23 00:51:56 +02:00
Julius Pfrommer
acbac3ee0b Merge branch '1.0' 2019-09-15 13:23:15 +02:00
Julius Pfrommer
ef93d2d801 fix(server): Fix O(n^2) runtime for adding many references 2019-09-15 13:21:56 +02:00
Klaus Schick
cc94b6aa0f Server: Asynchronous Operations API / Implementation for methods 2019-09-12 15:20:01 +02:00
Stefan Profanter
01fae7b5b4
Merge remote-tracking branch '1.0' into master 2019-09-02 14:34:18 +02:00
Stefan Profanter
2acca0e61b fix: CMake only enable FORTIFY_SOURCE=2 if UA_ENABLE_HARDENING=ON 2019-08-30 21:27:29 +02:00
Stefan Profanter
a853430813 fix(cmake): Only set sanitizer clang flags on unix system 2019-08-30 15:48:44 +02:00
Ubuntu
2b3a8cbc91 feat(server): Adding multithreading architecture with additional refactoring 2019-08-19 23:36:03 +02:00
matkonnerth
777eb9339d Server: Read Datatype Definitions of Structures 2019-08-15 18:05:42 +02:00
Stefan Profanter
bfdb9953dd
Merge remote-tracking branch 'upstream/1.0' into master 2019-08-14 18:17:47 +02:00