Commit Graph
60 Commits
Author SHA1 Message Date
Julius Pfrommer 6b64ca3519 feat(tests): Add a ConnectionManager that can replay PCAP network dumps 2025-02-19 11:27:27 +01:00
Marwin Glaser f18bf16e2a feat(ci): run valgrind checks on ubuntu-24.04 (current latest) only 2025-02-19 08:20:02 +01:00
Marwin Glaser 1c4503bade refactor(ci): generate a coverage report for all linux gcc builds 2025-02-03 22:31:19 +01:00
V-Strassheim f160a26b40 feat(test): Add multicast examples to valgrind build tests (#7075)
There are no tests for the multicast examples in CI. This can lead to
unintended regressions.
Add both variants of the multicast example to already existent valgrind build
tests.

Signed-off-by: Vasilij Strassheim <vasilij.strassheim@linutronix.de>
2025-02-03 19:52:31 +01:00
Marwin Glaser 6be6e24866 refactor(ci): conditionally skip checkout action as well in build_linux 2025-01-21 12:29:35 +01:00
Marwin Glaser ad5b0a8401 refactor(ci): consistently use white space in build_linux 2025-01-21 12:29:35 +01:00
Marwin Glaser e282f2a8ca refactor(ci): consistently indent build_linux 2025-01-21 12:29:35 +01:00
Marwin Glaser c2bc99a8a0 refactor(ci): don't specify empty cmd_deps explicitly in build_linux 2025-01-21 12:29:35 +01:00
Marwin Glaser c212008de9 refactor(ci): add whitespace to improve readability in build_linux 2025-01-21 12:29:35 +01:00
Marwin Glaser f65a79a05e refactor(ci): avoid build_name duplication in build_linux matrix 2025-01-21 12:29:35 +01:00
Goetz Goerisch d85f762ac9 fix(ci): set different version to TPM2 depending on ubuntu variant
Signed-off-by: Goetz Goerisch <g.goerisch@vdw.de>
2024-11-13 13:33:07 +01:00
Goetz Goerisch 9429ef4397 feat(ci): extend clang jobs for ubuntu variants
Signed-off-by: Goetz Goerisch <g.goerisch@vdw.de>
2024-11-13 13:33:07 +01:00
Goetz Goerisch d29bce5caa feat(ci): add ubuntu-24.04 to build matrix
Signed-off-by: Goetz Goerisch <g.goerisch@vdw.de>
2024-11-13 13:33:07 +01:00
Julius Pfrommer 12bd03568b refactor(ci): Move CI scripts to /tools/ci 2024-10-11 23:03:15 +02:00
Götz Görisch 043af7d279 refactor(deps): bump libressl to 3.9.1 2024-04-22 07:38:09 +02:00
Julius Pfrommer 1bda1bb9ca fix(ci): Fix random failures in Clang asan builds 2024-03-15 18:56:03 +01:00
Julius Pfrommer 291e4e2d47 refactor(ci): Switch clang-14 build to clang-15 2024-03-15 10:38:03 +01:00
Götz Görisch 1581b06313 fix(ci): update all GH actions 2024-02-21 17:24:29 +01:00
Götz Görisch 176fd942b4 refactor(deps): bump LibreSSL to 3.8.2 (#6265) 2024-02-07 20:36:55 +01:00
Noel Graf d3e148ae62 fix(tests): check_types_builtin_xml Linux 32bit
* extend Matrix Build
2024-01-21 19:46:56 +01:00
Götz Görisch b9a45814e6 fix(deps) Bump tpm2-pkcs11 to 1.7.0 2024-01-21 19:46:56 +01:00
Götz Görisch 8bd2f1437f fix(deps): Bump tpm2-tss to 3.2.2 2024-01-21 19:46:56 +01:00
Götz Görisch 8a52734faa feat(ci): Matrix Build Linux 2024-01-21 19:46:56 +01:00
Götz Görisch edbad4163a fix(deps): Bump LibreSSL to 3.8.0 2023-08-09 15:52:46 +02:00
Julius Pfrommer 81b72af598 fix(ci): Remove spurious failures for pubsub_subscribe_encrypted 2023-07-28 21:42:56 +02:00
Andreas Ebner 3ca90d0a78 feat(server): New mechanism for automatic nodeset/companion spec injection into the server during the server-init. 2023-06-01 14:02:58 +02:00
Götz Görisch 5d73f0cc55 fix(deps): Bump LibreSSL to 3.7.2 2023-05-16 01:19:00 +02:00
basyskom-dege b5edf6d814 fix(CI): Enable sks and encryption examples. Fix memory leak in sks example (#5747) 2023-05-11 17:56:32 +02:00
basyskom-dege 06e3c58cd4 fix(ci): Enable mqtt examples (#5748) 2023-04-19 18:10:23 +02:00
Julius Pfrommer 4d5ceb378c Merge remote-tracking branch 'origin/1.3' into merge_13_master_12 2023-03-26 10:21:49 +02:00
Muddasir Shakil bacf70ead6 feat(CI): enable memchecks for sks
The UA_ENABLE_UNIT_TESTS_MEMCHECK are enabled for sks test runner to detect
all the memory leaks in CI automatically.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>
2023-03-03 15:23:44 +01:00
Julius Pfrommer 7c3a971b71 feat(ci): Build and run all examples with valgrind 2023-02-20 02:11:56 +01:00
Götz Görisch 2692a4c624 fix(deps): Bump LibreSSL to 3.7.0 2023-01-12 17:09:14 +01:00
Srdjan Usorac 50fcc0ea43 feat(ci): Enable nodesetLoader for CI builds (#5454)
Signed-off-by: Srdjan Usorac <uso@keba.com>
2022-12-22 08:08:24 +01:00
Muddasir shakil b457206d24 feat(pubsub): KeyStorage and SetSecurityKeys (#5243)
* Add UA_ENABLE_PUBSUB_SKS Cmake option

The SKS related features are enabled in open62541. The UA_ENABLE_PUBSUB_SKS
cmake option adds the support to enable/disable SKS related features.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add securityGroupId parameter to PubSub Group Config

The PubSub groups (Reader/Writer) are associated to a security group by
securityGroupId. The securityGroupId parameter is added to UA_WriterGroupConfig
and UA_ReaderGroupConfig structs.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add UA_PubSubKeyListItem struct

The Keystorage contains a linked list of KeyItems. The KeyItems holds the
information related to a key. The UA_PubSubKeyListItem struct forms the keyItems
of the keystorage KeyList.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add UA_PubSubKeyStorage struct

A structured storage is required to store all the keys and related information,
such as which security group, what security policy, how many PubSub Groups, and
when to move to next keys. The UA_PubSubKeyStorage struct holds the list of keys
used to secure the pubsub message for a security group and related information.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add PubSubKeyStorageList to the pubSubManager

The KeyStorage is managed by the pubSubManager object. There can be multiple key
storages managed by a pubSubManager for different Security Groups. An
UA_PubSubKeyStorage List is added to the pubSubManager, which contains the
pointers to all the key Storages managed by the pubSubManager for different
Security Groups.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add KeyStorage pointer to ReaderGroup and WriterGroup struct

A reference to a Keystorage is created when a ReaderGroup or WriterGroup group
is created. This reference is used for the life cycle management of the
KeyStorage. A non-owning pointer is added to WriterGroup and ReaderGroup structs
to point to their associated keystorage in the server.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add function to initialize a keyStorage

An empty keystorage list is created when a ReaderGroup or a WriterGroup is
created in server. The new KeyStorage is added to the server KeyList and
initialized for a securityGroup. If a KeyStorage already exists in the server
for a securityGroupId, then the referenceCount is incremented and the keyStorage
is added to the initializing ReaderGroup or WriterGroup. In case of failure,
the keystorage is cleaned and deleted.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add storeSecurityKey function

After the keystorage is initialized and added to the server keyList, the
keys should be stored in the keystorage keylist. the storeSecurityKeys function
takes current key and future key list and add it a KeyStorage in the server.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add Mechanism for key Rollover after KeyLifeTime expires

After the KeyLifeTime expires the Publisher and Subscriber are required to
move to the next key in the existing list. The addMoveToNextKeyCallback function
calculates the time to trigger the callback function and adds a timed server
callback. The importKeyToChannelContext function takes the key material,
divides the key into singing, encrypting and keyNonce part according to security
Policy assigned to KeyStorage and adds them to the channelcontext of the PubSub
Group. The moveToKeyCallback is the callback function to set the keys and
add next callback for key Rollover.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add API function update the existing keyStorage

The existing KeyList is updated/replaced with the fetched list. If the
currentTokenId is unknown in the existing list, then the existing keylist is
replaced by the fetched KeyList. In othercases keystorage is updated and keylist
is extended with new future keys.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add removeKeyStorage function

A keyStorage can be referenced by multiple PubSub Groups in a server. When a
keyStorage is removed with removeKeyStorage function, it checks the number of
of referenceCount parameter and decrements it by 1. If referenceCount was 1, then
the keyStorage pointer is freed and removed from the server.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add keyStorage in Server with ReaderGroup

Each ReaderGroup is assocaited with a keyStorage. The keys are used in its
channel context to secure the messages. A keyStorage is added/updated when
a ReaderGroup is created in the server.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add KeyStorage in server with WriterGroup

Each WriterGroup is assocaited with a keyStorage. The keys are used in its
channel context to secure the messages. A keyStorage is added/updated when
a WriterGroup is created in the server.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Remove KeyStorage from server with ReaderGroup

Each ReaderGroup is assocaited with a keyStorage. The keys are used in its
channel context to secure the messages. A keyStorage is removed/updated when
a ReaderGroup is removed from the server.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Remove KeyStorage from server with a WriterGroup

Each WriterGroup is assocaited with a keyStorage. The keys are used in its
channel context to secure the messages. A keyStorage is removed/updated when
a WriterGroup is removed in the server.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Delete All KeyStorages from Server

When PubSub Configuration is deleted, all the nested configuration and members
are deleted from the server. The KeyStorages are also deleted when a
PubSubManager is deleted, because KeyStorages does not serve the purpose anymore.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add KeyStorage Test setup and unit tests

A test suite is added for the keystorage and the following using tests are added
to it
	- Initialization of empty keystorage
	- Initialization of keystorage with invalid PubSub security policy
	- storing keys into empty keystorage
	- move to next key after keylifetime expire
	- Setting keys to the channel context
	- Adding keyStorage with Writer and ReaderGroup
	- Adding a Reader/WriterGroup to existing Keystorage
	- Removing keyStorage with a Writer/ReaderGroup

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add setSecurityKeys Method Node Callback

The keys are pushed to the Publishers and Subscribers who do not have client
functionality using setSecurityKeys Method Node. The setSecurityKeys callback
implements the backend of the setSecurityKeys Method node exposed by the server.
Checking for user credentials against PubSub Security Group Object nodes
is unresolved becuase creation of Security Group Object is not implemented.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add sks push test setup and unit tests

Setups the PubSub SKS Push test suite and helper methods. The test suite
includes a server with encryption and a client to connect with the server
with encrypted channel. The following unit tests are added
	- insufficient Security Mode
	- MissingSecurityGroup
	- Setting Security Keys
	- Update CurrentKey from exisiting list
	- Update CurrentKey and add new future keys
	- Replace existing keys with new keys

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Add PubSubKeyStorage description

The PubSubKeyStorage description is added to the header file. It also includes
the implemented workflow of the KeyStorage API to interact with KeyStorage.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

* Integrate PubSub SKS build and unit test in CI

The unit tests should be intergerated in the CI of open62541 pipeline to provide
proper testing and integration support of the new feature. The  build and unit
tests of PubSub SKS are integrated in the CI pipeline.

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>

Signed-off-by: Muddasir Shakil <muddasir.shakil@linutronix.de>
2022-10-17 20:55:11 +02:00
Andreas Ebner e1ce62306c fix(ci) add ci mosquitto dependency 2022-05-03 19:52:53 +02:00
Julius Pfrommer f550925698 feat(ci): Enable MQTT for the CI build 2022-05-03 19:51:27 +02:00
Julius Pfrommer 69f1c5823a feat(ci): Enable MQTT for the CI build 2022-04-04 22:33:03 +02:00
Götz Görisch 120831bc6e core(deps): Bumps LibreSSL to 3.4.3
Relnotes: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.3-relnotes.txt
2022-03-19 09:48:29 +01:00
Julius Pfrommer 802cbb4e2c Merge remote-tracking branch 'origin/1.3' 2022-01-19 12:48:39 +01:00
Julius Pfrommer 1c447182c2 feat(ci): Add CI builds without Subscriptions and with Diagnostics enabled 2022-01-19 07:01:02 +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 2f2b9fea7d Merge branch 'master' into 1.3 2021-12-01 11:08:34 +01:00
Julius Pfrommer 73ffb85ea3 feat(ci): Enable 32bit builds in the CI 2021-12-01 01:36:51 +01:00
Götz Görisch 9685857c7a core(deps): Bumps LibreSSL to 3.4.2
* fixes CB-K21-1240
2021-11-29 01:27:52 +01:00
Götz Görisch 0d490ef052 core(deps): Bumps LibreSSL to 3.4.1 (#4782) 2021-11-19 10:40:22 +01:00
Julius Pfrommerandkimim 6e971e912f feat(ci): Build amalgamation in the CI with multithreading enabled
Prevent regression to the recent build fix.

Co-authored-by: kimim <kimi.im@outlook.com>
2021-11-04 19:33:51 +01:00
andreasebner 3b95d6278c ci(gihubaction) fixed build unit testing names and description (#4699) 2021-10-25 18:05:16 +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 cbc7d0dbfe feat(ci): Add valgrind-testing for OpenSSL encyrption 2021-08-09 16:38:57 +02:00