Commit Graph

46 Commits

Author SHA1 Message Date
Julius Pfrommer 6a3cc6c8d0 refactor(core): Remove certificate verification from SecurityPolicy in favor of global plugin 2020-01-25 19:33:26 +01:00
Julius Pfrommer a25bb75393 refactor(core): Move ConnectionConfig into SecureChannel 2020-01-18 21:15:08 +01:00
Julius Pfrommer d332c9d40b refactor(core): Assemble complete chunks in the SecureChannel 2020-01-18 21:15:08 +01:00
Julius Pfrommer c6b6ed85b2 fix(build): Fix an undefined function warning for fuzzing 2019-10-30 14:07:57 +01:00
Julius Pfrommer 5856ceb003 refactor(server): Rename deleteMembers to clear in UA_SecurityPolicy 2019-10-03 15:14:24 +02:00
Ubuntu cbf26d66ed fix(multithreading): Fix tests for windows 2019-09-10 07:41:05 +02:00
Julius Pfrommer 1f686ae360 Tests: Fix thread_wrapper on MinGW 2019-06-06 02:32:09 +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
Jayanth Velusamy 53deb3585f [FIX] Add non-zero timestamp for unit tests (client)
Signed-off-by: Jayanth Velusamy <jayanth.v@kalycito.com>
2019-03-20 09:55:59 +01:00
Stefan Profanter c63abccb4d Tests: only call ck_assert while test is running
ck_assert can only be called while a test is running.
See https://github.com/libcheck/check/issues/18 and https://github.com/libcheck/check/pull/123

There was a race condition where the server loop tried to lock the mutex
and assert the return value, although the tests already finished.

Fixes #2331
2019-01-03 20:24:53 +01:00
Stefan Profanter a37c959ece Architecture: Allow overriding memory allocation functions 2018-11-16 09:44:03 +01:00
Ari 23541ab109 Add mutex wrapper 2018-11-15 16:16:01 +01:00
Julius Pfrommer 94a16514f7 Connection: Simplify storage of incomplete chunks
Now the connection receive method preprends the last incomplete chunk
 in the received buffer. This was made necessary by the new chunk
buffering in the SecureChannel.
2018-08-24 21:33:17 +02:00
Julius Pfrommer f6eae36ebe One ConnectionConfig per connection; Deduplicate HEL/ACK negotiation 2018-08-16 10:51:03 +02:00
Jose Cabral ae149eb6d5 Merge branch 'master' into feature/architectures 2018-06-27 09:05:30 +02:00
Stefan Profanter 9fb454760d Consistantly use UA_Boolean instead of bool 2018-06-26 11:52:52 +02:00
Stefan Profanter 0c3423036d Only define UA_sleep_ms if not yet defined (align with master) 2018-04-16 13:13:08 +02:00
Stefan Profanter a0d6e2b166 Further adaption to architecture folder
# Conflicts:
#	plugins/ua_log_socket_error.h
2018-04-16 13:13:00 +02:00
Stefan Profanter 516865e606 Merge branch '0.3' into master 2018-04-12 13:20:08 +02:00
Stefan Profanter 880b5fb33c Merge remote-tracking branch 'upstream/0.3' into feature/unit-tests/securechannel 2018-04-12 11:56:50 +02:00
Stefan Profanter dd9696dede Support OPC Foundation LDS server
Since client encryption landed into master, this was an open todo for
a long time. The multicast server example was updated to use the encryption
client.

Fixes #938
2018-03-28 23:41:09 +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
Mark Giraud 1600d8056e Actually verify certificates when creating a securechannel (#1583)
* Actually verify certificates when creating a securechannel

* Fix testing policy
2018-02-05 22:39:43 +01:00
Mark 653b54ea5d make channelcontext pointer non-const 2018-01-17 15:05:00 +01:00
Julius Pfrommer 97c90048f7 use a fixed send buffer for the testing connection 2017-12-23 21:19:22 +01:00
tbeu 983f956003 Fix typos 2017-12-13 09:15:49 +01:00
Julius Pfrommer e74b4bf832 simplify datetime handling. 2017-12-12 22:09:55 +01:00
StalderT 12be0ad68c add timezone to the logs 2017-12-12 22:09:55 +01:00
StalderT 3e51e870bf win32 change gmtime to gmtime_s 2017-12-12 22:09:55 +01:00
StalderT 26b3165821 fix localtime in logger 2017-12-12 22:09:55 +01:00
Mark 1764a93548 Added sendSymmetric tests for mode and parameters 2017-12-11 15:39:56 +01:00
Mark 6cd8c3e1c4 Fix #1402 2017-12-05 10:40:42 +01:00
StalderT 6941fe4708 fix select test timing 2017-12-02 18:28:17 +01:00
Jose Cabral 6c82b082c8 Fix missing code for VxWorks 2017-12-01 16:13:19 +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 7b80c5e44a Fix compile and analysis errors 2017-11-30 10:08:50 +01:00
Mark de7f8eeff3 Start adding tests for sendAsymmetricOPNMessage 2017-11-30 10:08:50 +01:00
Mark 238efcede8 Added assertions to testing policy 2017-11-30 10:08:50 +01:00
Mark e7f80f9779 -Added testing SecurityPolicy
-Added generateNewKeys test
2017-11-30 10:08:50 +01:00
Stefan Profanter eb26a1e34b Untabify 2017-11-22 15:57:03 +01:00
Stefan Profanter 3619afb6bd Add unit test for windows 2017-11-22 15:56:50 +01:00
Julius Pfrommer 6278950c4b simplify client securechannel test (#1385)
* simplify client securechannel test

* rename sleeping on simulated testing clock to UA_fakeSleep

* let the server start before calling with the client
2017-11-21 12:52:23 +01:00
Mark 1b6c0554cb Move tests into subdirectories for better organization 2017-11-08 10:29:23 +01:00