Commit Graph

53 Commits

Author SHA1 Message Date
Julius Pfrommer
3785ed5c4d Merge remote-tracking branch 'origin/1.4' into merge_14_master_24 2024-11-29 21:50:04 +01:00
Julius Pfrommer
633e210812 refactor(core): Make SecureChannel message processing less indirect 2024-11-17 07:37:44 +01:00
Julius Pfrommer
5bba2ba794 refactor(core): Fold the <type>_generated_handling.h into <type>_generated.h 2024-05-29 06:14:56 +02:00
Julius Pfrommer
c360046233 refactor(core): Move util features to /src/util 2023-10-20 20:02:25 +02:00
Julius Pfrommer
4d13824e19 refactor(core): SecureChannel uses nowMonotonic supplied from outside 2023-10-04 10:56:26 +02:00
Julius Pfrommer
f3866638dd refactor(core): Always enable encryption features in the core library 2023-08-22 01:45:33 +02:00
Julius Pfrommer
390c092c05 refactor(tests): Include stdlib.h where open62541 no longer does it 2023-07-28 21:42:56 +02:00
Julius Pfrommer
b19cc6d78c refactor(core): Remove UA_SECURECHANNELSTATE_FRESH
Instead use UA_SECURECHANNELSTATE_CLOSED as the default.
This is the pattern used everywhere else as well.
2023-04-29 22:25:30 +02:00
Julius Pfrommer
38ff117bce refactor(core): The SecureChannel directly uses the EventLoop connection 2022-08-05 09:13:05 +02:00
Julius Pfrommer
0025204622 Merge remote-tracking branch 'origin/1.3' 2022-06-05 21:30:59 +02:00
Julius Pfrommer
f040c73b53 Merge branch '1.2' into 1.3 2022-06-05 20:36:15 +02:00
Julius Pfrommer
b79db1ac78 fix(plugin): Add default limits for chunks and message size
Based on a reported DoS vulnerability reported by Team82 (Claroty
Research).
2022-06-04 15:09:28 +02:00
Alexander Bluhm
4a0f979516 test(core): fix compiler errors
OpenBSD clang version 13.0.0 complains about -Wsign-conversion
errors.  Use correct types to avoid sign conversion and bad comparison.
2022-05-20 23:50:17 +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
4953ddd342 refactor(core): Simplify the SecurityPolicy API
When a ChannelContext is available, no pointer to the policy is
required.
2021-03-21 16:07:32 +01:00
Julius Pfrommer
3af98db2be refactor(tests): Improve extraPadding testing in check_securechannel.c 2021-03-21 08:39:52 +01:00
Julius Pfrommer
94ba65d41b fix(tests): Make the unit tests clang-analyzer clean 2021-02-28 07:05:05 +01:00
Martin Lang
262905bf20 refactor(core): Disambiguate UA_SECURECHANNELSTATE_FRESH from _CLOSED 2021-02-15 06:36:13 +01:00
Julius Pfrommer
7c23332027 refactor(test): Use _clear instead of _deleteMembers 2020-10-18 15:21:40 +02:00
Mark Giraud
a2c677cab6 fix: hel message is now required. previously the hel message could be omitted, or sent after an opn. 2020-08-07 14:03:13 +02:00
Julius Pfrommer
9f9b0ca57e feat(core): Allow all types of NodeId for the binary encoding identifier 2020-07-30 15:01:25 +02:00
Julius Pfrommer
ed2a0e3e63 Merge branch '1.1' 2020-06-24 12:16:16 +02:00
Julius Pfrommer
320d71b775 fix(client): Explicit SecureChannel state for renewal and token revolving 2020-06-24 12:06:02 +02:00
Mark Giraud
39c8ccdb91 feature: Asymmetric decryption in securechannel
Server side only
Client side will follow
2020-06-16 11:37:59 +02:00
Mark Giraud
d116bfc850 feature: Unit test for chunk assembly 2020-06-16 11:37:59 +02:00
Julius Pfrommer
154c92a610 refactor(core): Remove UA_SecureChannel_delete
Use only _close instead.
Use UA_SECURECHANNELSTATE_CLOSING to differentiate from _CLOSING
2020-05-05 09:33:57 +02:00
Julius Pfrommer
6aaef50768 refactor(core): Move and refine SecureChannel states 2020-05-05 09:33:57 +02:00
Julius Pfrommer
a25bb75393 refactor(core): Move ConnectionConfig into SecureChannel 2020-01-18 21:15:08 +01:00
Julius Pfrommer
66f0897151 refactor(core): Remove unused transport datatypes 2020-01-18 21:15:08 +01:00
Julius Pfrommer
5856ceb003 refactor(server): Rename deleteMembers to clear in UA_SecurityPolicy 2019-10-03 15:14:24 +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
d371aaf5ed Tests: Cosmetic cleanup of SecureChannel tests 2018-12-23 14:51:34 +01:00
Julius Pfrommer
37616bfae3 Tests: Repair SecureChannel tests if encryption is disabled 2018-12-23 14:51:34 +01:00
Julius Pfrommer
27dc05196f SecureChannel: Split UA_SecureChannel_close and UA_SecureChannel_deleteMembers
OSS-Fuzz uncovered an issue where we "unlinking" of the Session and
Connection was done in a delayed callback. But the "unlinking" needs to
be done right away.
2018-09-23 17:07:41 +02:00
Julius Pfrommer
7e635abcda SecureChannel: Split into _init and _setSecurityPolicy 2018-08-13 21:06:12 +00:00
Stefan Profanter
880b5fb33c
Merge remote-tracking branch 'upstream/0.3' into feature/unit-tests/securechannel 2018-04-12 11:56:50 +02:00
Mark Giraud
37e8654da8 SecurityPolicy Interface change (#1613)
* Always use functions to get sizes and lengths.

This makes for better encapsulation and unifies the interface usage for
asymmetric and symmetric modules

* Add nonce length to SecurityPolicy and use it.

Previousely the key length was used as nonce length, which was
incorrect.
This only worked for basic128rsa15.

* Add certificate signing algorithm to interface

* Remove unnecessary functions from SecurityPolicy interface

* allow session to switch over to a new securechannel
2018-02-26 22:14:39 +01:00
Julius Pfrommer
5c27c73a4b move session definition into server
This removes details of the server's Session implementation from the
SecureChannel code. This was unwanted as the SecureChannel is also used
by the client.
2018-01-18 18:22:44 +01:00
Julius Pfrommer
97c90048f7 use a fixed send buffer for the testing connection 2017-12-23 21:19:22 +01:00
Mark
1764a93548 Added sendSymmetric tests for mode and parameters 2017-12-11 15:39:56 +01:00
Mark
3b2ed70080 Add test function for symmetric messages 2017-12-11 15:39:56 +01:00
Mark
6cd8c3e1c4 Fix #1402 2017-12-05 10:40:42 +01:00
Mark
b0a358d4c5 Added tests for the generateNonce function 2017-11-30 10:08:50 +01:00
Mark
3d6ad6a0cb Add tests and possibility to set key sizes in test
New tests that test for correct message structure and correct padding calculation.
Also, it is now possible to set key sizes and so forth in each test.
Defaults are provided by the setup functions.
2017-11-30 10:08:50 +01:00
Mark
0cabd40863 Modified testing NL and added SecureChannel test.
The testing NetworkLayer now writes the data it 'Sends' into a buffer,
so we can check the buffer in our unit tests.
The new test checks if the headers etc. are encoded correctly and
if the encryption functions are called for the correct data.
2017-11-30 10:08:50 +01:00
Mark
3c9774bb63 Split tests into separate functions.
This ensures everything is in a fresh state before each test.
2017-11-30 10:08:50 +01:00
Mark
96466e6601 Fix sendAsymmetricOPNMessage test and setup and teardown functions (connection setup) 2017-11-30 10:08:50 +01:00
Mark
de7f8eeff3 Start adding tests for sendAsymmetricOPNMessage 2017-11-30 10:08:50 +01:00
Mark
ebd57ea4bf Added revolveTokens test 2017-11-30 10:08:50 +01:00