Commit Graph

968 Commits

Author SHA1 Message Date
Selva Suba Jenifer Joseph fbb4e0fe4d test(PubSub): Add unit test case for XDP connection
- Unit test case to verify XDP connection
 - Add README_pubsub_TSN.txt for executing the applications and unit tests

Change-Id: I7a05d2dcd8f7881f24a3c5a44560aad1b3971e41
2020-04-07 17:04:18 +02:00
Julius Pfrommer ec7ad1ed36 fix(core): UA_Guid_parse supports different endian achitectures 2020-04-05 08:58:16 +02:00
Julius Pfrommer 33bd9b0184 refactor(core): Simplify message assembly in SecureChannel 2020-04-02 00:11:22 +02:00
Julius Pfrommer 312a4351cc refactor(core): Rename packet to buffer in SecureChannel 2020-04-02 00:11:22 +02:00
Julius Pfrommer cf5867a981 feature(test): Set array entries for chunking tests 2020-04-02 00:11:22 +02:00
Julius Pfrommer 287c5ad69b fix(server): Make the BrowseName of Nodes immutable
The BrowseName is tracked in binary trees in other nodes for fast
lookup. We would have to reinsert the node to all references lists
of other nodes pointing here.
2020-03-29 21:27:39 +02:00
Julius Pfrommer da22d9d742 feature(core): Add UA_RelativePath_parse 2020-03-23 19:54:26 +01:00
Julius Pfrommer 2cb1c354ee feature(core): Add UA_ByteString_fromBase64 2020-03-23 19:54:26 +01:00
Bin Lan 682a841be5 add the security policy Basic128Rsa15 support with OpenSSL. 2020-03-23 19:54:10 +01:00
Bin Lan 19b3dc0945 add build/test for security policy source code using openssl in Linux. 2020-03-18 10:36:45 +01:00
Julius Pfrommer e4c166f664 feat(core): Parsing of human readable ExpandedNodeId 2020-03-12 11:29:21 +01:00
Julius Pfrommer 14c69ad679 feat(core): Parsing of human-readable format for Guid and NodeId 2020-03-12 11:29:21 +01:00
Shriya Chaurasia c09da0b76d test(PubSub): Add unit test for ethernet ETF functionality
- Add unit test case for ethernet etf connection
 - Add unit test case for ethernet etf send functionality

Change-Id: I1bfba13b5c80e2b302bc46e1f616af77a1291bc1
2020-03-06 14:06:21 +01:00
Shriya Chaurasia 4c155d04de test(PubSub): Add unit test for ethernet functionality
- Add unit test case for ethernet connection
 - Add unit test case for ethernet send functionality

Change-Id: If2ec7876f1a3d8b671c43a1d578233443dbeee6f
2020-03-06 14:06:21 +01:00
Julius Pfrommer cde2a43662 refactor(test): No threading in check_client_async_connect.c 2020-02-29 13:09:46 +01:00
Julius Pfrommer 4d2eebca1c refactor(client): Clean up async connect 2020-02-29 13:09:46 +01:00
Alexander Bluhm 71738ec1ed test(openbsd): compile options
On OpenBSD there is not subunit package available.  Do not add it
to the library list to successfully build the tests.

