64 Commits

Author SHA1 Message Date
Andreas Ebner 918f2cfd4b fix(docs): typos in comments, docs and messages
Fix misspellings found with codespell across headers, sources, examples,
tests and the documentation, including "propably" in the nodeset
compiler docs. Identifiers, companion spec names and generated code are
left untouched.
2026-09-28 16:20:44 +02:00
Julius Pfrommer a476806541 Merge remote-tracking branch 'origin/1.5' into merge_15_master
# Conflicts:
#	.github/workflows/build_linux.yml
#	CHANGES.md
#	arch/common/eventloop_mqtt.c
#	examples/encryption/server_encryption_filestore.c
#	plugins/crypto/ua_certificategroup_filestore.c
#	src/pubsub/ua_pubsub_networkmessage_json.c
#	src/server/ua_discovery.h
#	src/server/ua_discovery_mdns.c
#	src/server/ua_discovery_mdns_avahi.c
#	src/server/ua_services_attribute.c
#	src/server/ua_services_discovery.c
#	src/server/ua_services_monitoreditem.c
#	src/server/ua_services_nodemanagement.c
#	src/server/ua_subscription.c
#	src/server/ua_subscription.h
#	src/server/ua_subscription_alarms_conditions.c
#	src/server/ua_subscription_event.c
#	src/ua_types_encoding_json_105.c
#	tests/client/check_activateSessionAsync.c
#	tests/server/check_local_monitored_item.c
#	tests/server/check_services_subscriptions.c
2026-09-03 14:33:21 +02:00
Julius Pfrommer cc6e95b261 fix(examples): avoid logging from new signal handlers
Apply the Powerlink signal-handler fix to executables added on 1.5. Keep the handlers limited to updating volatile run flags so an interrupted logger cannot deadlock on its own lock.
2026-09-02 16:11:55 +02:00
Julius Pfrommer 56f4d0272f refactor(examples): drop mbedTLS version dependency 2026-08-12 05:44:46 +02:00
Julius Pfrommer 41942b9a1b feat(arch): Add CertificateGroup to connection manager (for websockets and MQTT) 2026-07-23 15:01:50 +02:00
Julius Pfrommer 30ae922aa6 Merge remote-tracking branch 'origin/1.5' into merge_15_master_7 2026-04-25 21:05:40 +02:00
Andreas Ebner c8aef667b1 test(sec): add ECC security policy unit tests 2026-04-19 17:57:52 -04:00
Andreas Ebner c33c20dac3 feat(sec): add ECC certificate generation and documentation 2026-04-19 17:57:52 -04:00
Julius Pfrommer 99cd8ab3a8 Merge remote-tracking branch 'origin/1.5' into merge_15_master_3 2026-02-21 00:05:03 +01:00
Julius Pfrommer 35058645f9 feat(examples): Add Username/PW to the server_encryption example 2026-02-20 23:55:49 +01:00
Florian La Roche 86de4e3153 refactor(examples): fix clang compiler warnings
Fix a few clang compiler warnings:
- Non-existant include dirs used in examples/CMakeLists.txt
- examples/encryption/server_encryption_filestore.c: Fix main() return
  code.
- Add static modifier to some variables.

