Commit Graph

937 Commits

Author SHA1 Message Date
Noel Graf 7325bc643c Adapt example to reproduce offset calculation error 2025-04-04 15:49:07 +02:00
Noel Graf 5bd7ceb46d feat(arch): Add lwip udp support 2025-03-19 08:31:35 +01:00
Noel Graf 385644b432 feat(plugin): Adapted the logging plugin to output debug messages on the serial interface 2025-03-19 08:31:35 +01:00
Noel Graf 057b8adcf7 feat(server): Add a configuration field to specify whether the interface should be initialized by the stack or if it has already been initialized externally 2025-03-19 08:31:35 +01:00
Noel Graf 418ded28bd feat(arch): Add tcp connection manager for lwip 2025-03-19 08:31:35 +01:00
Ómar Högni Guðmarsson 9056bbf887 fix(build): compilation on macos
After some commits on the master branch compilation
for macos was not working. This PR restores macos
to a building state.

Co-authored-by: Jón Bjarni Bjarnason <jon@centroid.is>
2025-03-18 14:58:00 +01:00
Noel Graf 43e0ce49fe fix(plugin): Removed architecture dependency from the mbedtls plugin 2025-03-10 15:33:25 +01:00
Sebastian Goll a7b21ca96b fix(plugins): Fix generation of wrong private key format for MbedTLS
- Re-order case statements to match order in other code
- Use derived compile-time constant to avoid duplication