The check package is installed in /usr/local/ so the include files
and libraries should be searched there.  Move this directory to the
end of the list so that other software lying there, like an old
version of open62531, is less likely to interfere with testing.
2020-02-28 08:24:12 +01:00
Julius Pfrommer 7dd3687599 test(pubsub): Use a #define for the public test mqtt server 2020-02-17 22:26:03 +01:00
Julius Pfrommer c782610c02 fix(fuzz): Use correct username/password in the fuzzer 2020-01-26 12:39:37 +01:00
Julius Pfrommer f2c91e2125 fix(fuzz): FIx non-terminating corpus generation 2020-01-26 12:39:37 +01:00
Julius Pfrommer 44fab17f26 feat(tests): Better logging of fuzzing 2020-01-26 12:39:37 +01:00
Julius Pfrommer d07b8b954d fix(tests): Fix tests with subscriptions disabled 2020-01-26 12:39:37 +01:00
Julius Pfrommer 017ee76609 refactor(server): Fold SessionManager into Session Service-Set 2020-01-26 12:39:37 +01:00
Julius Pfrommer c461a7fb24 fix(tests): Open custom SecureChannel for fuzz message dumping 2020-01-25 19:33:26 +01:00
Julius Pfrommer de26fc4575 fix(tests): Fix a timing issue under valgrind in check_client.c 2020-01-25 19:33:26 +01:00
Julius Pfrommer 6a3cc6c8d0 refactor(core): Remove certificate verification from SecurityPolicy in favor of global plugin 2020-01-25 19:33:26 +01:00
Stefan Profanter ac16287c86 feat(nodeset-compiler): Add support for Structure inside Extension Object 2020-01-21 10:08:11 +01:00
Julius Pfrommer ed2406d3a3 fix(tests): Async fixes for check_client_subscriptions.c 2020-01-19 19:32:52 +01:00
Julius Pfrommer fc3a83e570 fix(tests): Remove number of readspeed test iterations 2020-01-18 21:15:08 +01:00
Julius Pfrommer 555edd2692 fix(tests): Reduce number of monitoringspeed test operations 2020-01-18 21:15:08 +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 66f0897151 refactor(core): Remove unused transport datatypes 2020-01-18 21:15:08 +01:00
damijans 3b767a8dd6 allow running multithreading related test when UA_MULTITHREADING is greater then 100 (#3371)
* multithreading related unit tests are not limited to UA_MULTITHREADING level 100

* fix: replaced tabs with spaces
2020-01-16 10:22:22 +01:00
Julius Pfrommer fac9b51a69 refactor(core): Decode OPN message at the client/server level
This removes an ugly indirection and unlocks more simplifications later
on.
2020-01-12 03:05:01 +01:00
Ari Breitkreuz 6382d1ad05 Add Unit Test for discardNewest leading to failed assertion 2019-12-24 08:25:34 +01:00
Andreas Ebner 6d9a36ecbc feat(pubsub) changed PublishedDataSet storage structure from ptr + size to TAILQ within the PubSubManager struct 2019-11-22 15:00:59 +01:00
Andreas Ebner fcefc5d0bc feat(pubsub) changed PubSubConnection storage structure from ptr + size to TAILQ within the PubSubManager struct 2019-11-22 15:00:59 +01:00
Andreas Ebner a1cd155875 feat(pubsub) extended PubSub RT level example, added testcase for PubSub RT levels, fixed memory leaks, moved offset calculation into DSM and NM binary size calculation (signature changed) 2019-11-22 15:00:59 +01:00
Stefan Profanter 92e0e8ca8b fix(fuzz): Temporarily disable run_fuzzer for mdns (produces false positives) 2019-11-22 13:10:16 +01:00
Jonas Green e923698177 Solved issues related to SecurityToken renewal
* previousSecurityToken structure of UA_SecureChannel was not cleared
after generating the new remote symmetric key. This caused a server
to renew the remote key every time a message chunk was received. If
the client requested a renewal of the secure channel and new nonces
were exchanged, but the client continued to use the "old"
SecurityToken for some more message chunks the server generated a
remote key based on the new nonces when it should have used the key
of the current SecurityToken.
* UA_SecureChannelManager_cleanupTimedOut() changed currently used
SecurityToken to the next one if present. According to Part 4,
chapter 5.5.2 OpenSecureChannel the server shall use the existing
SecurityToken until it expires or the server receives a message
secured with the new SecurityToken. Hence, it shouldn't trigg itself
change the SecurityToken.
* Fixed issues in renew channel test cases of the client
2019-11-20 15:50:16 +01:00
Julius Pfrommer 645b29277f feature(server): Don't start server with mismatching ApplicationUri
Also, upgrade to an error warning
2019-11-18 10:25:41 +01:00
Julius Pfrommer 3dce9f5ed5 refactor(server): Simplify the async operations intenally
The server config is simplified a bit. A single timeout is used for the
request. No changes to the public API otherwise.

Full integration tests for the async operations.
2019-11-10 16:50:18 +01:00
Andreas Ebner 3b170d0199 feat(pubsub) added generation of metdata for PDS and DataSetFields 2019-11-09 12:42:02 +01:00
Stefan Profanter 000b2a95c7 ci(fuzz): Error if tcp fuzzing can not be started 2019-11-08 09:12:07 +01:00
Stefan Profanter 0f1192c99a ci(fuzz): Add fuzzing for base64 encoding and decoding 2019-11-07 19:28:33 +01:00
Stefan Profanter cdd7abc6a6 ci(fuzz): Add author to license header 2019-11-07 19:28:33 +01:00
wbitesi 2d5355b7be Async monitored items (#2549)
* Implemented async subscriptions/monitored items

* Extended custom callback to hold UA_Client callback specific data

* Distinguish between user and UA_Client specific callback data
* Memory management for client-specific callback data (deleter)
* Updated current highlevel_async functions to new interface

* Fix: memory issues in async subscriptions/monitored items

clang analyzer memory issues addressed

* Fix codacy errors in async subscription/monitoreditems

* Memory fix: MonitoredItems_CreateData_free(..)

* Memory fix: UA_Client_MonitoredItems_delete_async

Async handler did not copy the request into CustomCallback::clientData

* Fix: portability issues with cppcheck+gcc4.8

* Fix: callback handler for delete_subscription_async was not called

* Added test cases for async subscription functions

* Fix -Werror=c++-compat in async subscription/monitoreditems tests

* Satisfy clang-format for async subscription/monitoreditems implementation

* Rebased to master and applied clang-format again

* remove CustomCallback_new(void)

* Change UA_malloc to UA_calloc when needed

* Remove CustomCallbackDataDeleter and use stack allocation for subscriptions.

Requires the use of a flag to distinguish stack allocated data from
heap allocated data in the subscription/monitored items implementation

* Fix C++-compat warning

* Fix: clang-format for changes

* Fix: uninitialized variable on conditional jump

* Remove all UA_EXPORT occurrences from ua_client_subscriptions

* clang-analyze: fix argument to free() is the address of local variable

clang analyzer cannot infer from
memset(&cc, 0, sizeof(CustomCallback)) that CustomCallback.isAsync is false.
Iadded a __clang_analyzer__ only statement that explicitly sets isAsync to false
using preprocessor macros.

* Bugfix: async monitored items memory leak

* Satisfy clang-analyzer for creation of monitored items
2019-11-06 10:21:20 +01:00
Suriya Narayanan Parthasarathi Vimala 112492f6bb fix(PubSub): Publishing order of multiple DataSetFields
- The order of DSF should be the same while creating and publishing and
   the existing implementation publishes reversely
 - Used TAILQ structure for DSF instead of LIST structure

Signed-off-by: Suriya Narayanan Parthasarathi Vimala <suriyanarayanan.pv@kalycito.com>

Change-Id: I4a32fd0cec5becb0457e4040d8b1d7c64aef9836
2019-11-06 09:50:29 +01:00
Julius Pfrommer c6b6ed85b2 fix(build): Fix an undefined function warning for fuzzing 2019-10-30 14:07:57 +01:00