Signed-off-by: Florian La Roche <f.laroche@pilz.de>
2026-02-18 18:09:25 +01:00
Julius Pfrommer ed61d58648 fix(examples): Cleanup of loaded certificate data in examples/encryption/client_encryption.c 2026-01-25 00:22:55 +01:00
Julius Pfrommer 9ec6694ac7 refactor(examples): Replace UA_LOGCATEGORY_USERLAND / UA_LOGCATEGORY_APPLICATION 2025-12-07 18:46:12 +01:00
Noel Graf 209468d93e refactor(examples): Update encryption examples to use secure-only policies 2025-09-23 16:34:06 +02:00
Noel Graf 8e9b3f7821 fix(examples): Fix invalid free 2025-08-21 17:21:14 +02:00
Noel Graf d49cb241ba feat(example): Add an example of using encryption with a filestore backend 2025-01-24 22:34:30 +01:00
Julius Pfrommer c8146660a4 refactor(examples): Use the AcceptAll certificate verification for the examples
Don't require the examples to have the remote certificate in a
trustlist.  This reduces initial confusion and still logs a warning.
2024-12-10 08:28:30 +01:00
Julius Pfrommer 9ae8b76986 refactor(plugins): Use urn:open62541.unconfigured.application as the default ApplicationUri
We want to have the same default for client and server. So we get less
trouble with reusing certificates. Before we had to manually adjust the
client URI to say "server". That's not good...
2024-12-10 08:28:30 +01:00
Julius Pfrommer 2b445aecf6 Merge remote-tracking branch 'origin/1.4' into merge_14_master_23 2024-11-05 17:19:45 +01:00
Julius Pfrommer c5f214ee4c refactor(examples): Remove misleading comments - revocation lists are supported 2024-10-23 07:18:22 +02:00
Julius Pfrommer 705801a55c refactor(examples): Use the NS0ID shorthand in the examples 2024-07-26 08:30:16 +02:00
Julius Pfrommer eab68cf716 refactor(pubsub): Always compile encryption for PubSub
This removes the UA_ENABLE_PUBSUB_ENCRYPTION option entirely.
Its not much code and the complexity gets reduced.
2024-07-20 11:42:05 +02:00
Noel Graf 1f19a8e484 feat(plugins): Support certificate generation with mbedTLS. (#6145) 2024-01-11 16:08:37 +01:00
Julius Pfrommer 2bd9e723ad refactor(build): Remove UA_ENABLE_PUBSUB_ETH_UADP option - now part of the EventLoop 2023-10-07 23:07:54 +02:00
basyskom-dege 0f055942b7 feat(CI): Added support for arguments in the examples workflow (#5760)
* CI: Added support for arguments in the examples workflow

* Fixed memory leaks in examples. Add ApplicationUri

* Arguments and server/client for all examples. Small fixes

* outsource/blacklist some examples. Fix memory leak in example.

* Remove Shlex. Remove false UA_Client_delete

* Removed raw examples from ci. Fix leak in client.c and mqtt_publish

* Fix memory leak in mqtt subscriber
2023-07-02 02:58:40 +02:00
Julius Pfrommer 66696402ae refactor(plugin): Remove usage of old networking API for Websockets 2023-06-26 13:27:18 +02:00
Martin Brenner 08a533464d feat(plugin): Make the certificate key length and expiration date configurable (#5713) 2023-05-02 15:28:51 +02:00
Julius Pfrommer 20ad12c6db fix(examples): Fix ctrl-c during certificate generation in server_encryption.c 2023-03-27 11:23:41 +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
Julius Pfrommer 3dc93eaa90 refactor(examples): Return EXIT_SUCCESS for the valgrind run 2023-02-20 02:11:56 +01:00
Julius Pfrommer 6e618fdb78 refactor(client): Always first set the connectStatus, then close the SecureChannel 2023-01-06 17:05:37 +01:00
Andreas Eckerstorfer 13af9b8688 refactor(core): Remove trailing spaces in code (#5221) 2022-06-24 11:03:25 +02:00
Kjeld Flarup 2d59c7d367 feat(examples): Example client_encryption: If one of the specified certificate files is in wrong format, the example ignored this and continued with policy #None (#3405)
Signed-off-by: Kjeld Flarup <kfa@deif.com>
2022-06-10 01:04:47 +02: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
Christian von Arnim 028421225b feat(ex): Use UA_CreateCertificate in server_encryption
Co-authored-by: Julius Pfrommer <julius.pfrommer@web.de>
2021-08-09 16:38:57 +02:00
Joakim Roubert d69ee99f4d Fix(doc): Documentation spelling fixes (#4472)
Signed-off-by: Joakim Roubert <joakimr@axis.com>
2021-06-14 21:50:36 +02:00
Julius Pfrommer 7e4f8f15c4 fix(examples): Make server_encryption.c clang-analyzer clean 2021-02-28 07:05:05 +01:00
Julius Pfrommer b1d5a51366 fix(examples): Make client_encryption.c clang-analyzer clean 2021-02-28 07:05:05 +01:00
demike 5dea0e3898 feat(core): Add support for WebSocket Secure (wss) (#3779)
* fix: websocket not disconnecting

* feat: allow official opcua proto opcua+uacp/+json

* fix: disable opcua+json protocol for now

* feat: initial commit

* feat: add wss support + example

* fix: wrong condition + memory leak

* fix: typo
2020-09-13 11:25:43 +02:00
Asish Ganesh 436f29b03a [TASK] Pass issuer list separately
- At present issuer list is passed in trust list
 - Add functionality to pass the issuer list separately
 - Handle condition where a client is connected using
   an (trusted) issued certificate of a CA that is not
   trusted but available
 - This resolves test case number 044.js and 045.js in
   Security Certificate Validation to pass simultaneously
 - usage : ./server_ctt <server-certificate.der> <private-key.der>
           [--trustlist <tl1.ctl> <tl2.ctl> ... ]
           [--issuerlist <il1.der> <il2.der> ... ]
           [--revocationlist <rv1.crl> <rv2.crl> ...]

Change-Id: I4a25af9f4c2b771da9492fafb534f72dcc6fc17d
Signed-off-by: Asish Ganesh <asish.g@kalycito.com>
2019-07-05 14:10:17 +02:00
Julius Pfrommer fd08d012d9 Server: Initialize the config in the server 2019-04-23 00:41:32 +02:00
Stefan Profanter 63f3653ff1 Additional header cleanup and consistent name of ns generated files 2019-03-21 20:16:31 +01:00
Julius Pfrommer c9c818868f Move header files to a more unix-like structure
This commit drops the 'ua_' prefix and changes the public includes
to the form `#include <open62541/server.h>` instead of the old
`#include <ua_server.h>`
2019-03-21 20:16:31 +01:00
Julius Pfrommer afec3480a6 Examples: Force encryption to be used with the client_encryption example 2019-03-18 16:37:20 +01:00
Frank Meerkoetter 1648fb8aaa Use EXIT_SUCCESS/FAILURE for the examples
Make use of EXIT_SUCCESS and EXIT_FAILURE from stdlib.h.
The previous approach of returning a value from UA_StatusCode
was often broken as an exit code can (portably) only be between 0 and 125.
2019-02-09 09:34:46 +01:00
Julius Pfrommer f85607bc77 Examples: Force SignAndEncrypt for the client encryption example 2019-01-30 18:45:42 +01:00
Julius Pfrommer bcaa6695c0 Client: Store SecurityPolicies in the client config; Refactor connection logic 2019-01-30 18:45:42 +01:00
Julius Pfrommer b4c9fc37eb Client: Initialize client config inside the client structure
Temporarily disable encyrption
2019-01-30 18:45:42 +01:00