(cherry picked from commit ee8083a9a2)
2025-03-04 15:15:39 +00:00
Noel Graf c9bb7e5e87 fix(plugin): Remove duplicate file 2025-03-04 15:15:39 +00:00
Julius Pfrommer e617a34606 Merge remote-tracking branch 'origin/master' into merge_14_master_25 2025-02-04 13:33:31 +01:00
Julius Pfrommer 77ae531e82 Merge remote-tracking branch 'origin/1.4' into merge_14_master_25 2025-02-02 19:14:15 +01:00
Julius Pfrommer 018d2584e9 refactor(core): Remove UA_LOCK_STATIC_INIT and its only user
There is no cross-plattform way to statically initialize a recursive
lock.
2025-01-29 12:03:31 +01:00
Berendej 7c500a1242 fix(plugins): Increase token number for JSON config parsing / Fix jumping over unknown elements
If parseJSONConfig() met unknown complex 1st layer item (array or object) it couldn't parse following items correctly since context->index was pointing to the internal elements of unknown item instead of next 1st layer item. So skipUnknownItem() function was added which skip all internal elements of unknown 1st layer item be it object, array of objects, array of array or anything else.
2025-01-28 16:01:03 +01:00
Julius Pfrommer 748f39ad5e Merge remote-tracking branch 'origin/master' into merge_14_master_25 2025-01-25 19:07:12 +01:00
Julius Pfrommer 3bec159cb9 Merge remote-tracking branch 'origin/1.4' into merge_14_master_25 2025-01-25 19:06:56 +01:00
Noel Graf 59eff2c2b0 refactor(plugin): Move the file handling definitions to the arch folder 2025-01-24 22:35:58 +01:00
Julius Pfrommer 0e62e11afb Merge remote-tracking branch 'origin/master' into merge_14_master_25 2025-01-20 16:09:35 +01:00
Christian von Arnim 403f4628c4 fix(plugin): Convert PEM to DER for rsa policies 2025-01-20 16:02:26 +01:00
Noel Graf 373986fbf1 fix(plugin): Reset only the specified part of the trust list when setting it 2025-01-15 14:15:29 +01:00
Noel Graf f29a7f3f30 fix(plugin): Extend CertificateUtils to support CRL for the thumbprint and subject name functions 2025-01-15 14:15:29 +01:00
Tomi Takala 931cc824f7 fix(plugins): Rename dirent.h to tr_dirent.h 2025-01-14 22:50:18 +01:00
Tomi Takala 06d0d3ff86 fix(plugins): Add include guard to ua_filestore_common.h 2025-01-14 22:50:18 +01:00
Noel Graf 0cde335fa7 fix(plugin): Initialize memory to prevent uninitialized memory error 2025-01-14 22:49:30 +01:00
tomitkl 2076a9c87f feat(plugin): Add filestore Windows implementation (#7006)
* feat(plugin): Add filestore Windows implementation

* Define UA_DT_REG and UA_DT_DIR

* Remove build flag and use __linux__ or UA_ARCHITECTURE_WIN32 in places which used to check only for __linux__
2025-01-10 14:28:37 +01:00
Noel Graf 34d957c561 fix(server): Consistency in the use of the Windows architecture flag 2025-01-09 15:00:38 +01:00
Vasilij Strassheim a8930fd50a refactor(server): Clean up mDNS module
Separate mDNS related code from discovery module to enable easier integration
of different mDNS implementations. Add new API functions and make other functions
static to reflect their use in the mDNS module only.
The libmdnsd implementation uses an ip entry for the server and selects the
interface to be used for establishing the connection. This is not required for
avahi as the avahi daemon is normally configured externally. Make the server
configuration of the mDNS IP list and the interface dependent on the use of
libmdnsd.

Signed-off-by: Vasilij Strassheim <vasilij.strassheim@linutronix.de>
2025-01-01 11:57:50 +01:00
Rolf Kalbermatter e391342741 improve(eventloop): make conditional macros more clear for the Ehernet ConnectionManager which is only implemented on Linux 2024-12-23 00:22:27 +01:00
Michał Tyndel 25584c3ccf fix(plugin): Monitor 'trusted' subdirectory in PKI
inotify doesn't work recursively, subdirectories need to be monitored separately. As a result adding certificate to 'trusted' directory directly didn't refresh the trustlist.
2024-12-11 11:52:36 +01:00
Julius Pfrommer b6c113012a refactor(plugins): Parse the certificate subject alt name using the new mbedTLS API in mbedtls/certificategroup.c 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 41f7dc4f87 refactor(plugins): Improve the logging of mismatching ApplicationURI in openssl/certificategroup.c 2024-12-10 08:28:30 +01:00
Julius Pfrommer 9f6b89b4cb feat(plugins): Use the application's logger in UA_CertificateUtils_verifyApplicationURI 2024-12-10 08:28:30 +01:00
Julius Pfrommer 796a2e3a8a refactor(core): Rename the log category "securitypolicy" to just "security"
So it also covers the general certificate handling.
2024-12-10 08:28:30 +01:00
Julius Pfrommer 9e17e1b4f9 fix(plugins): Don't use the server log category for generic certificategroup functionality 2024-12-10 08:28:30 +01:00
Costin Zanfir a85c4cc624 fix(plugin): add SecurityPolicy#Aes256_Sha256_RsaPss to json configuration plugin
Add the Aes256_Sha256_RsaPss security policy to
the json configuration plugin. The server_config.json5
example configuration file is updated as well.
2024-12-09 07:49:45 +01:00
Julius Pfrommer 5e7f04b71b Merge remote-tracking branch 'origin/1.4' into merge_14_master_25 2024-12-07 22:55:41 +01:00
Sebastian Goll ee8083a9a2 fix(plugins): Fix generation of wrong private key format for MbedTLS
- Re-order case statements to match order in other code
- Use derived compile-time constant to avoid duplication
2024-12-04 19:49:42 +01:00
Jan Murzyn fa512db883 fix(plugins): Fix issue with invalid signature on the generated CSR (#6934)
Private key associated with a security policy is used for multipule
purposes:
- asymmetric encryption/decryption
- asymmetric signing/verification
- certificate/CSR signing

The schemes used for each of the above operations differ in various
policies. However, for certificate/CSR signing, for all RSA-based
policies, the used scheme is always RSASSA-PKCS1-v1_5
(MBEDTLS_RSA_PKCS_V15).

Before generating a CSR, enforce using the RSASSA-PKCS1-v1_5 by setting
the corresponding private key context.

This fixes a bug that in some edge cases, the private key context left
after the previous usage of RSA module (e.g. if the last usage was to
decrypt the user password) had the scheme set to RSAES-OAEP
(MBEDTLS_RSA_PKCS_V21). This resulted in an invalid signature over the
CSR.

Co-authored-by: Julius Pfrommer <jpfr@users.noreply.github.com>
2024-12-04 16:06:18 +01:00
Julius Pfrommer 21e9c240ec Merge pull request #6875 from jpfr/merge_14_master_24
Merge 1.4 to master
2024-11-29 23:56:34 +01:00
Julius Pfrommer 3031e8cae5 refactor(plugins): Simplify struct definition in ua_certificategroup_filestore.c 2024-11-29 21:51:08 +01:00
Julius Pfrommer a5344503dd fix(plugins): Certificate verification must not depend on an absolute memory location of the CertificateGroup 2024-11-29 21:50:05 +01:00
Julius Pfrommer 3785ed5c4d Merge remote-tracking branch 'origin/1.4' into merge_14_master_24 2024-11-29 21:50:04 +01:00
Sebastian Goll 0cc73feb09 fix(plugin): fix clearing previous plugin in UA_AccessControl_default() 2024-11-26 20:54:02 +01:00
Julius Pfrommer 9e59f1abe2 refactor(plugins): Remove comparison of authorityKeyIdentifier / subjectKeyIdentifier not supported by CTT
The CTT example Security User X509/001.js expects that an issuer is
selected where the authorityKeyIdentifier / subjectKeyIdentifier do not
match. No longer use X509_check_issued, but rather manually check if the
issuer name and subject name match -- with no other checks beyond that.
2024-11-25 18:48:59 +01:00
Julius Pfrommer b6961b23ae Merge remote-tracking branch 'origin/1.3' into merge_13_14_21 2024-11-24 23:45:19 +01:00
Julius Pfrommer 68142484a3 feat(plugins): Disable revocation lists checks in ua_pki_openssl.c if zero crl are loaded
Avoid breakage for users of the 1.3 release family but still log a warning.
2024-11-23 21:57:36 +01:00
Julius Pfrommer efbaac086e feat(plugins): Disable revocation lists checks in ua_pki_mbedtls.c if zero crl are loaded
Avoid breakage for users of the 1.3 release family but still log a warning.
2024-11-23 21:57:36 +01:00
Julius Pfrommer 80bbdd4170 fix(plugins): Return detailed status codes for revocation checks in ua_pki_openssl.c 2024-11-23 21:57:36 +01:00
Julius Pfrommer 486a65ee10 fix(plugins): Also consider the trustlist to find issuers in ua_pki_openssl.c 2024-11-23 21:57:36 +01:00
Julius Pfrommer 2e516fd7bd fix(plugins): Return detailed status codes for revocation checks in ua_pki_mbedtls.c 2024-11-23 21:57:36 +01:00