diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/common/ua_timer.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/common/ua_timer.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/common/ua_timer.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/common/ua_timer.c 2022-06-24 19:01:26.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2017, 2018, 2021 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Stefan Profanter, fortiss GmbH diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/common/ua_timer.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/common/ua_timer.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/common/ua_timer.h 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/common/ua_timer.h 2022-06-24 19:01:26.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2017, 2018, 2021 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Stefan Profanter, fortiss GmbH diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eCos/ua_clock.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eCos/ua_clock.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eCos/ua_clock.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eCos/ua_clock.c 2022-06-24 19:01:26.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2018 (c) Jose Cabral, fortiss GmbH */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix.c 2022-06-24 19:01:26.000000000 +0000 @@ -424,7 +424,7 @@ el->eventLoop.removeCyclicCallback = UA_EventLoopPOSIX_removeCyclicCallback; el->eventLoop.addTimedCallback = UA_EventLoopPOSIX_addTimedCallback; el->eventLoop.addDelayedCallback = UA_EventLoopPOSIX_addDelayedCallback; - + el->eventLoop.registerEventSource = (UA_StatusCode (*)(UA_EventLoop*, UA_EventSource*)) UA_EventLoopPOSIX_registerEventSource; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_epoll.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_epoll.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_epoll.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_epoll.c 2022-06-24 19:01:26.000000000 +0000 @@ -19,7 +19,7 @@ event.events |= EPOLLIN; if(rfd->listenEvents & UA_FDEVENT_OUT) event.events |= EPOLLOUT; - + int err = epoll_ctl(el->epollfd, EPOLL_CTL_ADD, rfd->fd, &event); if(err != 0) { UA_LOG_SOCKET_ERRNO_WRAP( @@ -40,7 +40,7 @@ event.events |= EPOLLIN; if(rfd->listenEvents & UA_FDEVENT_OUT) event.events |= EPOLLOUT; - + int err = epoll_ctl(el->epollfd, EPOLL_CTL_MOD, rfd->fd, &event); if(err != 0) { UA_LOG_SOCKET_ERRNO_WRAP( @@ -107,7 +107,7 @@ } else { revent = UA_FDEVENT_ERR; } - + UA_UNLOCK(&el->elMutex); rfd->callback(rfd->es, rfd, revent); UA_LOCK(&el->elMutex); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_interrupt.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_interrupt.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_interrupt.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_interrupt.c 2022-06-24 19:01:26.000000000 +0000 @@ -126,7 +126,7 @@ if(!rs->active) return; rs->active = false; - + /* Stop receiving the signal on the FD */ UA_EventLoopPOSIX *el = (UA_EventLoopPOSIX *)rs->rfd.es->eventLoop; UA_EventLoopPOSIX_deregisterFD(el, &rs->rfd); @@ -285,7 +285,7 @@ /* Activate if we are already running */ if(pim->im.eventSource.state == UA_EVENTSOURCESTATE_STARTED) activateSignal(rs); - + return UA_STATUSCODE_GOOD; } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_select.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_select.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_select.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_select.c 2022-06-24 19:01:26.000000000 +0000 @@ -65,7 +65,7 @@ el->fds[i] = el->fds[el->fdsSize]; UA_RegisteredFD **fds_tmp = (UA_RegisteredFD**) UA_realloc(el->fds, sizeof(UA_RegisteredFD*) * el->fdsSize); - /* if realloc fails the fds are still in a correct state with + /* if realloc fails the fds are still in a correct state with * possibly lost memory, so failing silently here is ok */ if(fds_tmp) el->fds = fds_tmp; @@ -154,7 +154,7 @@ } else { continue; } - + UA_LOG_DEBUG(el->eventLoop.logger, UA_LOGCATEGORY_EVENTLOOP, "Processing event %u on fd %u", (unsigned)event, (unsigned)fd); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_tcp.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_tcp.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_tcp.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_tcp.c 2022-06-24 19:01:26.000000000 +0000 @@ -359,7 +359,7 @@ "TCP\t| getnameinfo(...) could not resolve the " "hostname (%s)", errno_str)); } - + /* Create the server socket */ UA_FD listenSocket = UA_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if(listenSocket == UA_INVALID_FD) { @@ -907,7 +907,7 @@ UA_StatusCode res = UA_ByteString_allocBuffer(&tcm->rxBuffer, rxBufSize); if(res != UA_STATUSCODE_GOOD) return res; - + /* Set the EventSource to the started state */ cm->eventSource.state = UA_EVENTSOURCESTATE_STARTED; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_udp.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_udp.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/eventloop_posix_udp.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/eventloop_posix_udp.c 2022-06-24 19:01:26.000000000 +0000 @@ -249,7 +249,7 @@ "UDP\t| getnameinfo(...) could not resolve the hostname (%s)", errno_str)); } - + /* Create the server socket */ UA_FD listenSocket = UA_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if(listenSocket == UA_INVALID_FD) { @@ -739,7 +739,7 @@ return UDP_registerListenSockets(cm, NULL, *port, application, context, connectionCallback); } - + /* Iterate over the configured hostnames */ UA_String *hostStrings = (UA_String*)hostNames->data; for(size_t i = 0; i < hostNames->arrayLength; i++) { @@ -800,7 +800,7 @@ UA_StatusCode res = UA_ByteString_allocBuffer(&ucm->rxBuffer, rxBufSize); if(res != UA_STATUSCODE_GOOD) return res; - + /* Set the EventSource to the started state */ cm->eventSource.state = UA_EVENTSOURCESTATE_STARTED; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/freertosLWIP/ua_clock.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/freertosLWIP/ua_clock.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/freertosLWIP/ua_clock.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/freertosLWIP/ua_clock.c 2022-06-24 19:01:26.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2016-2017 (c) Julius Pfrommer, Fraunhofer IOSB * Copyright 2017 (c) Stefan Profanter, fortiss GmbH diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/network_ws.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/network_ws.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/network_ws.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/network_ws.c 2022-06-24 19:01:26.000000000 +0000 @@ -123,7 +123,7 @@ callback_opcua(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len) { struct SessionData *pss = (struct SessionData *)user; - struct VHostData *vhd = + struct VHostData *vhd = (struct VHostData *)lws_protocol_vh_priv_get(lws_get_vhost(wsi), lws_get_protocol(wsi)); @@ -301,7 +301,7 @@ info.server_ssl_cert_mem_len = (unsigned int)layer->certificate.length; info.server_ssl_private_key_mem = layer->privateKey.data; info.server_ssl_private_key_mem_len = (unsigned int)layer->privateKey.length; - + info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT; UA_LOG_INFO(layer->logger, UA_LOGCATEGORY_NETWORK, "Websocket network layer listening using WSS"); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/posix/ua_clock.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/posix/ua_clock.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/posix/ua_clock.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/posix/ua_clock.c 2022-06-24 19:01:26.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2016-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Stefan Profanter, fortiss GmbH diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/vxworks/ua_clock.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/vxworks/ua_clock.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/vxworks/ua_clock.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/vxworks/ua_clock.c 2022-06-24 19:01:26.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2016-2017 (c) Julius Pfrommer, Fraunhofer IOSB * Copyright 2017 (c) Stefan Profanter, fortiss GmbH diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/win32/ua_clock.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/win32/ua_clock.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/arch/win32/ua_clock.c 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/arch/win32/ua_clock.c 2022-06-24 19:01:26.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2016-2017 (c) Julius Pfrommer, Fraunhofer IOSB * Copyright 2017 (c) Stefan Profanter, fortiss GmbH @@ -50,7 +50,7 @@ gmtime_s(&rawtime, &ptm); #else gmtime_s(&ptm, &rawtime); -#endif +#endif // Request that mktime() looksup dst in timezone database ptm.tm_isdst = -1; gmt = mktime(&ptm); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/CMakeLists.txt open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/CMakeLists.txt --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/CMakeLists.txt 2022-06-23 19:04:24.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/CMakeLists.txt 2022-06-24 19:01:26.000000000 +0000 @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.1...3.12) if(UA_BUILD_FUZZING OR UA_BUILD_OSS_FUZZ OR UA_BUILD_FUZZING_CORPUS) -set(OPEN62541_VERSION "v1.3.1-292-ge47a1045") +set(OPEN62541_VERSION "v1.3.1-293-g13af9b86") project(open62541) # We need to have C++ support configured for fuzzing else() project(open62541 C) # Do not look for a C++ compiler diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/debian/changelog open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/debian/changelog --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/debian/changelog 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/debian/changelog 2022-06-24 19:01:27.000000000 +0000 @@ -1,15 +1,15 @@ -open62541 (20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1) impish; urgency=low +open62541 (20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1) impish; urgency=low * Auto build. - -- Launchpad Package Builder Thu, 23 Jun 2022 19:04:25 +0000 + -- Launchpad Package Builder Fri, 24 Jun 2022 19:01:27 +0000 -open62541 (20220623T184559~1.3.1~292~ge47a1045) UNRELEASED; urgency=medium +open62541 (20220624T090700~1.3.1~293~g13af9b86) UNRELEASED; urgency=medium * Full changelog is available here: https://github.com/open62541/open62541/blob/master/CHANGELOG - -- open62541 Team Thu, 23 Jun 2022 18:45:59 -0000 + -- open62541 Team Fri, 24 Jun 2022 09:07:00 -0000 open62541 (1.0~rc1) UNRELEASED; urgency=low diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/debian/git-build-recipe.manifest open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/debian/git-build-recipe.manifest --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/debian/git-build-recipe.manifest 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/debian/git-build-recipe.manifest 2022-06-24 19:01:27.000000000 +0000 @@ -1,2 +1,2 @@ # git-build-recipe format 0.4 deb-version {debversion}~daily -lp:open62541 git-commit:171a0bc48c4b61f50842fff7a2ba7d9e955577e7 +lp:open62541 git-commit:999117a069cbb880a0d444b064461beec5df6264 diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/client_method_async.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/client_method_async.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/client_method_async.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/client_method_async.c 2022-06-24 19:01:27.000000000 +0000 @@ -43,7 +43,7 @@ "---Method call was successful, returned %lu values.\n", (unsigned long)response->results[i].outputArgumentsSize); } - + /* We initiate the MultiCall (2 methods within one CallRequest) */ InitCallMulti(client); } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/common.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/common.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/common.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/common.h 2022-06-24 19:01:27.000000000 +0000 @@ -41,7 +41,7 @@ FILE *fp = NULL; fp = fopen(path, "wb"); - if(fp == NULL) + if(fp == NULL) return UA_STATUSCODE_BADINTERNALERROR; for(UA_UInt32 bufIndex = 0; bufIndex < buffer.length; bufIndex++) { diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/custom_datatype/client_types_custom.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/custom_datatype/client_types_custom.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/custom_datatype/client_types_custom.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/custom_datatype/client_types_custom.c 2022-06-24 19:01:27.000000000 +0000 @@ -32,15 +32,15 @@ UA_Client_delete(client); return (int)retval; } - + UA_Variant value; /* Variants can hold scalar values and arrays of any type */ UA_Variant_init(&value); - + UA_NodeId nodeId = UA_NODEID_STRING(1, "3D.Point"); retval = UA_Client_readValueAttribute(client, nodeId, &value); - + if(retval == UA_STATUSCODE_GOOD) { Point *p = (Point *)value.data; printf("Point = %f, %f, %f \n", p->x, p->y, p->z); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/encryption/client_encryption.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/encryption/client_encryption.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/encryption/client_encryption.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/encryption/client_encryption.c 2022-06-24 19:01:27.000000000 +0000 @@ -53,7 +53,7 @@ UA_Client_delete(client); return EXIT_FAILURE; } - + UA_ByteString_clear(&certificate); UA_ByteString_clear(&privateKey); for(size_t deleteCount = 0; deleteCount < trustListSize; deleteCount++) { diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/nodeset/server_nodeset.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/nodeset/server_nodeset.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/nodeset/server_nodeset.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/nodeset/server_nodeset.c 2022-06-24 19:01:27.000000000 +0000 @@ -23,7 +23,7 @@ int main(int argc, char** argv) { signal(SIGINT, stopHandler); signal(SIGTERM, stopHandler); - + UA_Server *server = UA_Server_new(); UA_ServerConfig_setDefault(UA_Server_getConfig(server)); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/monitoring/server_pubsub_subscribe_custom_monitoring.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/monitoring/server_pubsub_subscribe_custom_monitoring.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/monitoring/server_pubsub_subscribe_custom_monitoring.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/monitoring/server_pubsub_subscribe_custom_monitoring.c 2022-06-24 19:01:27.000000000 +0000 @@ -2,17 +2,17 @@ * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */ /** - * This example can be used to receive and display values that are published - * by tutorial_pubsub_publish example in the TargetVariables of Subscriber + * This example can be used to receive and display values that are published + * by tutorial_pubsub_publish example in the TargetVariables of Subscriber * Information Model. - * + * * Additionally this example shows the usage of the PubSub monitoring implementation. - * The application can provide the pubsubStateChangeCallback to get notifications - * about specific PubSub state changes or timeouts. Currently only the + * The application can provide the pubsubStateChangeCallback to get notifications + * about specific PubSub state changes or timeouts. Currently only the * MessageReceiveTimeout handling of a DataSetReader is implemented. - * Stop the tutorial_pubsub_publish example during operation to trigger the + * Stop the tutorial_pubsub_publish example during operation to trigger the * MessageReceiveTimeout and check the callback invocation. - * + * * Per default the monitoring backend is provided by the open62541 sdk. * An application can provide it's own monitoring backend (e.g. linux timers), * by setting the monitoring callbacks. This option can be tested with @@ -55,9 +55,9 @@ UA_ServerCallback callback; } TMonitoringParams; -/* In this example we only configure 1 DataSetReader and therefore only provide 1 +/* In this example we only configure 1 DataSetReader and therefore only provide 1 data structure for monitoring params. This example only works with 1 DataSetReader for simplicity's sake. -If more DataSetReaders shall be configured one can create a new data structure at every pubSubComponent_createMonitoring() call and +If more DataSetReaders shall be configured one can create a new data structure at every pubSubComponent_createMonitoring() call and administer them with a list/map/vector .... */ TMonitoringParams monitoringParams; @@ -259,7 +259,7 @@ /* Provide a callback to get notifications about specific PubSub state changes or timeouts. Currently only the MessageReceiveTimeout of the subscriber is supported. - Stop the tutorial_pubsub_publish example during operation to trigger the MessageReceiveTimeout and + Stop the tutorial_pubsub_publish example during operation to trigger the MessageReceiveTimeout and check the callback invocation here */ static void pubsubStateChangeCallback(UA_Server *server, @@ -271,7 +271,7 @@ UA_ServerConfig *config = UA_Server_getConfig(server); UA_UInt32 *stateChangeCnt = (UA_UInt32 *)config->context; (*stateChangeCnt)++; - + if (pubsubComponentId == 0) { UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "pubsubStateChangeCallback(): Null pointer error. Internal error"); return; @@ -295,7 +295,7 @@ /* Custom monitoring backend implementation: only 1 DataSetReader is supported */ static UA_StatusCode -pubSubComponent_createMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +pubSubComponent_createMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data, UA_ServerCallback callback) { if ((!server) || (!data)) { return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -326,7 +326,7 @@ } static UA_StatusCode -pubSubComponent_startMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +pubSubComponent_startMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data) { if ((!server) || (!data)) { return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -352,7 +352,7 @@ } static UA_StatusCode -pubSubComponent_stopMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +pubSubComponent_stopMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data) { if ((!server) || (!data)) { return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -378,7 +378,7 @@ } static UA_StatusCode -pubSubComponent_updateMonitoringInterval(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +pubSubComponent_updateMonitoringInterval(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data) { if ((!server) || (!data)) { @@ -413,7 +413,7 @@ } static UA_StatusCode -pubSubComponent_deleteMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +pubSubComponent_deleteMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data) { if ((!server) || (!data)) { return UA_STATUSCODE_BADINVALIDARGUMENT; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/pubsub_subscribe_standalone.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/pubsub_subscribe_standalone.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/pubsub_subscribe_standalone.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/pubsub_subscribe_standalone.c 2022-06-24 19:01:27.000000000 +0000 @@ -145,6 +145,6 @@ retval = subscriberListen(psc); psc->close(psc); - + return 0; } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/server_pubsub_file_configuration.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/server_pubsub_file_configuration.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/server_pubsub_file_configuration.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/server_pubsub_file_configuration.c 2022-06-24 19:01:27.000000000 +0000 @@ -46,7 +46,7 @@ break; default: - usage_info(); + usage_info(); } /* 2. Initialize Server */ @@ -58,7 +58,7 @@ UA_VariableAttributes attr; UA_NodeId parentReferenceNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES); UA_NodeId pubSubVariableObjectId = UA_NODEID_STRING(1, "PubSubObject"); - + UA_ObjectAttributes oAttr = UA_ObjectAttributes_default; oAttr.displayName = UA_LOCALIZEDTEXT("en-US", "PubSubVariables"); UA_Server_addObjectNode(server, pubSubVariableObjectId, @@ -138,10 +138,10 @@ statusCode = UA_PubSubManager_getEncodedPubSubConfiguration(server, &buffer); if(statusCode == UA_STATUSCODE_GOOD) statusCode = writeFile(argv[2], buffer); - - if(statusCode != UA_STATUSCODE_GOOD) + + if(statusCode != UA_STATUSCODE_GOOD) UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "Saving PubSub configuration to file failed. StatusCode: 0x%x\n", statusCode); - + UA_ByteString_clear(&buffer); } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/server_pubsub_publisher_iop.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/server_pubsub_publisher_iop.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/server_pubsub_publisher_iop.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/server_pubsub_publisher_iop.c 2022-06-24 19:01:27.000000000 +0000 @@ -672,7 +672,7 @@ UA_Variant_setScalar(&tmpVari, &ds2DoubleVal, &UA_TYPES[UA_TYPES_DOUBLE]); UA_Server_writeValue(server, ds2DoubleId, tmpVari); - // String + // String UA_Variant_init(&tmpVari); ds2StringIndex++; if(ds2StringIndex >= ds2StringArrayLen) @@ -681,7 +681,7 @@ UA_Variant_setScalar(&tmpVari, &ds2StringArray[ds2StringIndex], &UA_TYPES[UA_TYPES_STRING]); UA_Server_writeValue(server, ds2StringId, tmpVari); - // ByteString + // ByteString UA_Variant_init(&tmpVari); UA_ByteString bs; UA_ByteString_init(&bs); @@ -693,7 +693,7 @@ UA_Server_writeValue(server, ds2ByteStringId, tmpVari); UA_ByteString_clear(&bs); - // Guid + // Guid UA_Variant_init(&tmpVari); UA_Guid g = UA_Guid_random(); UA_Variant_setScalar(&tmpVari, &g, &UA_TYPES[UA_TYPES_GUID]); @@ -730,7 +730,7 @@ #endif addPubSubConnection(server, transportProfile, networkAddressUrl); - + /* Create a PublishedDataSet based on a PublishedDataSetConfig. */ UA_PublishedDataSetConfig publishedDataSetConfig; publishedDataSetConfig.publishedDataSetType = UA_PUBSUB_DATASET_PUBLISHEDITEMS; @@ -757,13 +757,13 @@ UA_Server_setWriterGroupOperational(server, writerGroupIdent); /* Create a new Writer and connect it with an existing PublishedDataSet */ - // DataSetWriter ID 1 with Variant Encoding + // DataSetWriter ID 1 with Variant Encoding UA_DataSetWriterConfig dataSetWriterConfig; memset(&dataSetWriterConfig, 0, sizeof(UA_DataSetWriterConfig)); dataSetWriterConfig.name = UA_STRING("DataSet 1 DataSetWriter"); dataSetWriterConfig.dataSetWriterId = 1; //The creation of delta messages is configured in the following line. Value - // 0 -> no delta messages are created. + // 0 -> no delta messages are created. dataSetWriterConfig.keyFrameCount = 10; UA_NodeId writerIdentifier; @@ -788,7 +788,7 @@ dataSetWriterConfig2.name = UA_STRING("DataSet 2 DataSetWriter"); dataSetWriterConfig2.dataSetWriterId = 2; //The creation of delta messages is configured in the following line. Value - // 0 -> no delta messages are created. + // 0 -> no delta messages are created. dataSetWriterConfig2.keyFrameCount = 10; UA_NodeId writerIdentifier2; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/tutorial_pubsub_mqtt_publish.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/tutorial_pubsub_mqtt_publish.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub/tutorial_pubsub_mqtt_publish.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub/tutorial_pubsub_mqtt_publish.c 2022-06-24 19:01:27.000000000 +0000 @@ -206,7 +206,7 @@ /* decide whether to use JSON or UADP encoding*/ #ifdef UA_ENABLE_JSON_ENCODING UA_JsonWriterGroupMessageDataType *Json_writerGroupMessage; - + if(useJson) { writerGroupConfig.encodingMimeType = UA_PUBSUB_ENCODING_JSON; writerGroupConfig.messageSettings.encoding = UA_EXTENSIONOBJECT_DECODED; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_loopback_single_thread.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_loopback_single_thread.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_loopback_single_thread.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_loopback_single_thread.c 2022-06-24 19:01:27.000000000 +0000 @@ -113,8 +113,8 @@ #endif #define CLOCKID CLOCK_MONOTONIC #define ETH_TRANSPORT_PROFILE "http://opcfoundation.org/UA-Profile/Transport/pubsub-eth-uadp" -#define UDP_TRANSPORT_PROFILE "http://opcfoundation.org/UA-Profile/Transport/pubsub-udp-uadp" - +#define UDP_TRANSPORT_PROFILE "http://opcfoundation.org/UA-Profile/Transport/pubsub-udp-uadp" + /* If the Hardcoded publisher/subscriber MAC addresses need to be changed, * change PUBLISHING_MAC_ADDRESS and SUBSCRIBING_MAC_ADDRESS */ @@ -870,7 +870,7 @@ #endif } - /* *runningPub variable made false and send to the publisher application which is running in another node + /* *runningPub variable made false and send to the publisher application which is running in another node which will close the application during blocking socket condition */ if (signalTerm == UA_TRUE) { #ifdef TWO_WAY_COMMUNICATION diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_publisher.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_publisher.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_publisher.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_publisher.c 2022-06-24 19:01:27.000000000 +0000 @@ -1726,28 +1726,28 @@ networkAddressUrlSub.networkInterface = UA_STRING(interface); networkAddressUrlSub.url = UA_STRING(subMacAddress); #endif - + if(enableCsvLog) { #if defined(PUBLISHER) fpPublisher = fopen(filePublishedData, "w"); #endif - + #if defined(SUBSCRIBER) fpSubscriber = fopen(fileSubscribedData, "w"); #endif } - + /* It is possible to use multiple PubSubTransportLayers on runtime. * The correct factory is selected on runtime by the standard defined * PubSub TransportProfileUri's. */ - + #if defined (PUBLISHER) UA_ServerConfig_addPubSubTransportLayer(config, UA_PubSubTransportLayerEthernet()); #endif - + /* Create variable nodes for publisher and subscriber in address space */ addServerNodes(server); - + #if defined(PUBLISHER) addPubSubConnection(server, &networkAddressUrlPub); addPublishedDataSet(server); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_publisher_multiple_thread.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_publisher_multiple_thread.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_publisher_multiple_thread.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/pubsub_realtime/pubsub_TSN_publisher_multiple_thread.c 2022-06-24 19:01:27.000000000 +0000 @@ -584,7 +584,7 @@ * Create connection, writergroup, datasetwriter and publisheddataset for Publisher thread. */ static void -addPubSubConnection(UA_Server *server, UA_String *transportProfile, +addPubSubConnection(UA_Server *server, UA_String *transportProfile, UA_NetworkAddressUrlDataType *networkAddressUrlPub){ /* Details about the connection configuration and handling are located * in the pubsub connection tutorial */ @@ -832,7 +832,7 @@ updateMeasurementsPublisher(dataModificationTime, *pubCounterData, monotonicOffsetValue); } - /* *runningPub variable made false and send to the publisher application which is running in another node + /* *runningPub variable made false and send to the publisher application which is running in another node which will close the application during blocking socket condition */ if (signalTerm == UA_TRUE) { *runningPub = UA_FALSE; @@ -866,7 +866,7 @@ } /** - * userApplicationSubscriber function is used to read the data from Information Model for the Subscriber and + * userApplicationSubscriber function is used to read the data from Information Model for the Subscriber and * writes the updated counterdata in distinct csv files **/ void userApplicationSubscriber(UA_UInt64 monotonicOffsetValue) { @@ -1484,7 +1484,7 @@ UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND,"\nTotal Packet Loss Count of publisher application :%"PRIu64"\n", \ threadArgPubSub1->packetLossCount); UA_Server_unfreezeReaderGroupConfiguration(server, readerGroupIdentifier); -#endif +#endif returnValue = pthread_join(pubAppThreadID, NULL); if (returnValue != 0) UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND,"\nPthread Join Failed for pubApp thread:%d\n", returnValue); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/server_inheritance.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/server_inheritance.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/server_inheritance.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/server_inheritance.c 2022-06-24 19:01:27.000000000 +0000 @@ -198,7 +198,7 @@ UA_Server_addReference(server, UA_NODEID_NUMERIC(1, 30002), UA_NODEID_NUMERIC(0, UA_NS0ID_HASMODELLINGRULE), UA_EXPANDEDNODEID_NUMERIC(0, UA_NS0ID_MODELLINGRULE_MANDATORY), true); - + /* Now we want to inherit all the mandatory children for LampGreen and don't care about the node ids. * These will be automatically generated. This will internally call the _begin and _finish methods */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/server_instantiation.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/server_instantiation.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/server_instantiation.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/server_instantiation.c 2022-06-24 19:01:27.000000000 +0000 @@ -21,7 +21,7 @@ UA_ServerConfig_setDefault(UA_Server_getConfig(server)); /* Create a rudimentary objectType - * + * * BaseObjectType * | * +- (OT) MamalType @@ -29,7 +29,7 @@ * + (OT) DogType * | * + (V) Name - */ + */ UA_StatusCode retval; UA_ObjectTypeAttributes otAttr = UA_ObjectTypeAttributes_default; otAttr.description = UA_LOCALIZEDTEXT("en-US", "A mamal"); @@ -67,7 +67,7 @@ /* Instatiate a dog named bello: * (O) Objects * + O Bello - * + Age + * + Age * + Name */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/server_settimestamp.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/server_settimestamp.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/server_settimestamp.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/server_settimestamp.c 2022-06-24 19:01:27.000000000 +0000 @@ -51,7 +51,7 @@ UA_VariableAttributes Attr; UA_Variant_init(&Attr.value); UA_Variant_setScalar(&Attr.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]); - + // Use a more detailed write function than UA_Server_writeValue UA_WriteValue wv; UA_WriteValue_init(&wv); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/tutorial_server_events.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/tutorial_server_events.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/tutorial_server_events.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/tutorial_server_events.c 2022-06-24 19:01:27.000000000 +0000 @@ -108,7 +108,7 @@ UA_NODEID_NUMERIC(0, UA_NS0ID_SERVER), NULL, UA_TRUE); if(retval != UA_STATUSCODE_GOOD) - UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, + UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "Triggering event failed. StatusCode %s", UA_StatusCode_name(retval)); return retval; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/tutorial_server_firststeps.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/tutorial_server_firststeps.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/examples/tutorial_server_firststeps.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/examples/tutorial_server_firststeps.c 2022-06-24 19:01:27.000000000 +0000 @@ -83,7 +83,7 @@ * as an exchangeable plugin. But don't worry. *open62541* provides plugin * implementations for most platforms and sensible default configurations * out-of-the-box. - * + * * In the above server code, we simply take the default server configuration and * add a single TCP network layer that is listerning on port 4840. * diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/include/open62541/network_tcp.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/include/open62541/network_tcp.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/include/open62541/network_tcp.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/include/open62541/network_tcp.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2016 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2020 (c) HMS Industrial Networks AB (Author: Jonas Green) diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/include/open62541/network_ws.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/include/open62541/network_ws.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/include/open62541/network_ws.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/include/open62541/network_ws.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2016 (c) Fraunhofer IOSB (Author: Julius Pfrommer) */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/include/open62541/plugin/eventloop.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/include/open62541/plugin/eventloop.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/include/open62541/plugin/eventloop.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/include/open62541/plugin/eventloop.h 2022-06-24 19:01:27.000000000 +0000 @@ -173,7 +173,7 @@ * Event Sources are attached to an EventLoop. Typically the event source and * the EventLoop are developed together and share a private API in the * background. */ - + typedef enum { UA_EVENTSOURCESTATE_FRESH = 0, UA_EVENTSOURCESTATE_STOPPED, /* Registered but stopped */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/include/open62541/server.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/include/open62541/server.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/include/open62541/server.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/include/open62541/server.h 2022-06-24 19:01:27.000000000 +0000 @@ -1661,7 +1661,7 @@ UA_TwoStateVariableCallbackType callbackType); /* Delete a condition from the address space and the internal lists. - * + * * @param server The server object * @param condition The NodeId of the node representation of the Condition Instance * @param conditionSource The NodeId of the node representation of the Condition Source diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/securitypolicy_mbedtls_common.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/securitypolicy_mbedtls_common.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/securitypolicy_mbedtls_common.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/securitypolicy_mbedtls_common.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2019 (c) Fraunhofer IOSB (Author: Julius Pfrommer) */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/securitypolicy_pubsub_aes128ctr.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/securitypolicy_pubsub_aes128ctr.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/securitypolicy_pubsub_aes128ctr.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/securitypolicy_pubsub_aes128ctr.c 2022-06-24 19:01:27.000000000 +0000 @@ -203,7 +203,7 @@ (encryptingKey && encryptingKey->length != UA_AES128CTR_KEY_LENGTH) || (keyNonce && keyNonce->length != UA_AES128CTR_KEYNONCE_LENGTH)) return UA_STATUSCODE_BADSECURITYCHECKSFAILED; - + /* Allocate the channel context */ PUBSUB_AES128CTR_ChannelContext *cc = (PUBSUB_AES128CTR_ChannelContext *) UA_calloc(1, sizeof(PUBSUB_AES128CTR_ChannelContext)); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_pki_mbedtls.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_pki_mbedtls.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_pki_mbedtls.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_pki_mbedtls.c 2022-06-24 19:01:27.000000000 +0000 @@ -107,7 +107,7 @@ memcpy(buf, folder->data, folder->length); buf[folder->length] = 0; - + DIR *dir = opendir(buf); if(!dir) return UA_STATUSCODE_BADINTERNALERROR; @@ -222,7 +222,7 @@ char errBuff[300]; mbedtls_strerror(err, errBuff, 300); UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, - "Failed to load certificate from %s, mbedTLS error: %s (error code: %d)", + "Failed to load certificate from %s, mbedTLS error: %s (error code: %d)", f, errBuff, err); internalErrorFlag = 1; } @@ -239,7 +239,7 @@ static UA_StatusCode certificateVerification_allow(void *verificationContext, const UA_ByteString *certificate) { - return UA_STATUSCODE_GOOD; + return UA_STATUSCODE_GOOD; } static UA_StatusCode diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_securitypolicy_basic128rsa15.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_securitypolicy_basic128rsa15.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_securitypolicy_basic128rsa15.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_securitypolicy_basic128rsa15.c 2022-06-24 19:01:27.000000000 +0000 @@ -7,7 +7,7 @@ * Copyright 2018 (c) HMS Industrial Networks AB (Author: Jonas Green) * Copyright 2020 (c) Wind River Systems, Inc. * Copyright 2020 (c) basysKom GmbH - * + * */ #include diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_securitypolicy_basic256.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_securitypolicy_basic256.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_securitypolicy_basic256.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/mbedtls/ua_securitypolicy_basic256.c 2022-06-24 19:01:27.000000000 +0000 @@ -213,7 +213,7 @@ return UA_STATUSCODE_BADSECURITYCHECKSFAILED; Basic256_PolicyContext *pc = cc->policyContext; - + unsigned char mac[UA_SHA1_LENGTH]; mbedtls_hmac(&pc->sha1MdContext, &cc->remoteSymSigningKey, message, mac); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/securitypolicy_openssl_common.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/securitypolicy_openssl_common.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/securitypolicy_openssl_common.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/securitypolicy_openssl_common.c 2022-06-24 19:01:27.000000000 +0000 @@ -515,7 +515,7 @@ unsigned char buf[SHA256_DIGEST_LENGTH] = {0}; UA_ByteString mac = {SHA256_DIGEST_LENGTH, buf}; - if (HMAC (EVP_sha256(), key->data, (int) key->length, message->data, message->length, + if (HMAC (EVP_sha256(), key->data, (int) key->length, message->data, message->length, mac.data, (unsigned int *) &mac.length) == NULL) { return UA_STATUSCODE_BADINTERNALERROR; } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/securitypolicy_openssl_common.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/securitypolicy_openssl_common.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/securitypolicy_openssl_common.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/securitypolicy_openssl_common.h 2022-06-24 19:01:27.000000000 +0000 @@ -38,20 +38,20 @@ UA_Openssl_RSA_Oaep_Decrypt(UA_ByteString *data, EVP_PKEY *privateKey); UA_StatusCode -UA_Openssl_RSA_OAEP_Encrypt(UA_ByteString *data, /* The data that is encrypted. - The encrypted data will overwrite +UA_Openssl_RSA_OAEP_Encrypt(UA_ByteString *data, /* The data that is encrypted. + The encrypted data will overwrite the data that was supplied. */ size_t paddingSize, X509 *publicX509); -UA_StatusCode +UA_StatusCode UA_Openssl_Random_Key_PSHA256_Derive(const UA_ByteString *secret, - const UA_ByteString *seed, + const UA_ByteString *seed, UA_ByteString *out); -UA_StatusCode +UA_StatusCode UA_Openssl_RSA_Public_GetKeyLength(X509 *publicKeyX509, UA_Int32 *keyLen); -UA_StatusCode +UA_StatusCode UA_Openssl_RSA_PKCS1_V15_SHA256_Sign(const UA_ByteString *data, EVP_PKEY *privateKey, UA_ByteString *outSignature); @@ -68,18 +68,18 @@ UA_StatusCode UA_OpenSSL_AES_256_CBC_Decrypt(const UA_ByteString *iv, - const UA_ByteString *key, + const UA_ByteString *key, UA_ByteString *data /* [in/out]*/); UA_StatusCode UA_OpenSSL_AES_256_CBC_Encrypt(const UA_ByteString *iv, - const UA_ByteString *key, + const UA_ByteString *key, UA_ByteString *data /* [in/out]*/); -UA_StatusCode +UA_StatusCode UA_OpenSSL_X509_compare(const UA_ByteString *cert, const X509 *b); -UA_StatusCode +UA_StatusCode UA_Openssl_RSA_Private_GetKeyLength(EVP_PKEY *privateKey, UA_Int32 *keyLen) ; @@ -88,13 +88,13 @@ X509 *publicKeyX509, const UA_ByteString *signature); -UA_StatusCode +UA_StatusCode UA_Openssl_RSA_PKCS1_V15_SHA1_Sign(const UA_ByteString *message, EVP_PKEY *privateKey, UA_ByteString *outSignature); -UA_StatusCode +UA_StatusCode UA_Openssl_Random_Key_PSHA1_Derive(const UA_ByteString *secret, - const UA_ByteString *seed, + const UA_ByteString *seed, UA_ByteString *out); UA_StatusCode UA_OpenSSL_HMAC_SHA1_Verify(const UA_ByteString *message, @@ -107,22 +107,22 @@ UA_ByteString *signature); UA_StatusCode -UA_Openssl_RSA_PKCS1_V15_Decrypt(UA_ByteString *data, +UA_Openssl_RSA_PKCS1_V15_Decrypt(UA_ByteString *data, EVP_PKEY *privateKey); UA_StatusCode -UA_Openssl_RSA_PKCS1_V15_Encrypt(UA_ByteString *data, +UA_Openssl_RSA_PKCS1_V15_Encrypt(UA_ByteString *data, size_t paddingSize, X509 *publicX509); UA_StatusCode UA_OpenSSL_AES_128_CBC_Decrypt(const UA_ByteString *iv, - const UA_ByteString *key, + const UA_ByteString *key, UA_ByteString *data /* [in/out]*/); UA_StatusCode UA_OpenSSL_AES_128_CBC_Encrypt(const UA_ByteString *iv, - const UA_ByteString *key, + const UA_ByteString *key, UA_ByteString *data /* [in/out]*/); EVP_PKEY * diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_aes128sha256rsaoaep.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_aes128sha256rsaoaep.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_aes128sha256rsaoaep.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_aes128sha256rsaoaep.c 2022-06-24 19:01:27.000000000 +0000 @@ -94,7 +94,7 @@ Policy_Context_Aes128Sha256RsaOaep *pc = (Policy_Context_Aes128Sha256RsaOaep *)policy->policyContext; if (pc == NULL) { - return; + return; } EVP_PKEY_free(pc->localPrivateKey); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic128rsa15.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic128rsa15.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic128rsa15.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic128rsa15.c 2022-06-24 19:01:27.000000000 +0000 @@ -31,23 +31,23 @@ } Policy_Context_Basic128Rsa15; typedef struct { - UA_ByteString localSymSigningKey; - UA_ByteString localSymEncryptingKey; - UA_ByteString localSymIv; + UA_ByteString localSymSigningKey; + UA_ByteString localSymEncryptingKey; + UA_ByteString localSymIv; UA_ByteString remoteSymSigningKey; UA_ByteString remoteSymEncryptingKey; UA_ByteString remoteSymIv; Policy_Context_Basic128Rsa15 * policyContext; UA_ByteString remoteCertificate; - X509 * remoteCertificateX509; + X509 * remoteCertificateX509; } Channel_Context_Basic128Rsa15; -static UA_StatusCode +static UA_StatusCode UA_Policy_Basic128Rsa15_New_Context (UA_SecurityPolicy * securityPolicy, const UA_ByteString localPrivateKey, const UA_Logger * logger) { - Policy_Context_Basic128Rsa15 * context = (Policy_Context_Basic128Rsa15 *) + Policy_Context_Basic128Rsa15 * context = (Policy_Context_Basic128Rsa15 *) UA_malloc (sizeof (Policy_Context_Basic128Rsa15)); if (context == NULL) { return UA_STATUSCODE_BADOUTOFMEMORY; @@ -67,14 +67,14 @@ if (retval != UA_STATUSCODE_GOOD) { EVP_PKEY_free(context->localPrivateKey); UA_free (context); - return retval; + return retval; } context->logger = logger; securityPolicy->policyContext = context; return UA_STATUSCODE_GOOD; -} +} static void UA_Policy_Basic128Rsa15_Clear_Context (UA_SecurityPolicy *policy) { @@ -83,29 +83,29 @@ } UA_ByteString_clear(&policy->localCertificate); - Policy_Context_Basic128Rsa15 * ctx = (Policy_Context_Basic128Rsa15 *) policy->policyContext; + Policy_Context_Basic128Rsa15 * ctx = (Policy_Context_Basic128Rsa15 *) policy->policyContext; if (ctx == NULL) { - return; + return; } /* delete all allocated members in the context */ EVP_PKEY_free(ctx->localPrivateKey); UA_ByteString_clear(&ctx->localCertThumbprint); - UA_free (ctx); + UA_free (ctx); return; } /* create the channel context */ -static UA_StatusCode +static UA_StatusCode UA_ChannelModule_Basic128Rsa15_New_Context (const UA_SecurityPolicy * securityPolicy, const UA_ByteString * remoteCertificate, void ** channelContext) { - if (securityPolicy == NULL || remoteCertificate == NULL || + if (securityPolicy == NULL || remoteCertificate == NULL || channelContext == NULL) { - return UA_STATUSCODE_BADINTERNALERROR; + return UA_STATUSCODE_BADINTERNALERROR; } Channel_Context_Basic128Rsa15 * context = (Channel_Context_Basic128Rsa15 *) UA_malloc (sizeof (Channel_Context_Basic128Rsa15)); @@ -120,7 +120,7 @@ UA_ByteString_init(&context->remoteSymEncryptingKey); UA_ByteString_init(&context->remoteSymIv); - UA_StatusCode retval = UA_copyCertificate (&context->remoteCertificate, + UA_StatusCode retval = UA_copyCertificate (&context->remoteCertificate, remoteCertificate); if (retval != UA_STATUSCODE_GOOD) { UA_free (context); @@ -130,18 +130,18 @@ /* decode to X509 */ context->remoteCertificateX509 = UA_OpenSSL_LoadCertificate(&context->remoteCertificate); if (context->remoteCertificateX509 == NULL) { - UA_ByteString_clear (&context->remoteCertificate); + UA_ByteString_clear (&context->remoteCertificate); UA_free (context); return UA_STATUSCODE_BADCERTIFICATECHAININCOMPLETE; } - context->policyContext = (Policy_Context_Basic128Rsa15 *) + context->policyContext = (Policy_Context_Basic128Rsa15 *) (securityPolicy->policyContext); *channelContext = context; - UA_LOG_INFO (securityPolicy->logger, - UA_LOGCATEGORY_SECURITYPOLICY, + UA_LOG_INFO (securityPolicy->logger, + UA_LOGCATEGORY_SECURITYPOLICY, "The Basic128Rsa15 security policy channel with openssl is created."); return UA_STATUSCODE_GOOD; @@ -149,24 +149,24 @@ /* delete the channel context */ -static void +static void UA_ChannelModule_Basic128Rsa15_Delete_Context (void * channelContext) { if (channelContext != NULL) { Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; - X509_free (cc->remoteCertificateX509); - UA_ByteString_clear (&cc->remoteCertificate); + X509_free (cc->remoteCertificateX509); + UA_ByteString_clear (&cc->remoteCertificate); UA_ByteString_clear (&cc->localSymSigningKey); UA_ByteString_clear (&cc->localSymEncryptingKey); UA_ByteString_clear (&cc->localSymIv); UA_ByteString_clear (&cc->remoteSymSigningKey); UA_ByteString_clear (&cc->remoteSymEncryptingKey); UA_ByteString_clear (&cc->remoteSymIv); - UA_LOG_INFO (cc->policyContext->logger, - UA_LOGCATEGORY_SECURITYPOLICY, - "The Basic128Rsa15 security policy channel with openssl is deleted."); + UA_LOG_INFO (cc->policyContext->logger, + UA_LOGCATEGORY_SECURITYPOLICY, + "The Basic128Rsa15 security policy channel with openssl is deleted."); - UA_free (cc); + UA_free (cc); } } @@ -249,7 +249,7 @@ return UA_STATUSCODE_BADINVALIDARGUMENT; } - const Channel_Context_Basic128Rsa15 * cc = + const Channel_Context_Basic128Rsa15 * cc = (const Channel_Context_Basic128Rsa15 *) channelContext; return UA_OpenSSL_X509_compare (certificate, cc->remoteCertificateX509); } @@ -270,12 +270,12 @@ /* Generates a thumbprint for the specified certificate */ -static UA_StatusCode +static UA_StatusCode UA_Asy_Basic128Rsa15_makeCertificateThumbprint (const UA_SecurityPolicy * securityPolicy, const UA_ByteString * certificate, UA_ByteString * thumbprint) { - return UA_Openssl_X509_GetCertificateThumbprint (certificate, - thumbprint, false); + return UA_Openssl_X509_GetCertificateThumbprint (certificate, + thumbprint, false); } static size_t @@ -287,10 +287,10 @@ const Channel_Context_Basic128Rsa15 * cc = (const Channel_Context_Basic128Rsa15 *) channelContext; UA_Int32 keyLen = 0; UA_Openssl_RSA_Public_GetKeyLength (cc->remoteCertificateX509, &keyLen); - return (size_t) keyLen; + return (size_t) keyLen; } -static size_t +static size_t UA_AsySig_Basic128Rsa15_getLocalSignatureSize (const void * channelContext) { if (channelContext == NULL) { return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -301,31 +301,31 @@ UA_Int32 keyLen = 0; UA_Openssl_RSA_Private_GetKeyLength (pc->localPrivateKey, &keyLen); - return (size_t) keyLen; + return (size_t) keyLen; } -static UA_StatusCode -UA_AsySig_Basic128Rsa15_Verify (void * channelContext, +static UA_StatusCode +UA_AsySig_Basic128Rsa15_Verify (void * channelContext, const UA_ByteString * message, const UA_ByteString * signature) { - if (message == NULL || signature == NULL || + if (message == NULL || signature == NULL || channelContext == NULL) { return UA_STATUSCODE_BADINVALIDARGUMENT; } Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; - UA_StatusCode retval = UA_OpenSSL_RSA_PKCS1_V15_SHA1_Verify (message, + UA_StatusCode retval = UA_OpenSSL_RSA_PKCS1_V15_SHA1_Verify (message, cc->remoteCertificateX509, signature); return retval; } static UA_StatusCode -UA_AsySig_Basic128Rsa15_Sign (void * channelContext, +UA_AsySig_Basic128Rsa15_Sign (void * channelContext, const UA_ByteString * message, UA_ByteString * signature) { if (channelContext == NULL || message == NULL || signature == NULL) { - return UA_STATUSCODE_BADINVALIDARGUMENT; + return UA_STATUSCODE_BADINVALIDARGUMENT; } const Channel_Context_Basic128Rsa15 * cc = (const Channel_Context_Basic128Rsa15 *) channelContext; @@ -345,7 +345,7 @@ return (size_t) keyLen - UA_SECURITYPOLICY_BASIC128RSA15_RSAPADDING_LEN; } -static size_t +static size_t UA_AsymEn_Basic128Rsa15_getRemoteBlockSize (const void *channelContext) { if (channelContext == NULL) { return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -368,7 +368,7 @@ return (size_t) keyLen * 8; } -static size_t +static size_t UA_AsymEn_Basic128Rsa15_getLocalKeyLength (const void *channelContext) { if (channelContext == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -377,10 +377,10 @@ Policy_Context_Basic128Rsa15 *pc = cc->policyContext; UA_Int32 keyLen = 0; UA_Openssl_RSA_Private_GetKeyLength (pc->localPrivateKey, &keyLen); - return (size_t) keyLen * 8; + return (size_t) keyLen * 8; } -static UA_StatusCode +static UA_StatusCode UA_AsymEn_Basic128Rsa15_Decrypt (void * channelContext, UA_ByteString * data) { if (channelContext == NULL || data == NULL) { @@ -388,19 +388,19 @@ } Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; - UA_StatusCode ret = UA_Openssl_RSA_PKCS1_V15_Decrypt (data, + UA_StatusCode ret = UA_Openssl_RSA_PKCS1_V15_Decrypt (data, cc->policyContext->localPrivateKey); - return ret; + return ret; } static UA_StatusCode UA_AsymEn_Basic128Rsa15_Encrypt (void * channelContext, UA_ByteString * data) { if (channelContext == NULL || data == NULL) - return UA_STATUSCODE_BADINVALIDARGUMENT; + return UA_STATUSCODE_BADINVALIDARGUMENT; - Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; - return UA_Openssl_RSA_PKCS1_V15_Encrypt (data, + Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; + return UA_Openssl_RSA_PKCS1_V15_Encrypt (data, UA_SECURITYPOLICY_BASIC128RSA15_RSAPADDING_LEN, cc->remoteCertificateX509); } @@ -423,20 +423,20 @@ return UA_Openssl_Random_Key_PSHA1_Derive(secret, seed, out); } -static size_t +static size_t UA_SymEn_Basic128Rsa15_getLocalKeyLength (const void *channelContext) { /* 16 bytes 128 bits */ - return UA_SECURITYPOLICY_BASIC128RSA15_SYM_ENCRYPTION_KEY_LENGTH; + return UA_SECURITYPOLICY_BASIC128RSA15_SYM_ENCRYPTION_KEY_LENGTH; } -static size_t +static size_t UA_SymEn_Basic128Rsa15_getBlockSize (const void *channelContext) { return UA_SECURITYPOLICY_BASIC128RSA15_SYM_ENCRYPTION_BLOCK_SIZE; } static size_t UA_SymEn_Basic128Rsa15_getRemoteKeyLength (const void * channelContext) { - return UA_SECURITYPOLICY_BASIC128RSA15_SYM_ENCRYPTION_KEY_LENGTH; + return UA_SECURITYPOLICY_BASIC128RSA15_SYM_ENCRYPTION_KEY_LENGTH; } static UA_StatusCode @@ -444,7 +444,7 @@ UA_ByteString *data) { if(channelContext == NULL || data == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; - + Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; return UA_OpenSSL_AES_128_CBC_Encrypt (&cc->localSymIv, &cc->localSymEncryptingKey, data); } @@ -454,13 +454,13 @@ UA_ByteString * data) { if(channelContext == NULL || data == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; - Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; + Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; return UA_OpenSSL_AES_128_CBC_Decrypt (&cc->remoteSymIv, &cc->remoteSymEncryptingKey, data); } -static size_t +static size_t UA_SymSig_Basic128Rsa15_getKeyLength (const void *channelContext) { - return UA_SECURITYPOLICY_BASIC128RSA15_SYM_SIGNING_KEY_LENGTH; + return UA_SECURITYPOLICY_BASIC128RSA15_SYM_SIGNING_KEY_LENGTH; } static size_t @@ -469,25 +469,25 @@ } static UA_StatusCode -UA_SymSig_Basic128Rsa15_Verify (void * channelContext, +UA_SymSig_Basic128Rsa15_Verify (void * channelContext, const UA_ByteString * message, const UA_ByteString * signature) { if (channelContext == NULL || message == NULL || signature == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; - + Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; - return UA_OpenSSL_HMAC_SHA1_Verify (message, - &cc->remoteSymSigningKey, - signature); + return UA_OpenSSL_HMAC_SHA1_Verify (message, + &cc->remoteSymSigningKey, + signature); } -static UA_StatusCode -UA_SymSig_Basic128Rsa15_Sign (void * channelContext, +static UA_StatusCode +UA_SymSig_Basic128Rsa15_Sign (void * channelContext, const UA_ByteString * message, UA_ByteString * signature) { if (channelContext == NULL || message == NULL || signature == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; - + Channel_Context_Basic128Rsa15 * cc = (Channel_Context_Basic128Rsa15 *) channelContext; return UA_OpenSSL_HMAC_SHA1_Sign (message, &cc->localSymSigningKey, signature); } @@ -497,15 +497,15 @@ UA_StatusCode UA_SecurityPolicy_Basic128Rsa15 (UA_SecurityPolicy * policy, const UA_ByteString localCertificate, - const UA_ByteString localPrivateKey, + const UA_ByteString localPrivateKey, const UA_Logger * logger) { UA_SecurityPolicyAsymmetricModule * const asymmetricModule = &policy->asymmetricModule; - UA_SecurityPolicySymmetricModule * const symmetricModule = &policy->symmetricModule; - UA_SecurityPolicyChannelModule * const channelModule = &policy->channelModule; - UA_StatusCode retval; + UA_SecurityPolicySymmetricModule * const symmetricModule = &policy->symmetricModule; + UA_SecurityPolicyChannelModule * const channelModule = &policy->channelModule; + UA_StatusCode retval; - UA_LOG_INFO (logger, UA_LOGCATEGORY_SECURITYPOLICY, + UA_LOG_INFO (logger, UA_LOGCATEGORY_SECURITYPOLICY, "The Basic128Rsa15 security policy with openssl is added."); UA_Openssl_Init (); @@ -524,7 +524,7 @@ channelModule->setRemoteSymSigningKey = UA_ChannelModule_Basic128Rsa15_setRemoteSymSigningKey; channelModule->setRemoteSymEncryptingKey = UA_ChannelModule_Basic128Rsa15_setRemoteSymEncryptingKey; channelModule->setRemoteSymIv = UA_ChannelModule_Basic128Rsa15_setRemoteSymIv; - channelModule->compareCertificate = UA_ChannelModule_Basic128Rsa15_compareCertificate; + channelModule->compareCertificate = UA_ChannelModule_Basic128Rsa15_compareCertificate; retval = UA_OpenSSL_LoadLocalCertificate(&localCertificate, &policy->localCertificate); @@ -538,14 +538,14 @@ /* AsymmetricModule - signature algorithm */ - UA_SecurityPolicySignatureAlgorithm * asySigAlgorithm = + UA_SecurityPolicySignatureAlgorithm * asySigAlgorithm = &asymmetricModule->cryptoModule.signatureAlgorithm; asySigAlgorithm->uri = UA_STRING("http://www.w3.org/2000/09/xmldsig#rsa-sha1\0"); asySigAlgorithm->getRemoteSignatureSize = UA_AsySig_Basic128Rsa15_getRemoteSignatureSize; asySigAlgorithm->getLocalSignatureSize = UA_AsySig_Basic128Rsa15_getLocalSignatureSize; asySigAlgorithm->getLocalKeyLength = NULL; asySigAlgorithm->getRemoteKeyLength = NULL; - asySigAlgorithm->verify = UA_AsySig_Basic128Rsa15_Verify; + asySigAlgorithm->verify = UA_AsySig_Basic128Rsa15_Verify; asySigAlgorithm->sign = UA_AsySig_Basic128Rsa15_Sign; /* AsymmetricModule encryption algorithm */ @@ -564,19 +564,19 @@ symmetricModule->secureChannelNonceLength = 16; /* 128 bits*/ symmetricModule->generateNonce = UA_Sym_Basic128Rsa15_generateNonce; - symmetricModule->generateKey = UA_Sym_Basic128Rsa15_generateKey; + symmetricModule->generateKey = UA_Sym_Basic128Rsa15_generateKey; /* Symmetric encryption Algorithm */ UA_SecurityPolicyEncryptionAlgorithm * symEncryptionAlgorithm = &symmetricModule->cryptoModule.encryptionAlgorithm; - symEncryptionAlgorithm->uri = UA_STRING("http://www.w3.org/2001/04/xmlenc#aes128-cbc\0"); + symEncryptionAlgorithm->uri = UA_STRING("http://www.w3.org/2001/04/xmlenc#aes128-cbc\0"); symEncryptionAlgorithm->getLocalKeyLength = UA_SymEn_Basic128Rsa15_getLocalKeyLength; symEncryptionAlgorithm->getRemoteKeyLength = UA_SymEn_Basic128Rsa15_getRemoteKeyLength; symEncryptionAlgorithm->getRemoteBlockSize = UA_SymEn_Basic128Rsa15_getBlockSize; symEncryptionAlgorithm->getRemotePlainTextBlockSize = UA_SymEn_Basic128Rsa15_getBlockSize; symEncryptionAlgorithm->decrypt = UA_SymEn_Basic128Rsa15_Decrypt; - symEncryptionAlgorithm->encrypt = UA_SymEn_Basic128Rsa15_Encrypt; + symEncryptionAlgorithm->encrypt = UA_SymEn_Basic128Rsa15_Encrypt; /* Symmetric signature Algorithm */ @@ -598,9 +598,9 @@ UA_ByteString_clear (&policy->localCertificate); return retval; } - policy->clear = UA_Policy_Basic128Rsa15_Clear_Context; + policy->clear = UA_Policy_Basic128Rsa15_Clear_Context; - /* Use the same signature algorithm as the asymmetric component for + /* Use the same signature algorithm as the asymmetric component for certificate signing (see standard) */ policy->certificateSigningAlgorithm = policy->asymmetricModule.cryptoModule.signatureAlgorithm; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic256.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic256.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic256.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic256.c 2022-06-24 19:01:27.000000000 +0000 @@ -29,28 +29,28 @@ } Policy_Context_Basic256; typedef struct { - UA_ByteString localSymSigningKey; - UA_ByteString localSymEncryptingKey; - UA_ByteString localSymIv; + UA_ByteString localSymSigningKey; + UA_ByteString localSymEncryptingKey; + UA_ByteString localSymIv; UA_ByteString remoteSymSigningKey; UA_ByteString remoteSymEncryptingKey; UA_ByteString remoteSymIv; Policy_Context_Basic256 * policyContext; UA_ByteString remoteCertificate; - X509 * remoteCertificateX509; + X509 * remoteCertificateX509; } Channel_Context_Basic256; -static UA_StatusCode +static UA_StatusCode UA_Policy_Basic256_New_Context (UA_SecurityPolicy * securityPolicy, const UA_ByteString localPrivateKey, const UA_Logger * logger) { - Policy_Context_Basic256 * context = (Policy_Context_Basic256 *) + Policy_Context_Basic256 * context = (Policy_Context_Basic256 *) UA_malloc (sizeof (Policy_Context_Basic256)); if (context == NULL) { return UA_STATUSCODE_BADOUTOFMEMORY; } - + context->localPrivateKey = UA_OpenSSL_LoadPrivateKey(&localPrivateKey); if (!context->localPrivateKey) { @@ -65,14 +65,14 @@ if (retval != UA_STATUSCODE_GOOD) { EVP_PKEY_free(context->localPrivateKey); UA_free (context); - return retval; + return retval; } context->logger = logger; securityPolicy->policyContext = context; return UA_STATUSCODE_GOOD; -} +} static void UA_Policy_Basic256_Clear_Context (UA_SecurityPolicy *policy) { @@ -81,29 +81,29 @@ } UA_ByteString_clear(&policy->localCertificate); - Policy_Context_Basic256 * ctx = (Policy_Context_Basic256 *) policy->policyContext; + Policy_Context_Basic256 * ctx = (Policy_Context_Basic256 *) policy->policyContext; if (ctx == NULL) { - return; + return; } /* delete all allocated members in the context */ EVP_PKEY_free(ctx->localPrivateKey); UA_ByteString_clear(&ctx->localCertThumbprint); - UA_free (ctx); + UA_free (ctx); - return; + return; } /* create the channel context */ -static UA_StatusCode +static UA_StatusCode UA_ChannelModule_Basic256_New_Context (const UA_SecurityPolicy * securityPolicy, const UA_ByteString * remoteCertificate, void ** channelContext) { - if (securityPolicy == NULL || remoteCertificate == NULL || + if (securityPolicy == NULL || remoteCertificate == NULL || channelContext == NULL) { - return UA_STATUSCODE_BADINTERNALERROR; + return UA_STATUSCODE_BADINTERNALERROR; } Channel_Context_Basic256 * context = (Channel_Context_Basic256 *) UA_malloc (sizeof (Channel_Context_Basic256)); @@ -118,7 +118,7 @@ UA_ByteString_init(&context->remoteSymEncryptingKey); UA_ByteString_init(&context->remoteSymIv); - UA_StatusCode retval = UA_copyCertificate (&context->remoteCertificate, + UA_StatusCode retval = UA_copyCertificate (&context->remoteCertificate, remoteCertificate); if (retval != UA_STATUSCODE_GOOD) { UA_free (context); @@ -128,18 +128,18 @@ /* decode to X509 */ context->remoteCertificateX509 = UA_OpenSSL_LoadCertificate(&context->remoteCertificate); if (context->remoteCertificateX509 == NULL) { - UA_ByteString_clear (&context->remoteCertificate); + UA_ByteString_clear (&context->remoteCertificate); UA_free (context); return UA_STATUSCODE_BADCERTIFICATECHAININCOMPLETE; } - context->policyContext = (Policy_Context_Basic256 *) + context->policyContext = (Policy_Context_Basic256 *) (securityPolicy->policyContext); *channelContext = context; - UA_LOG_INFO (securityPolicy->logger, - UA_LOGCATEGORY_SECURITYPOLICY, + UA_LOG_INFO (securityPolicy->logger, + UA_LOGCATEGORY_SECURITYPOLICY, "The basic256 security policy channel with openssl is created."); return UA_STATUSCODE_GOOD; @@ -147,29 +147,29 @@ /* delete the channel context */ -static void +static void UA_ChannelModule_Basic256_Delete_Context (void * channelContext) { if (channelContext != NULL) { Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; - X509_free (cc->remoteCertificateX509); - UA_ByteString_clear (&cc->remoteCertificate); + X509_free (cc->remoteCertificateX509); + UA_ByteString_clear (&cc->remoteCertificate); UA_ByteString_clear (&cc->localSymSigningKey); UA_ByteString_clear (&cc->localSymEncryptingKey); UA_ByteString_clear (&cc->localSymIv); UA_ByteString_clear (&cc->remoteSymSigningKey); UA_ByteString_clear (&cc->remoteSymEncryptingKey); UA_ByteString_clear (&cc->remoteSymIv); - UA_LOG_INFO (cc->policyContext->logger, - UA_LOGCATEGORY_SECURITYPOLICY, - "The basic256 security policy channel with openssl is deleted."); + UA_LOG_INFO (cc->policyContext->logger, + UA_LOGCATEGORY_SECURITYPOLICY, + "The basic256 security policy channel with openssl is deleted."); - UA_free (cc); + UA_free (cc); } } -/* Compares the supplied certificate with the certificate - * in the endpoint context +/* Compares the supplied certificate with the certificate + * in the endpoint context */ static UA_StatusCode @@ -188,12 +188,12 @@ /* Generates a thumbprint for the specified certificate */ -static UA_StatusCode +static UA_StatusCode UA_Asy_Basic256_makeCertificateThumbprint (const UA_SecurityPolicy * securityPolicy, const UA_ByteString * certificate, UA_ByteString * thumbprint) { - return UA_Openssl_X509_GetCertificateThumbprint (certificate, - thumbprint, false); + return UA_Openssl_X509_GetCertificateThumbprint (certificate, + thumbprint, false); } static UA_StatusCode @@ -275,7 +275,7 @@ return UA_STATUSCODE_BADINVALIDARGUMENT; } - const Channel_Context_Basic256 * cc = + const Channel_Context_Basic256 * cc = (const Channel_Context_Basic256 *) channelContext; return UA_OpenSSL_X509_compare (certificate, cc->remoteCertificateX509); } @@ -289,10 +289,10 @@ const Channel_Context_Basic256 * cc = (const Channel_Context_Basic256 *) channelContext; UA_Int32 keyLen = 0; UA_Openssl_RSA_Public_GetKeyLength (cc->remoteCertificateX509, &keyLen); - return (size_t) keyLen; + return (size_t) keyLen; } -static size_t +static size_t UA_AsySig_Basic256_getLocalSignatureSize (const void *channelContext) { if (channelContext == NULL) { return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -303,11 +303,11 @@ UA_Int32 keyLen = 0; UA_Openssl_RSA_Private_GetKeyLength (pc->localPrivateKey, &keyLen); - return (size_t) keyLen; + return (size_t) keyLen; } -static UA_StatusCode -UA_AsySig_Basic256_Verify (void * channelContext, +static UA_StatusCode +UA_AsySig_Basic256_Verify (void * channelContext, const UA_ByteString * message, const UA_ByteString * signature) { if (message == NULL || signature == NULL || channelContext == NULL) { @@ -315,17 +315,17 @@ } Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; - UA_StatusCode retval = UA_OpenSSL_RSA_PKCS1_V15_SHA1_Verify (message, + UA_StatusCode retval = UA_OpenSSL_RSA_PKCS1_V15_SHA1_Verify (message, cc->remoteCertificateX509, signature); return retval; } static UA_StatusCode -UA_AsySig_Basic256_Sign (void * channelContext, +UA_AsySig_Basic256_Sign (void * channelContext, const UA_ByteString * message, UA_ByteString * signature) { if (channelContext == NULL || message == NULL || signature == NULL) { - return UA_STATUSCODE_BADINVALIDARGUMENT; + return UA_STATUSCODE_BADINVALIDARGUMENT; } Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; @@ -346,7 +346,7 @@ return (size_t) keyLen - UA_SECURITYPOLICY_BASIC256SHA1_RSAPADDING_LEN; } -static size_t +static size_t UA_AsymEn_Basic256_getRemoteBlockSize (const void *channelContext) { if (channelContext == NULL) { return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -369,7 +369,7 @@ return (size_t) keyLen * 8; } -static size_t +static size_t UA_AsymEn_Basic256_getLocalKeyLength (const void *channelContext) { if (channelContext == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -379,10 +379,10 @@ UA_Int32 keyLen = 0; UA_Openssl_RSA_Private_GetKeyLength (pc->localPrivateKey, &keyLen); - return (size_t) keyLen * 8; + return (size_t) keyLen * 8; } -static UA_StatusCode +static UA_StatusCode UA_AsymEn_Basic256_Decrypt (void * channelContext, UA_ByteString * data) { if (channelContext == NULL || data == NULL) { @@ -390,19 +390,19 @@ } Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; - UA_StatusCode ret = UA_Openssl_RSA_Oaep_Decrypt (data, + UA_StatusCode ret = UA_Openssl_RSA_Oaep_Decrypt (data, cc->policyContext->localPrivateKey); - return ret; + return ret; } static UA_StatusCode UA_AsymEn_Basic256_Encrypt (void * channelContext, UA_ByteString * data) { if (channelContext == NULL || data == NULL) { - return UA_STATUSCODE_BADINVALIDARGUMENT; + return UA_STATUSCODE_BADINVALIDARGUMENT; } - Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; + Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; return UA_Openssl_RSA_OAEP_Encrypt (data, UA_SECURITYPOLICY_BASIC256SHA1_RSAPADDING_LEN, cc->remoteCertificateX509); } @@ -423,13 +423,13 @@ return UA_Openssl_Random_Key_PSHA1_Derive(secret, seed, out); } -static size_t +static size_t UA_SymEn_Basic256_getLocalKeyLength (const void * channelContext) { /* 32 bytes 256 bits */ - return UA_SECURITYPOLICY_BASIC256_SYM_ENCRYPTION_KEY_LENGTH; + return UA_SECURITYPOLICY_BASIC256_SYM_ENCRYPTION_KEY_LENGTH; } -static size_t +static size_t UA_SymEn_Basic256_getBlockSize (const void * channelContext) { return UA_SECURITYPOLICY_BASIC256_SYM_ENCRYPTION_BLOCK_SIZE; } @@ -437,7 +437,7 @@ static size_t UA_SymEn_Basic256_getRemoteKeyLength (const void * channelContext) { /* 32 bytes 256 bits */ - return UA_SECURITYPOLICY_BASIC256_SYM_ENCRYPTION_KEY_LENGTH; + return UA_SECURITYPOLICY_BASIC256_SYM_ENCRYPTION_KEY_LENGTH; } static UA_StatusCode @@ -445,7 +445,7 @@ UA_ByteString * data) { if(channelContext == NULL || data == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; - + Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; return UA_OpenSSL_AES_256_CBC_Encrypt (&cc->localSymIv, &cc->localSymEncryptingKey, data); } @@ -455,13 +455,13 @@ UA_ByteString * data) { if(channelContext == NULL || data == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; - Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; + Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; return UA_OpenSSL_AES_256_CBC_Decrypt (&cc->remoteSymIv, &cc->remoteSymEncryptingKey, data); } -static size_t +static size_t UA_SymSig_Basic256_getKeyLength (const void * channelContext) { - return UA_SECURITYPOLICY_BASIC256_SYM_SIGNING_KEY_LENGTH; + return UA_SECURITYPOLICY_BASIC256_SYM_SIGNING_KEY_LENGTH; } static size_t @@ -470,26 +470,26 @@ } static UA_StatusCode -UA_SymSig_Basic256_Verify (void * channelContext, +UA_SymSig_Basic256_Verify (void * channelContext, const UA_ByteString * message, const UA_ByteString * signature) { - if (channelContext == NULL || + if (channelContext == NULL || message == NULL || signature == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; - + Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; - return UA_OpenSSL_HMAC_SHA1_Verify (message, - &cc->remoteSymSigningKey, - signature); + return UA_OpenSSL_HMAC_SHA1_Verify (message, + &cc->remoteSymSigningKey, + signature); } -static UA_StatusCode -UA_SymSig_Basic256_Sign (void * channelContext, +static UA_StatusCode +UA_SymSig_Basic256_Sign (void * channelContext, const UA_ByteString * message, UA_ByteString * signature) { if (channelContext == NULL || message == NULL || signature == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; - + Channel_Context_Basic256 * cc = (Channel_Context_Basic256 *) channelContext; return UA_OpenSSL_HMAC_SHA1_Sign (message, &cc->localSymSigningKey, signature); } @@ -499,14 +499,14 @@ UA_StatusCode UA_SecurityPolicy_Basic256 (UA_SecurityPolicy * policy, const UA_ByteString localCertificate, - const UA_ByteString localPrivateKey, + const UA_ByteString localPrivateKey, const UA_Logger * logger) { UA_SecurityPolicyAsymmetricModule * const asymmetricModule = &policy->asymmetricModule; - UA_SecurityPolicySymmetricModule * const symmetricModule = &policy->symmetricModule; - UA_SecurityPolicyChannelModule * const channelModule = &policy->channelModule; - UA_StatusCode retval; + UA_SecurityPolicySymmetricModule * const symmetricModule = &policy->symmetricModule; + UA_SecurityPolicyChannelModule * const channelModule = &policy->channelModule; + UA_StatusCode retval; - UA_LOG_INFO (logger, UA_LOGCATEGORY_SECURITYPOLICY, + UA_LOG_INFO (logger, UA_LOGCATEGORY_SECURITYPOLICY, "The basic256 security policy with openssl is added."); UA_Openssl_Init (); @@ -544,7 +544,7 @@ asySigAlgorithm->uri = UA_STRING("http://www.w3.org/2000/09/xmldsig#rsa-sha1\0"); asySigAlgorithm->getRemoteSignatureSize = UA_AsySig_Basic256_getRemoteSignatureSize; asySigAlgorithm->getLocalSignatureSize = UA_AsySig_Basic256_getLocalSignatureSize; - asySigAlgorithm->verify = UA_AsySig_Basic256_Verify; + asySigAlgorithm->verify = UA_AsySig_Basic256_Verify; asySigAlgorithm->sign = UA_AsySig_Basic256_Sign; asySigAlgorithm->getLocalKeyLength = NULL; asySigAlgorithm->getRemoteKeyLength = NULL; @@ -565,13 +565,13 @@ symmetricModule->secureChannelNonceLength = 32; symmetricModule->generateNonce = UA_Sym_Basic256_generateNonce; - symmetricModule->generateKey = UA_Sym_Basic256_generateKey; + symmetricModule->generateKey = UA_Sym_Basic256_generateKey; /* Symmetric encryption Algorithm */ UA_SecurityPolicyEncryptionAlgorithm * symEncryptionAlgorithm = &symmetricModule->cryptoModule.encryptionAlgorithm; - symEncryptionAlgorithm->uri = UA_STRING("http://www.w3.org/2001/04/xmlenc#aes256-cbc\0"); + symEncryptionAlgorithm->uri = UA_STRING("http://www.w3.org/2001/04/xmlenc#aes256-cbc\0"); symEncryptionAlgorithm->getLocalKeyLength = UA_SymEn_Basic256_getLocalKeyLength; symEncryptionAlgorithm->getRemoteKeyLength = UA_SymEn_Basic256_getRemoteKeyLength; symEncryptionAlgorithm->getRemoteBlockSize = UA_SymEn_Basic256_getBlockSize; @@ -598,9 +598,9 @@ UA_ByteString_clear (&policy->localCertificate); return retval; } - policy->clear = UA_Policy_Basic256_Clear_Context; + policy->clear = UA_Policy_Basic256_Clear_Context; - /* Use the same signature algorithm as the asymmetric component for + /* Use the same signature algorithm as the asymmetric component for certificate signing (see standard) */ policy->certificateSigningAlgorithm = policy->asymmetricModule.cryptoModule.signatureAlgorithm; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic256sha256.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic256sha256.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic256sha256.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_basic256sha256.c 2022-06-24 19:01:27.000000000 +0000 @@ -32,25 +32,25 @@ typedef struct { EVP_PKEY *localPrivateKey; UA_ByteString localCertThumbprint; - const UA_Logger *logger; + const UA_Logger *logger; } Policy_Context_Basic256Sha256; typedef struct { - UA_ByteString localSymSigningKey; - UA_ByteString localSymEncryptingKey; - UA_ByteString localSymIv; + UA_ByteString localSymSigningKey; + UA_ByteString localSymEncryptingKey; + UA_ByteString localSymIv; UA_ByteString remoteSymSigningKey; UA_ByteString remoteSymEncryptingKey; UA_ByteString remoteSymIv; Policy_Context_Basic256Sha256 *policyContext; UA_ByteString remoteCertificate; - X509 *remoteCertificateX509; /* X509 */ + X509 *remoteCertificateX509; /* X509 */ } Channel_Context_Basic256Sha256; /* create the policy context */ -static UA_StatusCode +static UA_StatusCode UA_Policy_New_Context(UA_SecurityPolicy * securityPolicy, const UA_ByteString localPrivateKey, const UA_Logger *logger) { @@ -71,7 +71,7 @@ if(retval != UA_STATUSCODE_GOOD) { EVP_PKEY_free(context->localPrivateKey); UA_free(context); - return retval; + return retval; } context->logger = logger; @@ -92,18 +92,18 @@ (Policy_Context_Basic256Sha256 *) policy->policyContext; EVP_PKEY_free(pc->localPrivateKey); UA_ByteString_clear(&pc->localCertThumbprint); - UA_free(pc); + UA_free(pc); return; } /* create the channel context */ -static UA_StatusCode +static UA_StatusCode UA_ChannelModule_New_Context(const UA_SecurityPolicy * securityPolicy, const UA_ByteString * remoteCertificate, void ** channelContext) { if(securityPolicy == NULL || remoteCertificate == NULL || channelContext == NULL) - return UA_STATUSCODE_BADINTERNALERROR; + return UA_STATUSCODE_BADINTERNALERROR; Channel_Context_Basic256Sha256 *context = (Channel_Context_Basic256Sha256 *) UA_malloc(sizeof(Channel_Context_Basic256Sha256)); @@ -127,7 +127,7 @@ /* decode to X509 */ context->remoteCertificateX509 = UA_OpenSSL_LoadCertificate(&context->remoteCertificate); if(context->remoteCertificateX509 == NULL) { - UA_ByteString_clear(&context->remoteCertificate); + UA_ByteString_clear(&context->remoteCertificate); UA_free(context); } @@ -135,7 +135,7 @@ (Policy_Context_Basic256Sha256 *)securityPolicy->policyContext; *channelContext = context; - UA_LOG_INFO(securityPolicy->logger, UA_LOGCATEGORY_SECURITYPOLICY, + UA_LOG_INFO(securityPolicy->logger, UA_LOGCATEGORY_SECURITYPOLICY, "The basic256sha256 security policy channel with openssl is created."); return UA_STATUSCODE_GOOD; @@ -143,30 +143,30 @@ /* delete the channel context */ -static void +static void UA_ChannelModule_Delete_Context(void * channelContext) { if(!channelContext) return; - + Channel_Context_Basic256Sha256 * cc = (Channel_Context_Basic256Sha256 *)channelContext; - X509_free(cc->remoteCertificateX509); - UA_ByteString_clear(&cc->remoteCertificate); + X509_free(cc->remoteCertificateX509); + UA_ByteString_clear(&cc->remoteCertificate); UA_ByteString_clear(&cc->localSymSigningKey); UA_ByteString_clear(&cc->localSymEncryptingKey); UA_ByteString_clear(&cc->localSymIv); UA_ByteString_clear(&cc->remoteSymSigningKey); UA_ByteString_clear(&cc->remoteSymEncryptingKey); UA_ByteString_clear(&cc->remoteSymIv); - - UA_LOG_INFO(cc->policyContext->logger, UA_LOGCATEGORY_SECURITYPOLICY, - "The basic256sha256 security policy channel with openssl is deleted."); + + UA_LOG_INFO(cc->policyContext->logger, UA_LOGCATEGORY_SECURITYPOLICY, + "The basic256sha256 security policy channel with openssl is deleted."); UA_free(cc); } /* Verifies the signature of the message using the provided keys in the context. * AsymmetricSignatureAlgorithm_RSA-PKCS15-SHA2-256 */ -static UA_StatusCode -UA_AsySig_Basic256Sha256_Verify(void *channelContext, +static UA_StatusCode +UA_AsySig_Basic256Sha256_Verify(void *channelContext, const UA_ByteString *message, const UA_ByteString *signature) { if(message == NULL || signature == NULL || channelContext == NULL) @@ -178,8 +178,8 @@ signature); } -/* Compares the supplied certificate with the certificate - * in the endpoint context +/* Compares the supplied certificate with the certificate + * in the endpoint context */ static UA_StatusCode @@ -196,14 +196,14 @@ /* Generates a thumbprint for the specified certificate */ -static UA_StatusCode +static UA_StatusCode UA_makeCertificateThumbprint(const UA_SecurityPolicy * securityPolicy, const UA_ByteString * certificate, UA_ByteString * thumbprint) { - return UA_Openssl_X509_GetCertificateThumbprint(certificate, thumbprint, false); + return UA_Openssl_X509_GetCertificateThumbprint(certificate, thumbprint, false); } -static UA_StatusCode +static UA_StatusCode UA_Asym_Basic256Sha256_Decrypt(void * channelContext, UA_ByteString * data) { if(channelContext == NULL || data == NULL) return UA_STATUSCODE_BADINVALIDARGUMENT; @@ -222,10 +222,10 @@ (const Channel_Context_Basic256Sha256 *) channelContext; UA_Int32 keyLen = 0; UA_Openssl_RSA_Public_GetKeyLength(cc->remoteCertificateX509, &keyLen); - return (size_t) keyLen; + return (size_t) keyLen; } -static size_t +static size_t UA_AsySig_Basic256Sha256_getLocalSignatureSize(const void *channelContext) { if(channelContext == NULL) return UA_STATUSCODE_BADINTERNALERROR; @@ -235,7 +235,7 @@ Policy_Context_Basic256Sha256 * pc = cc->policyContext; UA_Int32 keyLen = 0; UA_Openssl_RSA_Private_GetKeyLength(pc->localPrivateKey, &keyLen); - return (size_t) keyLen; + return (size_t) keyLen; } static size_t @@ -250,7 +250,7 @@ return (size_t) keyLen - UA_SECURITYPOLICY_BASIC256SHA256_RSAPADDING_LEN; } -static size_t +static size_t UA_AsymEn_Basic256Sha256_getRemoteBlockSize(const void *channelContext) { if(channelContext == NULL) return UA_STATUSCODE_BADINTERNALERROR; @@ -280,19 +280,19 @@ UA_Int32 rc = RAND_bytes(out->data, (int) out->length); if(rc != 1) return UA_STATUSCODE_BADUNEXPECTEDERROR; - return UA_STATUSCODE_GOOD; + return UA_STATUSCODE_GOOD; } -static size_t +static size_t UA_SymEn_Basic256Sha256_getLocalKeyLength(const void *channelContext) { /* 32 bytes 256 bits */ - return UA_SECURITYPOLICY_BASIC256SHA256_SYM_ENCRYPTION_KEY_LENGTH; + return UA_SECURITYPOLICY_BASIC256SHA256_SYM_ENCRYPTION_KEY_LENGTH; } -static size_t +static size_t UA_SymSig_Basic256Sha256_getLocalKeyLength(const void *channelContext) { - /* 32 bytes 256 bits */ - return UA_SECURITYPOLICY_BASIC256SHA256_SYM_SIGNING_KEY_LENGTH; + /* 32 bytes 256 bits */ + return UA_SECURITYPOLICY_BASIC256SHA256_SYM_SIGNING_KEY_LENGTH; } static UA_StatusCode @@ -336,7 +336,7 @@ static size_t UA_SymEn_Basic256Sha256_getRemoteKeyLength(const void * channelContext) { /* 32 bytes 256 bits */ - return UA_SECURITYPOLICY_BASIC256SHA256_SYM_ENCRYPTION_KEY_LENGTH; + return UA_SECURITYPOLICY_BASIC256SHA256_SYM_ENCRYPTION_KEY_LENGTH; } static size_t @@ -346,7 +346,7 @@ static size_t UA_SymSig_Basic256Sha256_getRemoteKeyLength(const void * channelContext) { - /* 32 bytes 256 bits */ + /* 32 bytes 256 bits */ return UA_SECURITYPOLICY_BASIC256SHA256_SYM_SIGNING_KEY_LENGTH; } @@ -384,7 +384,7 @@ UA_AsySig_Basic256Sha256_sign(void *channelContext, const UA_ByteString * message, UA_ByteString *signature) { if(channelContext == NULL || message == NULL || signature == NULL) - return UA_STATUSCODE_BADINTERNALERROR; + return UA_STATUSCODE_BADINTERNALERROR; Channel_Context_Basic256Sha256 *cc = (Channel_Context_Basic256Sha256 *) channelContext; Policy_Context_Basic256Sha256 *pc = cc->policyContext; return UA_Openssl_RSA_PKCS1_V15_SHA256_Sign(message, pc->localPrivateKey, signature); @@ -393,9 +393,9 @@ static UA_StatusCode UA_AsymEn_Basic256Sha256_encrypt(void *channelContext, UA_ByteString *data) { if(channelContext == NULL || data == NULL) - return UA_STATUSCODE_BADINTERNALERROR; + return UA_STATUSCODE_BADINTERNALERROR; Channel_Context_Basic256Sha256 * cc = - (Channel_Context_Basic256Sha256 *) channelContext; + (Channel_Context_Basic256Sha256 *) channelContext; return UA_Openssl_RSA_OAEP_Encrypt(data, UA_SECURITYPOLICY_BASIC256SHA256_RSAPADDING_LEN, cc->remoteCertificateX509); } @@ -410,17 +410,17 @@ const UA_ByteString *signature) { if(channelContext == NULL || message == NULL || signature == NULL) return UA_STATUSCODE_BADINTERNALERROR; - + Channel_Context_Basic256Sha256 * cc = (Channel_Context_Basic256Sha256 *) channelContext; - return UA_OpenSSL_HMAC_SHA256_Verify(message, &cc->remoteSymSigningKey, signature); + return UA_OpenSSL_HMAC_SHA256_Verify(message, &cc->remoteSymSigningKey, signature); } -static UA_StatusCode +static UA_StatusCode UA_SymSig_Basic256Sha256_sign(void *channelContext, const UA_ByteString *message, UA_ByteString *signature) { if(channelContext == NULL || message == NULL || signature == NULL) return UA_STATUSCODE_BADINTERNALERROR; - + Channel_Context_Basic256Sha256 * cc = (Channel_Context_Basic256Sha256 *) channelContext; return UA_OpenSSL_HMAC_SHA256_Sign(message, &cc->localSymSigningKey, signature); } @@ -443,7 +443,7 @@ UA_SymEn_Basic256Sha256_encrypt(void *channelContext, UA_ByteString *data) { if(channelContext == NULL || data == NULL) return UA_STATUSCODE_BADINTERNALERROR; - + Channel_Context_Basic256Sha256 * cc = (Channel_Context_Basic256Sha256 *) channelContext; return UA_OpenSSL_AES_256_CBC_Encrypt(&cc->localSymIv, &cc->localSymEncryptingKey, data); } @@ -453,13 +453,13 @@ const UA_ByteString *certificate) { if(channelContext == NULL || certificate == NULL) return UA_STATUSCODE_BADINTERNALERROR; - + const Channel_Context_Basic256Sha256 * cc = (const Channel_Context_Basic256Sha256 *) channelContext; return UA_OpenSSL_X509_compare(certificate, cc->remoteCertificateX509); } -static size_t +static size_t UA_AsymEn_Basic256Sha256_getLocalKeyLength(const void *channelContext) { if(channelContext == NULL) return UA_STATUSCODE_BADINTERNALERROR; @@ -469,7 +469,7 @@ Policy_Context_Basic256Sha256 *pc = cc->policyContext; UA_Int32 keyLen = 0; UA_Openssl_RSA_Private_GetKeyLength(pc->localPrivateKey, &keyLen); - return (size_t) keyLen * 8; + return (size_t) keyLen * 8; } /* the main entry of Basic256Sha256 */ @@ -477,12 +477,12 @@ UA_StatusCode UA_SecurityPolicy_Basic256Sha256(UA_SecurityPolicy *policy, const UA_ByteString localCertificate, - const UA_ByteString localPrivateKey, + const UA_ByteString localPrivateKey, const UA_Logger *logger) { UA_SecurityPolicyAsymmetricModule *asymmetricModule = &policy->asymmetricModule; UA_SecurityPolicySymmetricModule *symmetricModule = &policy->symmetricModule; - UA_SecurityPolicyChannelModule *channelModule = &policy->channelModule; - UA_LOG_INFO(logger, UA_LOGCATEGORY_SECURITYPOLICY, + UA_SecurityPolicyChannelModule *channelModule = &policy->channelModule; + UA_LOG_INFO(logger, UA_LOGCATEGORY_SECURITYPOLICY, "The basic256sha256 security policy with openssl is added."); UA_Openssl_Init(); @@ -530,7 +530,7 @@ asymEncryAlg->getLocalKeyLength = UA_AsymEn_Basic256Sha256_getLocalKeyLength; asymEncryAlg->getRemoteKeyLength = UA_AsymEn_Basic256Sha256_getRemoteKeyLength; asymEncryAlg->getRemoteBlockSize = UA_AsymEn_Basic256Sha256_getRemoteBlockSize; - asymEncryAlg->getRemotePlainTextBlockSize = + asymEncryAlg->getRemotePlainTextBlockSize = UA_AsymEn_Basic256Sha256_getRemotePlainTextBlockSize; /* AsymmetricModule */ @@ -546,7 +546,7 @@ UA_SecurityPolicyEncryptionAlgorithm *symEncryptionAlgorithm = &symmetricModule->cryptoModule.encryptionAlgorithm; symEncryptionAlgorithm->uri = - UA_STRING("http://www.w3.org/2001/04/xmlenc#aes256-cbc\0"); + UA_STRING("http://www.w3.org/2001/04/xmlenc#aes256-cbc\0"); symEncryptionAlgorithm->encrypt = UA_SymEn_Basic256Sha256_encrypt; symEncryptionAlgorithm->decrypt = UA_SymEn_Basic256Sha256_decrypt; symEncryptionAlgorithm->getLocalKeyLength = UA_SymEn_Basic256Sha256_getLocalKeyLength; @@ -563,7 +563,7 @@ symSignatureAlgorithm->sign = UA_SymSig_Basic256Sha256_sign; symSignatureAlgorithm->getLocalSignatureSize = UA_SymSig_Basic256Sha256_getLocalSignatureSize; - symSignatureAlgorithm->getRemoteSignatureSize = + symSignatureAlgorithm->getRemoteSignatureSize = UA_SymSig_Basic256Sha256_getRemoteSignatureSize; symSignatureAlgorithm->getLocalKeyLength = UA_SymSig_Basic256Sha256_getLocalKeyLength; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_create_certificate.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_create_certificate.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_create_certificate.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_openssl_create_certificate.c 2022-06-24 19:01:27.000000000 +0000 @@ -195,7 +195,7 @@ for(UA_UInt32 iSubject = 0; iSubject < subjectSize; ++iSubject) { UA_Int32 sep = UA_String_chr(&subject[iSubject], '='); char field[16]; - if(sep == -1 || sep == 0 || + if(sep == -1 || sep == 0 || ((size_t) sep == (subject[iSubject].length - 1)) || sep >= 15) { UA_LOG_ERROR(logger, UA_LOGCATEGORY_SECURECHANNEL, "Create Certificate: Subject must contain one '=' with " diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_pki_openssl.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_pki_openssl.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_pki_openssl.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/crypto/openssl/ua_pki_openssl.c 2022-06-24 19:01:27.000000000 +0000 @@ -60,40 +60,40 @@ } typedef struct { - /* + /* * If the folders are defined, we use them to reload the certificates during - * runtime + * runtime */ - UA_String trustListFolder; + UA_String trustListFolder; UA_String issuerListFolder; - UA_String revocationListFolder; + UA_String revocationListFolder; STACK_OF(X509) * skIssue; STACK_OF(X509) * skTrusted; STACK_OF(X509_CRL) * skCrls; /* Revocation list*/ } CertContext; -static UA_StatusCode +static UA_StatusCode UA_CertContext_sk_Init (CertContext * context) { context->skTrusted = sk_X509_new_null(); context->skIssue = sk_X509_new_null(); - context->skCrls = sk_X509_CRL_new_null(); + context->skCrls = sk_X509_CRL_new_null(); if (context->skTrusted == NULL || context->skIssue == NULL || context->skCrls == NULL) { - return UA_STATUSCODE_BADOUTOFMEMORY; + return UA_STATUSCODE_BADOUTOFMEMORY; } return UA_STATUSCODE_GOOD; } -static void +static void UA_CertContext_sk_free (CertContext * context) { sk_X509_pop_free (context->skTrusted, X509_free); sk_X509_pop_free (context->skIssue, X509_free); sk_X509_CRL_pop_free (context->skCrls, X509_CRL_free); } -static UA_StatusCode +static UA_StatusCode UA_CertContext_Init (CertContext * context) { (void) memset (context, 0, sizeof (CertContext)); UA_ByteString_init (&context->trustListFolder); @@ -107,7 +107,7 @@ if (cv == NULL) { return ; } - CertContext * context = (CertContext *) cv->context; + CertContext * context = (CertContext *) cv->context; if (context == NULL) { return; } @@ -127,7 +127,7 @@ UA_skTrusted_Cert2X509 (const UA_ByteString * certificateTrustList, size_t certificateTrustListSize, CertContext * ctx) { - size_t i; + size_t i; for (i = 0; i < certificateTrustListSize; i++) { X509 * x509 = UA_OpenSSL_LoadCertificate(&certificateTrustList[i]); @@ -138,7 +138,7 @@ sk_X509_push (ctx->skTrusted, x509); } - return UA_STATUSCODE_GOOD; + return UA_STATUSCODE_GOOD; } static UA_StatusCode @@ -156,14 +156,14 @@ sk_X509_push (ctx->skIssue, x509); } - return UA_STATUSCODE_GOOD; + return UA_STATUSCODE_GOOD; } static UA_StatusCode UA_skCrls_Cert2X509 (const UA_ByteString * certificateRevocationList, size_t certificateRevocationListSize, CertContext * ctx) { - size_t i; + size_t i; const unsigned char * pData; for (i = 0; i < certificateRevocationListSize; i++) { @@ -186,10 +186,10 @@ sk_X509_CRL_push (ctx->skCrls, crl); } - return UA_STATUSCODE_GOOD; + return UA_STATUSCODE_GOOD; } -#ifdef __linux__ +#ifdef __linux__ #include static int UA_Certificate_Filter_der_pem (const struct dirent * entry) { @@ -198,7 +198,7 @@ /* check file extension */ const char *pszFind = strrchr(entry->d_name, '.'); - if (pszFind == 0) + if (pszFind == 0) return 0; pszFind++; if (strcmp (pszFind, "der") == 0 || strcmp (pszFind, "pem") == 0) @@ -214,7 +214,7 @@ /* check file extension */ const char *pszFind = strrchr(entry->d_name, '.'); - if (pszFind == 0) + if (pszFind == 0) return 0; pszFind++; if (strcmp (pszFind, "crl") == 0) @@ -243,12 +243,12 @@ static UA_StatusCode UA_loadCertFromFile (const char * fileName, UA_ByteString * cert) { - - FILE * fp = fopen(fileName, "rb"); + + FILE * fp = fopen(fileName, "rb"); if (fp == NULL) return UA_STATUSCODE_BADINTERNALERROR; - + fseek(fp, 0, SEEK_END); cert->length = (size_t) ftell(fp); if (UA_ByteString_allocBuffer (cert, cert->length) != UA_STATUSCODE_GOOD) { @@ -275,13 +275,13 @@ int i; int numCertificates; char certFile[PATH_MAX]; - UA_ByteString strCert; + UA_ByteString strCert; char folderPath[PATH_MAX]; UA_ByteString_init (&strCert); if (ctx->trustListFolder.length > 0) { - UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Reloading the trust-list"); + UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Reloading the trust-list"); sk_X509_pop_free (ctx->skTrusted, X509_free); ctx->skTrusted = sk_X509_new_null(); @@ -289,21 +289,21 @@ return UA_STATUSCODE_BADOUTOFMEMORY; } - (void) memcpy (folderPath, ctx->trustListFolder.data, + (void) memcpy (folderPath, ctx->trustListFolder.data, ctx->trustListFolder.length); folderPath[ctx->trustListFolder.length] = 0; - numCertificates = scandir(folderPath, &dirlist, + numCertificates = scandir(folderPath, &dirlist, UA_Certificate_Filter_der_pem, alphasort); for (i = 0; i < numCertificates; i++) { - if (UA_BuildFullPath (folderPath, dirlist[i]->d_name, + if (UA_BuildFullPath (folderPath, dirlist[i]->d_name, PATH_MAX, certFile) != UA_STATUSCODE_GOOD) { - continue; + continue; } ret = UA_loadCertFromFile (certFile, &strCert); if (ret != UA_STATUSCODE_GOOD) { UA_LOG_INFO (UA_Log_Stdout, UA_LOGCATEGORY_SERVER, - "Failed to load the certificate file %s", certFile); + "Failed to load the certificate file %s", certFile); continue; /* continue or return ? */ } if (UA_skTrusted_Cert2X509 (&strCert, 1, ctx) != UA_STATUSCODE_GOOD) { @@ -317,7 +317,7 @@ } if (ctx->issuerListFolder.length > 0) { - UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Reloading the issuer-list"); + UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Reloading the issuer-list"); sk_X509_pop_free (ctx->skIssue, X509_free); ctx->skIssue = sk_X509_new_null(); @@ -327,23 +327,23 @@ memcpy (folderPath, ctx->issuerListFolder.data, ctx->issuerListFolder.length); folderPath[ctx->issuerListFolder.length] = 0; - numCertificates = scandir(folderPath, &dirlist, + numCertificates = scandir(folderPath, &dirlist, UA_Certificate_Filter_der_pem, alphasort); for (i = 0; i < numCertificates; i++) { - if (UA_BuildFullPath (folderPath, dirlist[i]->d_name, + if (UA_BuildFullPath (folderPath, dirlist[i]->d_name, PATH_MAX, certFile) != UA_STATUSCODE_GOOD) { - continue; + continue; } ret = UA_loadCertFromFile (certFile, &strCert); if (ret != UA_STATUSCODE_GOOD) { UA_LOG_INFO (UA_Log_Stdout, UA_LOGCATEGORY_SERVER, - "Failed to load the certificate file %s", certFile); + "Failed to load the certificate file %s", certFile); continue; /* continue or return ? */ } if (UA_skIssuer_Cert2X509 (&strCert, 1, ctx) != UA_STATUSCODE_GOOD) { UA_LOG_INFO (UA_Log_Stdout, UA_LOGCATEGORY_SERVER, - "Failed to decode the certificate file %s", certFile); + "Failed to decode the certificate file %s", certFile); UA_ByteString_clear (&strCert); continue; /* continue or return ? */ } @@ -352,33 +352,33 @@ } if (ctx->revocationListFolder.length > 0) { - UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Reloading the revocation-list"); + UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "Reloading the revocation-list"); sk_X509_CRL_pop_free (ctx->skCrls, X509_CRL_free); - ctx->skCrls = sk_X509_CRL_new_null(); + ctx->skCrls = sk_X509_CRL_new_null(); if (ctx->skCrls == NULL) { return UA_STATUSCODE_BADOUTOFMEMORY; } memcpy (folderPath, ctx->revocationListFolder.data, ctx->revocationListFolder.length); folderPath[ctx->revocationListFolder.length] = 0; - numCertificates = scandir(folderPath, &dirlist, - UA_Certificate_Filter_crl, + numCertificates = scandir(folderPath, &dirlist, + UA_Certificate_Filter_crl, alphasort); for (i = 0; i < numCertificates; i++) { - if (UA_BuildFullPath (folderPath, dirlist[i]->d_name, + if (UA_BuildFullPath (folderPath, dirlist[i]->d_name, PATH_MAX, certFile) != UA_STATUSCODE_GOOD) { - continue; + continue; } ret = UA_loadCertFromFile (certFile, &strCert); if (ret != UA_STATUSCODE_GOOD) { UA_LOG_INFO (UA_Log_Stdout, UA_LOGCATEGORY_SERVER, - "Failed to load the revocation file %s", certFile); + "Failed to load the revocation file %s", certFile); continue; /* continue or return ? */ } if (UA_skCrls_Cert2X509 (&strCert, 1, ctx) != UA_STATUSCODE_GOOD) { UA_LOG_INFO (UA_Log_Stdout, UA_LOGCATEGORY_SERVER, - "Failed to decode the revocation file %s", certFile); + "Failed to decode the revocation file %s", certFile); UA_ByteString_clear (&strCert); continue; /* continue or return ? */ } @@ -395,7 +395,7 @@ static UA_StatusCode UA_X509_Store_CTX_Error_To_UAError (int opensslErr) { UA_StatusCode ret; - + switch (opensslErr) { case X509_V_ERR_CERT_HAS_EXPIRED: case X509_V_ERR_CERT_NOT_YET_VALID: @@ -443,15 +443,15 @@ return UA_STATUSCODE_BADINTERNALERROR; } ctx = (CertContext *) verificationContext; - + store = X509_STORE_new(); storeCtx = X509_STORE_CTX_new(); - + if (store == NULL || storeCtx == NULL) { ret = UA_STATUSCODE_BADOUTOFMEMORY; goto cleanup; } -#ifdef __linux__ +#ifdef __linux__ ret = UA_ReloadCertFromFolder (ctx); if (ret != UA_STATUSCODE_GOOD) { goto cleanup; @@ -462,10 +462,10 @@ if (certificateX509 == NULL) { ret = UA_STATUSCODE_BADCERTIFICATEINVALID; goto cleanup; - } + } X509_STORE_set_flags(store, 0); - opensslRet = X509_STORE_CTX_init (storeCtx, store, certificateX509, + opensslRet = X509_STORE_CTX_init (storeCtx, store, certificateX509, ctx->skIssue); if (opensslRet != 1) { ret = UA_STATUSCODE_BADINTERNALERROR; @@ -612,7 +612,7 @@ return UA_STATUSCODE_BADSECURITYCHECKSFAILED; } - pNames = (GENERAL_NAMES *) X509_get_ext_d2i(certificateX509, NID_subject_alt_name, + pNames = (GENERAL_NAMES *) X509_get_ext_d2i(certificateX509, NID_subject_alt_name, NULL, NULL); if (pNames == NULL) { X509_free (certificateX509); @@ -681,7 +681,7 @@ cv->verifyCertificate = UA_CertificateVerification_Verify; else cv->verifyCertificate = UA_VerifyCertificateAllowAll; - + if (certificateTrustListSize > 0) { if (UA_skTrusted_Cert2X509 (certificateTrustList, certificateTrustListSize, context) != UA_STATUSCODE_GOOD) { @@ -693,7 +693,7 @@ if (certificateIssuerListSize > 0) { if (UA_skIssuer_Cert2X509 (certificateIssuerList, certificateIssuerListSize, context) != UA_STATUSCODE_GOOD) { - ret = UA_STATUSCODE_BADINTERNALERROR; + ret = UA_STATUSCODE_BADINTERNALERROR; goto errout; } } @@ -701,9 +701,9 @@ if (certificateRevocationListSize > 0) { if (UA_skCrls_Cert2X509 (certificateRevocationList, certificateRevocationListSize, context) != UA_STATUSCODE_GOOD) { - ret = UA_STATUSCODE_BADINTERNALERROR; + ret = UA_STATUSCODE_BADINTERNALERROR; goto errout; - } + } } return UA_STATUSCODE_GOOD; @@ -722,7 +722,7 @@ UA_StatusCode ret; if (cv == NULL) { return UA_STATUSCODE_BADINTERNALERROR; - } + } CertContext * context = (CertContext *) UA_malloc (sizeof (CertContext)); if (context == NULL) { diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/include/open62541/plugin/pubsub_mqtt.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/include/open62541/plugin/pubsub_mqtt.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/include/open62541/plugin/pubsub_mqtt.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/include/open62541/plugin/pubsub_mqtt.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. - * + * * Copyright 2018 (c) Fraunhofer IOSB (Author: Lukas Meling) * Copyright (c) 2020 basysKom GmbH */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/include/open62541/server_config_default.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/include/open62541/server_config_default.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/include/open62541/server_config_default.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/include/open62541/server_config_default.h 2022-06-24 19:01:27.000000000 +0000 @@ -90,7 +90,7 @@ * It initializes reasonable defaults for many things, but does not * add any network layer, security policies and endpoints. * Use the various UA_ServerConfig_addXxx functions to add them. - * + * * @param conf The configuration to manipulate */ UA_EXPORT UA_StatusCode @@ -121,14 +121,14 @@ * @param certificate The optional server certificate. */ UA_EXPORT UA_StatusCode -UA_ServerConfig_addSecurityPolicyNone(UA_ServerConfig *config, +UA_ServerConfig_addSecurityPolicyNone(UA_ServerConfig *config, const UA_ByteString *certificate); #ifdef UA_ENABLE_ENCRYPTION /* Adds the security policy ``SecurityPolicy#Basic128Rsa15`` to the server. A * server certificate may be supplied but is optional. - * + * * Certificate verification should be configured before calling this * function. See PKI plugin. * @@ -137,7 +137,7 @@ * @param privateKey The private key that corresponds to the certificate. */ UA_EXPORT UA_StatusCode -UA_ServerConfig_addSecurityPolicyBasic128Rsa15(UA_ServerConfig *config, +UA_ServerConfig_addSecurityPolicyBasic128Rsa15(UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey); @@ -146,13 +146,13 @@ * * Certificate verification should be configured before calling this * function. See PKI plugin. - * + * * @param config The configuration to manipulate * @param certificate The server certificate. * @param privateKey The private key that corresponds to the certificate. */ UA_EXPORT UA_StatusCode -UA_ServerConfig_addSecurityPolicyBasic256(UA_ServerConfig *config, +UA_ServerConfig_addSecurityPolicyBasic256(UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey); @@ -167,7 +167,7 @@ * @param privateKey The private key that corresponds to the certificate. */ UA_EXPORT UA_StatusCode -UA_ServerConfig_addSecurityPolicyBasic256Sha256(UA_ServerConfig *config, +UA_ServerConfig_addSecurityPolicyBasic256Sha256(UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey); @@ -191,7 +191,7 @@ * * Certificate verification should be configured before calling this * function. See PKI plugin. - * + * * @param config The configuration to manipulate * @param certificate The server certificate. * @param privateKey The private key that corresponds to the certificate. @@ -215,7 +215,7 @@ * @param securityMode The security mode for which to add the endpoint. */ UA_EXPORT UA_StatusCode -UA_ServerConfig_addEndpoint(UA_ServerConfig *config, const UA_String securityPolicyUri, +UA_ServerConfig_addEndpoint(UA_ServerConfig *config, const UA_String securityPolicyUri, UA_MessageSecurityMode securityMode); /* Adds endpoints for all configured security policies in each mode. diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/mqtt/templates/posix_sockets.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/mqtt/templates/posix_sockets.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/mqtt/templates/posix_sockets.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/mqtt/templates/posix_sockets.h 2022-06-24 19:01:27.000000000 +0000 @@ -52,7 +52,7 @@ continue; } break; - } + } /* free servinfo */ freeaddrinfo(servinfo); @@ -67,12 +67,12 @@ } #endif #if defined(__VMS) - /* + /* OpenVMS only partially implements fcntl. It works on file descriptors but silently fails on socket descriptors. So we need to fall back on to the older ioctl system to set non-blocking IO */ - int on = 1; + int on = 1; if (*sockfd != -1) ioctl(*sockfd, FIONBIO, &on); #endif diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/mqtt/ua_mqtt-c_adapter.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/mqtt/ua_mqtt-c_adapter.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/mqtt/ua_mqtt-c_adapter.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/mqtt/ua_mqtt-c_adapter.h 2022-06-24 19:01:27.000000000 +0000 @@ -27,8 +27,8 @@ UA_NetworkAddressUrlDataType address; UA_UInt32 mqttRecvBufferSize; UA_UInt32 mqttSendBufferSize; - uint8_t *mqttSendBuffer; - uint8_t *mqttRecvBuffer; + uint8_t *mqttSendBuffer; + uint8_t *mqttRecvBuffer; UA_String *mqttClientId; UA_Connection *connection; #if defined(UA_ENABLE_MQTT_TLS_OPENSSL) @@ -74,7 +74,7 @@ UA_StatusCode yieldMqtt(UA_PubSubChannelDataMQTT*, UA_UInt16 timeout); - + #ifdef __cplusplus } // extern "C" #endif diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_accesscontrol_default.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_accesscontrol_default.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_accesscontrol_default.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_accesscontrol_default.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2016-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Stefan Profanter, fortiss GmbH @@ -281,7 +281,7 @@ if(ac->clear) clear_default(ac); - + ac->clear = clear_default; ac->activateSession = activateSession_default; ac->closeSession = closeSession_default; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_config_default.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_config_default.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_config_default.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_config_default.c 2022-06-24 19:01:27.000000000 +0000 @@ -251,7 +251,7 @@ return retval; conf->serverUrlsSize = serverUrlsSize; } - + /* Endpoints */ /* conf->endpoints = {0, NULL}; */ @@ -365,7 +365,7 @@ #endif UA_EXPORT UA_StatusCode -UA_ServerConfig_addSecurityPolicyNone(UA_ServerConfig *config, +UA_ServerConfig_addSecurityPolicyNone(UA_ServerConfig *config, const UA_ByteString *certificate) { /* Allocate the SecurityPolicies */ UA_SecurityPolicy *tmp = (UA_SecurityPolicy *) @@ -374,7 +374,7 @@ if(!tmp) return UA_STATUSCODE_BADOUTOFMEMORY; config->securityPolicies = tmp; - + /* Populate the SecurityPolicies */ UA_ByteString localCertificate = UA_BYTESTRING_NULL; if(certificate) @@ -395,7 +395,7 @@ } UA_EXPORT UA_StatusCode -UA_ServerConfig_addEndpoint(UA_ServerConfig *config, const UA_String securityPolicyUri, +UA_ServerConfig_addEndpoint(UA_ServerConfig *config, const UA_String securityPolicyUri, UA_MessageSecurityMode securityMode) { /* Allocate the endpoint */ UA_EndpointDescription *tmp = (UA_EndpointDescription *) @@ -520,7 +520,7 @@ #ifdef UA_ENABLE_ENCRYPTION UA_EXPORT UA_StatusCode -UA_ServerConfig_addSecurityPolicyBasic128Rsa15(UA_ServerConfig *config, +UA_ServerConfig_addSecurityPolicyBasic128Rsa15(UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey) { /* Allocate the SecurityPolicies */ @@ -530,7 +530,7 @@ if(!tmp) return UA_STATUSCODE_BADOUTOFMEMORY; config->securityPolicies = tmp; - + /* Populate the SecurityPolicies */ UA_ByteString localCertificate = UA_BYTESTRING_NULL; UA_ByteString localPrivateKey = UA_BYTESTRING_NULL; @@ -554,7 +554,7 @@ } UA_EXPORT UA_StatusCode -UA_ServerConfig_addSecurityPolicyBasic256(UA_ServerConfig *config, +UA_ServerConfig_addSecurityPolicyBasic256(UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey) { /* Allocate the SecurityPolicies */ @@ -564,7 +564,7 @@ if(!tmp) return UA_STATUSCODE_BADOUTOFMEMORY; config->securityPolicies = tmp; - + /* Populate the SecurityPolicies */ UA_ByteString localCertificate = UA_BYTESTRING_NULL; UA_ByteString localPrivateKey = UA_BYTESTRING_NULL; @@ -588,7 +588,7 @@ } UA_EXPORT UA_StatusCode -UA_ServerConfig_addSecurityPolicyBasic256Sha256(UA_ServerConfig *config, +UA_ServerConfig_addSecurityPolicyBasic256Sha256(UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey) { /* Allocate the SecurityPolicies */ @@ -598,7 +598,7 @@ if(!tmp) return UA_STATUSCODE_BADOUTOFMEMORY; config->securityPolicies = tmp; - + /* Populate the SecurityPolicies */ UA_ByteString localCertificate = UA_BYTESTRING_NULL; UA_ByteString localPrivateKey = UA_BYTESTRING_NULL; @@ -622,7 +622,7 @@ } UA_EXPORT UA_StatusCode -UA_ServerConfig_addSecurityPolicyAes128Sha256RsaOaep(UA_ServerConfig *config, +UA_ServerConfig_addSecurityPolicyAes128Sha256RsaOaep(UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey) { /* Allocate the SecurityPolicies */ @@ -632,7 +632,7 @@ if(!tmp) return UA_STATUSCODE_BADOUTOFMEMORY; config->securityPolicies = tmp; - + /* Populate the SecurityPolicies */ UA_ByteString localCertificate = UA_BYTESTRING_NULL; UA_ByteString localPrivateKey = UA_BYTESTRING_NULL; @@ -877,7 +877,7 @@ if(!sp) return UA_STATUSCODE_BADOUTOFMEMORY; config->securityPolicies = sp; - + retval = UA_SecurityPolicy_Basic128Rsa15(&config->securityPolicies[config->securityPoliciesSize], localCertificate, privateKey, &config->logger); if(retval == UA_STATUSCODE_GOOD) { diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_debug_dump_pkgs.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_debug_dump_pkgs.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_debug_dump_pkgs.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_debug_dump_pkgs.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2017 (c) Stefan Profanter, fortiss GmbH */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_nodestore_hashmap.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_nodestore_hashmap.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_nodestore_hashmap.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_nodestore_hashmap.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2014-2019 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Julian Grothoff diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_nodestore_ziptree.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_nodestore_ziptree.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_nodestore_ziptree.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_nodestore_ziptree.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,5 +1,5 @@ /* This work is licensed under a Creative Commons CCZero 1.0 Universal License. - * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. + * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. * * Copyright 2014-2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Julian Grothoff @@ -400,6 +400,6 @@ ns->removeNode = zipNsRemoveNode; ns->getReferenceTypeId = zipNsGetReferenceTypeId; ns->iterate = zipNsIterate; - + return UA_STATUSCODE_GOOD; } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_pubsub_ethernet.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_pubsub_ethernet.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_pubsub_ethernet.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_pubsub_ethernet.c 2022-06-24 19:01:27.000000000 +0000 @@ -830,7 +830,7 @@ UA_LOG_SOCKET_ERRNO_WRAP( UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "setsockopt SO_PRIORITY failed (%s)", errno_str)); UA_close(sockFd); - + UA_free(sockOptions.socketPriority); UA_free(channelDataEthernet); UA_free(newChannel); @@ -945,7 +945,7 @@ mreq.mr_alen = ETH_ALEN; memcpy(mreq.mr_address, channelDataEthernet->targetAddress, ETH_ALEN); - if(UA_setsockopt(channel->sockfd, SOL_PACKET, PACKET_DROP_MEMBERSHIP, (char*) &mreq, sizeof(mreq)) < 0) { + if(UA_setsockopt(channel->sockfd, SOL_PACKET, PACKET_DROP_MEMBERSHIP, (char*) &mreq, sizeof(mreq)) < 0) { UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "PubSub Connection regist failed."); return UA_STATUSCODE_BADINTERNALERROR; } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_pubsub_mqtt.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_pubsub_mqtt.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/plugins/ua_pubsub_mqtt.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/plugins/ua_pubsub_mqtt.c 2022-06-24 19:01:27.000000000 +0000 @@ -8,8 +8,8 @@ /** * This uses the mqtt/ua_mqtt_adapter.h to call mqtt functions. - * Currently only ua_mqtt_adapter.c implements this - * interface and maps them to the specific "MQTT-C" library functions. + * Currently only ua_mqtt_adapter.c implements this + * interface and maps them to the specific "MQTT-C" library functions. * Another mqtt lib could be used. * "mqtt_pal.c" forwards the network calls (send/recv) to UA_Connection (TCP). */ @@ -41,7 +41,7 @@ /** * Open mqtt connection based on the connectionConfig. - * + * * * @return ref to created channel, NULL on error */ @@ -55,7 +55,7 @@ UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "PubSub MQTT Connection creation failed. Invalid Address."); return NULL; } - + /* allocate and init memory for the Mqtt specific internal data */ UA_PubSubChannelDataMQTT * channelDataMQTT = (UA_PubSubChannelDataMQTT *) UA_calloc(1, (sizeof(UA_PubSubChannelDataMQTT))); @@ -128,7 +128,7 @@ UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "PubSub MQTT Connection creation. Unknown connection parameter."); } } - + /* Create a new channel */ UA_PubSubChannel *newChannel = (UA_PubSubChannel *) UA_calloc(1, sizeof(UA_PubSubChannel)); if(!newChannel){ @@ -158,7 +158,7 @@ return NULL; } } - + /* Allocate memory for mqtt send buffer */ if(channelDataMQTT->mqttSendBufferSize > 0){ channelDataMQTT->mqttSendBuffer = (uint8_t*)UA_calloc(channelDataMQTT->mqttSendBufferSize, sizeof(uint8_t)); @@ -177,13 +177,13 @@ return NULL; } } - + /*link channel and internal channel data*/ newChannel->handle = channelDataMQTT; - + /* MQTT Client connect call. */ UA_StatusCode ret = connectMqtt(channelDataMQTT); - + if(ret != UA_STATUSCODE_GOOD){ /* try to disconnect tcp */ disconnectMqtt(channelDataMQTT); @@ -219,7 +219,7 @@ UA_PubSubChannelDataMQTT *channelDataMQTT = (UA_PubSubChannelDataMQTT *) channel->handle; channelDataMQTT->callback = callback; - + if(transportSettings == NULL || transportSettings->encoding != UA_EXTENSIONOBJECT_DECODED || transportSettings->content.decoded.type != &UA_TYPES[UA_TYPES_BROKERDATASETREADERTRANSPORTDATATYPE]) { @@ -365,7 +365,7 @@ pubSubChannel->send = UA_PubSubChannelMQTT_send; pubSubChannel->close = UA_PubSubChannelMQTT_close; pubSubChannel->yield = UA_PubSubChannelMQTT_yield; - + pubSubChannel->connectionConfig = connectionConfig; } return pubSubChannel; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2015-2020 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2015-2016 (c) Sten Grüner diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_connect.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_connect.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_connect.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_connect.c 2022-06-24 19:01:27.000000000 +0000 @@ -128,7 +128,7 @@ "Could not instantiate the SecurityPolicy for the UserToken"); return UA_STATUSCODE_BADINTERNALERROR; } - + /* Compute the encrypted length (at least one byte padding) */ size_t plainTextBlockSize = sp->asymmetricModule.cryptoModule. encryptionAlgorithm.getRemotePlainTextBlockSize(channelContext); @@ -657,7 +657,7 @@ const UA_DataType *tokenType = client->config.userIdentityToken.content.decoded.type; /* Usertokens also have a security policy... */ - if(tokenPolicy->tokenType != UA_USERTOKENTYPE_ANONYMOUS && + if(tokenPolicy->tokenType != UA_USERTOKENTYPE_ANONYMOUS && tokenPolicy->securityPolicyUri.length > 0 && !getSecurityPolicy(client, tokenPolicy->securityPolicyUri)) { UA_LOG_INFO(&client->config.logger, UA_LOGCATEGORY_CLIENT, @@ -809,7 +809,7 @@ goto cleanup; } #endif - + /* Copy nonce and AuthenticationToken */ UA_ByteString_clear(&client->remoteNonce); UA_NodeId_clear(&client->authenticationToken); @@ -1003,15 +1003,15 @@ #if defined(UA_ENABLE_ENCRYPTION) && (UA_LOGLEVEL <= 400) for(size_t i = 0; i < client->config.securityPoliciesSize; i++) { UA_SecurityPolicy *sp = &client->config.securityPolicies[i]; - - if(sp->localCertificate.data == NULL) + + if(sp->localCertificate.data == NULL) { UA_LOG_WARNING(&client->config.logger, UA_LOGCATEGORY_CLIENT, "skip verifying ApplicationURI for the SecurityPolicy %.*s", (int)sp->policyUri.length, sp->policyUri.data); continue; } - + UA_StatusCode retval = client->config.certificateVerification. verifyApplicationURI(client->config.certificateVerification.context, diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_discovery.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_discovery.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_discovery.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_discovery.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Mark Giraud, Fraunhofer IOSB diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_highlevel.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_highlevel.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_highlevel.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_highlevel.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2015-2021 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2015 (c) Oleksiy Vasylyev @@ -1058,7 +1058,7 @@ userdata, requestId); } -UA_StatusCode +UA_StatusCode UA_Client_readIsAbstractAttribute_async(UA_Client *client, const UA_NodeId nodeId, UA_ClientAsyncReadIsAbstractAttributeCallback callback, void *userdata, UA_UInt32 *requestId) { diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_internal.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_internal.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_internal.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_internal.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2015-2016 (c) Sten Grüner * Copyright 2015-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_subscriptions.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_subscriptions.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/client/ua_client_subscriptions.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/client/ua_client_subscriptions.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2015-2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2015 (c) Oleksiy Vasylyev @@ -189,7 +189,7 @@ response.responseHeader.serviceResult = UA_STATUSCODE_BADSUBSCRIPTIONIDINVALID; return response; } - + /* Call the service */ __UA_Client_Service(client, &request, &UA_TYPES[UA_TYPES_MODIFYSUBSCRIPTIONREQUEST], @@ -355,7 +355,7 @@ UA_DeleteSubscriptionsRequest_init(&request); request.subscriptionIds = &subscriptionId; request.subscriptionIdsSize = 1; - + UA_DeleteSubscriptionsResponse response = UA_Client_Subscriptions_delete(client, request); @@ -640,7 +640,7 @@ request.timestampsToReturn = timestampsToReturn; request.itemsToCreate = (UA_MonitoredItemCreateRequest*)(uintptr_t)&item; request.itemsToCreateSize = 1; - UA_CreateMonitoredItemsResponse response = + UA_CreateMonitoredItemsResponse response = UA_Client_MonitoredItems_createDataChanges(client, request, &context, &callback, &deleteCallback); UA_MonitoredItemCreateResult result; @@ -651,7 +651,7 @@ if(result.statusCode == UA_STATUSCODE_GOOD && response.resultsSize != 1) result.statusCode = UA_STATUSCODE_BADINTERNALERROR; - + if(result.statusCode == UA_STATUSCODE_GOOD) UA_MonitoredItemCreateResult_copy(&response.results[0] , &result); UA_CreateMonitoredItemsResponse_clear(&response); @@ -696,7 +696,7 @@ request.timestampsToReturn = timestampsToReturn; request.itemsToCreate = (UA_MonitoredItemCreateRequest*)(uintptr_t)&item; request.itemsToCreateSize = 1; - UA_CreateMonitoredItemsResponse response = + UA_CreateMonitoredItemsResponse response = UA_Client_MonitoredItems_createEvents(client, request, &context, &callback, &deleteCallback); UA_StatusCode retval = response.responseHeader.serviceResult; @@ -1145,12 +1145,12 @@ "Not enough memory to store the acknowledgement for a publish " "message on subscription %" PRIu32, sub->subscriptionId); break; - } + } tmpAck->subAck.sequenceNumber = msg->sequenceNumber; tmpAck->subAck.subscriptionId = sub->subscriptionId; LIST_INSERT_HEAD(&client->pendingNotificationsAcks, tmpAck, listEntry); break; - } + } } static void @@ -1233,7 +1233,7 @@ UA_PublishRequest_delete(request); return; } - + UA_UInt32 requestId; client->currentlyOutStandingPublishRequests++; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_config.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_config.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_config.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_config.c 2022-06-24 19:01:27.000000000 +0000 @@ -51,7 +51,7 @@ static UA_StatusCode createPublishedDataSet(UA_Server *server, - const UA_PublishedDataSetDataType *publishedDataSetParameters, + const UA_PublishedDataSetDataType *publishedDataSetParameters, UA_NodeId *publishedDataSetIdent); static UA_StatusCode @@ -116,7 +116,7 @@ UA_StatusCode res = UA_STATUSCODE_GOOD; for(UA_UInt32 i = 0; i < pdsCount; i++) { res = createPublishedDataSet(server, - &configurationParameters->publishedDataSets[i], + &configurationParameters->publishedDataSets[i], &publishedDataSetIdent[i]); if(res != UA_STATUSCODE_GOOD) { UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, @@ -210,7 +210,7 @@ } /* Checks if transportLayer for the specified transportProfileUri exists. - * + * * @param server Server object that shall be configured * @param transportProfileUri String that specifies the transport protocol */ static UA_Boolean @@ -276,13 +276,13 @@ } /* Creates PubSubConnection configuration from PubSubConnectionDataType object - * + * * @param server Server object that shall be configured * @param connParams PubSub connection configuration * @param pdsCount Number of published DataSets * @param pdsIdent Array of NodeIds of the published DataSets */ static UA_StatusCode -createPubSubConnection(UA_Server *server, const UA_PubSubConnectionDataType *connParams, +createPubSubConnection(UA_Server *server, const UA_PubSubConnectionDataType *connParams, UA_UInt32 pdsCount, UA_NodeId *pdsIdent) { UA_PubSubConnectionConfig config; memset(&config, 0, sizeof(UA_PubSubConnectionConfig)); @@ -316,7 +316,7 @@ if(connParams->transportSettings.encoding == UA_EXTENSIONOBJECT_DECODED) { UA_Variant_setScalar(&(config.connectionTransportSettings), - connParams->transportSettings.content.decoded.data, + connParams->transportSettings.content.decoded.data, connParams->transportSettings.content.decoded.type); } else { UA_LOG_WARNING(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, @@ -444,7 +444,7 @@ /* Function called by UA_PubSubManager_createDataSetWriter. It searches for a * PublishedDataSet that is referenced by the DataSetWriter. If a related PDS is found, * the DSWriter will be added to the server, otherwise, no DSWriter will be added. - * + * * @param server UA_Server object that shall be configured * @param writerGroupIdent NodeId of writerGroup, the DataSetWriter belongs to * @param dsWriterConfig WriterGroup configuration @@ -471,10 +471,10 @@ if(dsWriterConfig->dataSetName.length == pdsConfig.name.length && 0 == strncmp((const char *)dsWriterConfig->dataSetName.data, - (const char *)pdsConfig.name.data, + (const char *)pdsConfig.name.data, dsWriterConfig->dataSetName.length)) { /* DSWriter will only be created, if a matching PDS is found: */ - res = UA_Server_addDataSetWriter(server, writerGroupIdent, pdsIdent[pds], + res = UA_Server_addDataSetWriter(server, writerGroupIdent, pdsIdent[pds], dsWriterConfig, &dataSetWriterIdent); if(res != UA_STATUSCODE_GOOD) { UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, @@ -508,7 +508,7 @@ * @param pdsIdent Array of NodeIds of the published DataSets */ static UA_StatusCode createDataSetWriter(UA_Server *server, - const UA_DataSetWriterDataType *dataSetWriterParameters, + const UA_DataSetWriterDataType *dataSetWriterParameters, UA_NodeId writerGroupIdent, UA_UInt32 pdsCount, const UA_NodeId *pdsIdent) { UA_DataSetWriterConfig config; @@ -541,7 +541,7 @@ * @param connectionIdent NodeId of the PubSub connection, the ReaderGroup belongs to */ static UA_StatusCode createReaderGroup(UA_Server *server, - const UA_ReaderGroupDataType *readerGroupParameters, + const UA_ReaderGroupDataType *readerGroupParameters, UA_NodeId connectionIdent) { UA_ReaderGroupConfig config; memset(&config, 0, sizeof(UA_ReaderGroupConfig)); @@ -583,7 +583,7 @@ * @param dsReaderIdent NodeId of the DataSetReader the SubscribedDataSet belongs to * @param dataSetReaderParameters Configuration Parameters of the DataSetReader */ static UA_StatusCode -addSubscribedDataSet(UA_Server *server, const UA_NodeId dsReaderIdent, +addSubscribedDataSet(UA_Server *server, const UA_NodeId dsReaderIdent, const UA_ExtensionObject *subscribedDataSet) { if(subscribedDataSet->content.decoded.type == &UA_TYPES[UA_TYPES_TARGETVARIABLESDATATYPE]) { @@ -635,7 +635,7 @@ * @param dataSetReaderParameters DataSetReader configuration * @param writerGroupIdent NodeId of readerGroupParameters, the DataSetReader belongs to */ static UA_StatusCode -createDataSetReader(UA_Server *server, const UA_DataSetReaderDataType *dsrParams, +createDataSetReader(UA_Server *server, const UA_DataSetReaderDataType *dsrParams, UA_NodeId readerGroupIdent) { UA_DataSetReaderConfig config; memset(&config, 0, sizeof(UA_DataSetReaderConfig)); @@ -698,7 +698,7 @@ * @param pdsIdent NodeId of the publishedDataSet */ static UA_StatusCode createPublishedDataSet(UA_Server *server, - const UA_PublishedDataSetDataType *pdsParams, + const UA_PublishedDataSetDataType *pdsParams, UA_NodeId *pdsIdent) { UA_PublishedDataSetConfig config; memset(&config, 0, sizeof(UA_PublishedDataSetConfig)); @@ -1082,7 +1082,7 @@ dst->transportSettings.encoding = UA_EXTENSIONOBJECT_DECODED; dst->transportSettings.content.decoded.type = src->config->connectionTransportSettings.type; - res = UA_Array_copy(src->config->connectionTransportSettings.data, 1, + res = UA_Array_copy(src->config->connectionTransportSettings.data, 1, &dst->transportSettings.content.decoded.data, src->config->connectionTransportSettings.type); @@ -1170,7 +1170,7 @@ "retrieving PubSubConnection configuration failed"); return res; } - connectionIndex++; + connectionIndex++; } return UA_STATUSCODE_GOOD; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_config.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_config.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_config.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_config.h 2022-06-24 19:01:27.000000000 +0000 @@ -17,13 +17,13 @@ /* Decodes the information from the ByteString. If the decoded content is a * PubSubConfiguration in a UABinaryFileDataType-object. It will overwrite the * current PubSub configuration from the server. */ -UA_StatusCode -UA_PubSubManager_loadPubSubConfigFromByteString(UA_Server *server, +UA_StatusCode +UA_PubSubManager_loadPubSubConfigFromByteString(UA_Server *server, const UA_ByteString buffer); /* Saves the current PubSub configuration of a server in a byteString. */ UA_StatusCode -UA_PubSubManager_getEncodedPubSubConfiguration(UA_Server *server, +UA_PubSubManager_getEncodedPubSubConfiguration(UA_Server *server, UA_ByteString *buffer); #endif /* UA_PUBSUB_CONFIG_H_ */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_manager.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_manager.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_manager.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_manager.c 2022-06-24 19:01:27.000000000 +0000 @@ -485,9 +485,9 @@ #ifdef UA_ENABLE_PUBSUB_MONITORING static UA_StatusCode -UA_PubSubComponent_createMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +UA_PubSubComponent_createMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data, UA_ServerCallback callback) { - + if ((!server) || (!data)) { UA_LOG_ERROR(&server->config.logger, UA_LOGCATEGORY_SERVER, "Error UA_PubSubComponent_createMonitoring(): " "null pointer param"); @@ -505,7 +505,7 @@ break; default: UA_LOG_ERROR(&server->config.logger, UA_LOGCATEGORY_SERVER, "UA_PubSubComponent_createMonitoring(): DataSetReader '%.*s' " - "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, + "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, eMonitoringType); ret = UA_STATUSCODE_BADNOTSUPPORTED; break; @@ -522,7 +522,7 @@ } static UA_StatusCode -UA_PubSubComponent_startMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +UA_PubSubComponent_startMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data) { if ((!server) || (!data)) { @@ -537,7 +537,7 @@ UA_DataSetReader *reader = (UA_DataSetReader*) data; switch (eMonitoringType) { case UA_PUBSUB_MONITORING_MESSAGE_RECEIVE_TIMEOUT: { - /* use a timed callback, because one notification is enough, + /* use a timed callback, because one notification is enough, we assume that MessageReceiveTimeout configuration is in [ms], we do not handle or check fractions */ UA_UInt64 interval = (UA_UInt64)(reader->config.messageReceiveTimeout * UA_DATETIME_MSEC); ret = server->config.eventLoop-> @@ -547,18 +547,18 @@ if (ret == UA_STATUSCODE_GOOD) { UA_LOG_DEBUG(&server->config.logger, UA_LOGCATEGORY_SERVER, "UA_PubSubComponent_startMonitoring(): DataSetReader '%.*s'- MessageReceiveTimeout: MessageReceiveTimeout = '%f' " - "Timer Id = '%u'", (UA_Int32) reader->config.name.length, reader->config.name.data, + "Timer Id = '%u'", (UA_Int32) reader->config.name.length, reader->config.name.data, reader->config.messageReceiveTimeout, (UA_UInt32) reader->msgRcvTimeoutTimerId); } else { UA_LOG_ERROR(&server->config.logger, UA_LOGCATEGORY_SERVER, - "Error UA_PubSubComponent_startMonitoring(): DataSetReader '%.*s' - MessageReceiveTimeout: start timer failed", + "Error UA_PubSubComponent_startMonitoring(): DataSetReader '%.*s' - MessageReceiveTimeout: start timer failed", (UA_Int32) reader->config.name.length, reader->config.name.data); } break; } default: UA_LOG_ERROR(&server->config.logger, UA_LOGCATEGORY_SERVER, "UA_PubSubComponent_startMonitoring(): DataSetReader '%.*s' " - "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, + "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, eMonitoringType); ret = UA_STATUSCODE_BADNOTSUPPORTED; break; @@ -575,7 +575,7 @@ } static UA_StatusCode -UA_PubSubComponent_stopMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +UA_PubSubComponent_stopMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data) { if ((!server) || (!data)) { @@ -593,13 +593,13 @@ server->config.eventLoop->removeCyclicCallback(server->config.eventLoop, reader->msgRcvTimeoutTimerId); UA_LOG_DEBUG(&server->config.logger, UA_LOGCATEGORY_SERVER, "UA_PubSubComponent_stopMonitoring(): DataSetReader '%.*s' - MessageReceiveTimeout: MessageReceiveTimeout = '%f' " - "Timer Id = '%u'", (UA_Int32) reader->config.name.length, reader->config.name.data, + "Timer Id = '%u'", (UA_Int32) reader->config.name.length, reader->config.name.data, reader->config.messageReceiveTimeout, (UA_UInt32) reader->msgRcvTimeoutTimerId); break; } default: UA_LOG_ERROR(&server->config.logger, UA_LOGCATEGORY_SERVER, "UA_PubSubComponent_stopMonitoring(): DataSetReader '%.*s' " - "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, + "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, eMonitoringType); ret = UA_STATUSCODE_BADNOTSUPPORTED; break; @@ -616,7 +616,7 @@ } static UA_StatusCode -UA_PubSubComponent_updateMonitoringInterval(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +UA_PubSubComponent_updateMonitoringInterval(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data) { if ((!server) || (!data)) { @@ -637,18 +637,18 @@ if (ret == UA_STATUSCODE_GOOD) { UA_LOG_DEBUG(&server->config.logger, UA_LOGCATEGORY_SERVER, "UA_PubSubComponent_updateMonitoringInterval(): DataSetReader '%.*s' - MessageReceiveTimeout: new MessageReceiveTimeout = '%f' " - "Timer Id = '%u'", (UA_Int32) reader->config.name.length, reader->config.name.data, + "Timer Id = '%u'", (UA_Int32) reader->config.name.length, reader->config.name.data, reader->config.messageReceiveTimeout, (UA_UInt32) reader->msgRcvTimeoutTimerId); } else { UA_LOG_ERROR(&server->config.logger, UA_LOGCATEGORY_SERVER, - "Error UA_PubSubComponent_updateMonitoringInterval(): DataSetReader '%.*s': update timer interval failed", + "Error UA_PubSubComponent_updateMonitoringInterval(): DataSetReader '%.*s': update timer interval failed", (UA_Int32) reader->config.name.length, reader->config.name.data); } break; } default: UA_LOG_ERROR(&server->config.logger, UA_LOGCATEGORY_SERVER, "UA_PubSubComponent_createMonitoring(): DataSetReader '%.*s' " - "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, + "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, eMonitoringType); ret = UA_STATUSCODE_BADNOTSUPPORTED; break; @@ -665,7 +665,7 @@ } static UA_StatusCode -UA_PubSubComponent_deleteMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, +UA_PubSubComponent_deleteMonitoring(UA_Server *server, UA_NodeId Id, UA_PubSubComponentEnumType eComponentType, UA_PubSubMonitoringType eMonitoringType, void *data) { if ((!server) || (!data)) { @@ -680,12 +680,12 @@ switch (eMonitoringType) { case UA_PUBSUB_MONITORING_MESSAGE_RECEIVE_TIMEOUT: UA_LOG_DEBUG(&server->config.logger, UA_LOGCATEGORY_SERVER, - "UA_PubSubComponent_deleteMonitoring(): DataSetReader '%.*s' - MessageReceiveTimeout: Timer Id = '%u'", + "UA_PubSubComponent_deleteMonitoring(): DataSetReader '%.*s' - MessageReceiveTimeout: Timer Id = '%u'", (UA_Int32) reader->config.name.length, reader->config.name.data, (UA_UInt32) reader->msgRcvTimeoutTimerId); break; default: UA_LOG_ERROR(&server->config.logger, UA_LOGCATEGORY_SERVER, "UA_PubSubComponent_deleteMonitoring(): DataSetReader '%.*s' " - "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, + "DataSetReader does not support timeout type '%i'", (UA_Int32) reader->config.name.length, reader->config.name.data, eMonitoringType); ret = UA_STATUSCODE_BADNOTSUPPORTED; break; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage.c 2022-06-24 19:01:27.000000000 +0000 @@ -225,7 +225,7 @@ UA_CHECK_STATUS(rv, return rv); // ExtendedFlags2 - if(UA_NetworkMessage_ExtendedFlags2Enabled(src)) { + if(UA_NetworkMessage_ExtendedFlags2Enabled(src)) { v = (UA_Byte)src->networkMessageType; // shift left 2 bit v = (UA_Byte) (v << NM_SHIFT_LEN); @@ -462,7 +462,7 @@ // Payload if(src->networkMessageType != UA_NETWORKMESSAGE_DATASET) return UA_STATUSCODE_BADNOTIMPLEMENTED; - + UA_Byte count = 1; if(src->payloadHeaderEnabled) { @@ -1139,10 +1139,10 @@ UA_NetworkMessage_ExtendedFlags1Enabled(const UA_NetworkMessage* src) { UA_Boolean retval = false; - if((src->publisherIdType != UA_PUBLISHERDATATYPE_BYTE) - || src->dataSetClassIdEnabled - || src->securityEnabled - || src->timestampEnabled + if((src->publisherIdType != UA_PUBLISHERDATATYPE_BYTE) + || src->dataSetClassIdEnabled + || src->securityEnabled + || src->timestampEnabled || src->picosecondsEnabled || UA_NetworkMessage_ExtendedFlags2Enabled(src)) { @@ -1172,7 +1172,7 @@ UA_DataSetMessageHeader_encodeBinary(const UA_DataSetMessageHeader* src, UA_Byte **bufPos, const UA_Byte *bufEnd) { UA_Byte v; - // DataSetFlags1 + // DataSetFlags1 v = (UA_Byte)src->fieldEncoding; // shift left 1 bit v = (UA_Byte)(v << DS_MH_SHIFT_LEN); @@ -1213,7 +1213,7 @@ } // DataSetMessageSequenceNr - if(src->dataSetMessageSequenceNrEnabled) { + if(src->dataSetMessageSequenceNrEnabled) { rv = UA_UInt16_encodeBinary(&src->dataSetMessageSequenceNr, bufPos, bufEnd); UA_CHECK_STATUS(rv, return rv); } @@ -1307,7 +1307,7 @@ UA_Byte v2 = v & DS_MESSAGEHEADER_FIELD_ENCODING_MASK; v2 = (UA_Byte)(v2 >> DS_MH_SHIFT_LEN); dst->fieldEncoding = (UA_FieldEncoding)v2; - + if((v & DS_MESSAGEHEADER_DS_MSG_VALID) != 0) dst->dataSetMessageValid = true; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage.h 2022-06-24 19:01:27.000000000 +0000 @@ -168,18 +168,18 @@ union { UA_DataSetPayloadHeader dataSetPayloadHeader; } payloadHeader; - + UA_DateTime timestamp; UA_UInt16 picoseconds; UA_UInt16 promotedFieldsSize; UA_Variant* promotedFields; /* BaseDataType */ - + UA_NetworkMessageSecurityHeader securityHeader; union { UA_DataSetPayload dataSetPayload; } payload; - + UA_ByteString securityFooter; } UA_NetworkMessage; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage_json.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage_json.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage_json.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_networkmessage_json.c 2022-06-24 19:01:27.000000000 +0000 @@ -472,7 +472,7 @@ //TODO: MetaData if(!isUaData) return UA_STATUSCODE_BADNOTIMPLEMENTED; - + /* Network Message */ UA_String messageType; DecodeEntry entries[5] = { diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_ns0.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_ns0.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_ns0.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_ns0.c 2022-06-24 19:01:27.000000000 +0000 @@ -1590,7 +1590,7 @@ /* Adds method node to server. This method is used to load binary files for * PubSub configuration and delete / replace old PubSub configurations. */ -static UA_StatusCode +static UA_StatusCode UA_addLoadPubSubConfigMethod(UA_Server *server) { UA_Argument inputArgument; UA_Argument_init(&inputArgument); @@ -1627,7 +1627,7 @@ /* Adds method node to server. This method is used to delete the current PubSub * configuration. */ -static UA_StatusCode +static UA_StatusCode UA_addDeletePubSubConfigMethod(UA_Server *server) { UA_MethodAttributes configAttr = UA_MethodAttributes_default; configAttr.description = UA_LOCALIZEDTEXT("","Delete current PubSub configuration"); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_writer.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_writer.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_writer.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_writer.c 2022-06-24 19:01:27.000000000 +0000 @@ -761,7 +761,7 @@ if(!dataSetWriterConfig) return UA_STATUSCODE_BADINVALIDARGUMENT; - /* Make checks for a heartbeat */ + /* Make checks for a heartbeat */ if(UA_NodeId_isNull(&dataSet) && dataSetWriterConfig->keyFrameCount != 1) { UA_LOG_WARNING(&server->config.logger, UA_LOGCATEGORY_SERVER, "Adding DataSetWriter failed. DataSet can be null only for a heartbeat, " diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_writergroup.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_writergroup.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_writergroup.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/pubsub/ua_pubsub_writergroup.c 2022-06-24 19:01:27.000000000 +0000 @@ -384,7 +384,7 @@ /* Already unfrozen */ if(!wg->configurationFrozen) return UA_STATUSCODE_GOOD; - + //if(wg->config.rtLevel == UA_PUBSUB_RT_NONE){ // UA_LOG_WARNING(&server->config.logger, UA_LOGCATEGORY_SERVER, // "PubSub configuration freeze without RT configuration has no effect."); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_async.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_async.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_async.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_async.c 2022-06-24 19:01:27.000000000 +0000 @@ -259,7 +259,7 @@ UA_StatusCode result = UA_CallMethodRequest_copy(opRequest, &ao->request); if(result != UA_STATUSCODE_GOOD) { UA_LOG_ERROR(&server->config.logger, UA_LOGCATEGORY_SERVER, - "UA_Server_SetAsyncMethodResult: UA_CallMethodRequest_copy failed."); + "UA_Server_SetAsyncMethodResult: UA_CallMethodRequest_copy failed."); UA_free(ao); return result; } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_async.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_async.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_async.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_async.h 2022-06-24 19:01:27.000000000 +0000 @@ -63,7 +63,7 @@ /* Operations for the workers. The queues are all FIFO: Put in at the tail, * take out at the head.*/ UA_Lock queueLock; - UA_AsyncOperationQueue newQueue; /* New operations for the workers */ + UA_AsyncOperationQueue newQueue; /* New operations for the workers */ UA_AsyncOperationQueue dispatchedQueue; /* Operations taken by a worker. When a result is * returned, we search for the op here to see if it * is still "alive" (not timed out). */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2014-2017 (c) Florian Palm @@ -567,7 +567,7 @@ server->serverDiagnosticsSummary.sessionTimeoutCount; stat.ss.sessionAbortCount = server->serverDiagnosticsSummary.sessionAbortCount; - + return stat; } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_config.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_config.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_config.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_config.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2019 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2019 (c) HMS Industrial Networks AB (Author: Jonas Green) diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_discovery.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_discovery.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_discovery.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_discovery.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Stefan Profanter, fortiss GmbH diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_discovery_mdns.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_discovery_mdns.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_discovery_mdns.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_discovery_mdns.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2017 (c) Stefan Profanter, fortiss GmbH * Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_internal.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_internal.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_internal.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_internal.h 2022-06-24 19:01:27.000000000 +0000 @@ -310,7 +310,7 @@ referenceTypeIndices(UA_Server *server, const UA_NodeId *refType, UA_ReferenceTypeSet *indices, UA_Boolean includeSubtypes); -/* Returns the recursive type and interface hierarchy of the node */ +/* Returns the recursive type and interface hierarchy of the node */ UA_StatusCode getParentTypeAndInterfaceHierarchy(UA_Server *server, const UA_NodeId *typeNode, UA_NodeId **typeHierarchy, size_t *typeHierarchySize); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_ns0_diagnostics.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_ns0_diagnostics.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_ns0_diagnostics.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_ns0_diagnostics.c 2022-06-24 19:01:27.000000000 +0000 @@ -332,7 +332,7 @@ UA_Session *session = UA_Server_getSessionById(server, sessionId); if(!session) return UA_STATUSCODE_BADINTERNALERROR; - + /* Read the BrowseName */ UA_QualifiedName bn; UA_StatusCode res = readWithReadValue(server, nodeId, UA_ATTRIBUTEID_BROWSENAME, &bn); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_utils.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_utils.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_server_utils.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_server_utils.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2016-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2016 (c) Lorenz Haas diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_attribute.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_attribute.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_attribute.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_attribute.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2015-2016 (c) Sten Grüner @@ -552,7 +552,7 @@ UA_StructureDefinition def; retval = getStructureDefinition(type, &def); if(UA_STATUSCODE_GOOD!=retval) - break; + break; retval = UA_Variant_setScalarCopy(&v->value, &def, &UA_TYPES[UA_TYPES_STRUCTUREDEFINITION]); UA_free(def.fields); @@ -895,7 +895,7 @@ } return true; } - + /* case >= 1, UA_VALUERANK_ONE_DIMENSION: the value is an array with the specified number of dimensions */ if(arrayDimensionsSize != (size_t)valueRank) { diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_discovery_multicast.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_discovery_multicast.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_discovery_multicast.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_discovery_multicast.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2017 (c) Stefan Profanter, fortiss GmbH * Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) @@ -145,7 +145,7 @@ # endif } -/* All filter criteria must be fulfilled in the list entry. The comparison is case +/* All filter criteria must be fulfilled in the list entry. The comparison is case * insensitive. * @returns true if the entry matches the filter. False if the filter does not match. * */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2014-2017 (c) Florian Palm diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_monitoreditem.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_monitoreditem.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_monitoreditem.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_monitoreditem.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2016-2017 (c) Florian Palm @@ -96,7 +96,7 @@ response->responseHeader.serviceResult = UA_STATUSCODE_BADSUBSCRIPTIONIDINVALID; return; } - + /* Get the MonitoredItem */ UA_MonitoredItem *mon = UA_Subscription_getMonitoredItem(sub, request->triggeringItemId); if(!mon) { @@ -217,7 +217,7 @@ UA_NODESTORE_RELEASE(server, node); } } - + /* Adjust to sampling interval to lie within the limits */ if(params->samplingInterval <= 0.0) { /* A sampling interval of zero is possible and indicates that the diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_nodemanagement.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_nodemanagement.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_nodemanagement.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_nodemanagement.c 2022-06-24 19:01:27.000000000 +0000 @@ -681,10 +681,10 @@ * manually added by the user during addnode_begin and addnode_finish. */ /* For now we keep all the modelling rule references and delete all others */ const UA_NodeId nodeId_typesFolder= UA_NODEID_NUMERIC(0, UA_NS0ID_TYPESFOLDER); - const UA_ReferenceTypeSet reftypes_aggregates = + const UA_ReferenceTypeSet reftypes_aggregates = UA_REFTYPESET(UA_REFERENCETYPEINDEX_AGGREGATES); UA_ReferenceTypeSet reftypes_skipped; - /* Check if the hasModellingRule-reference is required (configured or node in an + /* Check if the hasModellingRule-reference is required (configured or node in an instance declaration) */ if(server->config.modellingRulesOnInstances || isNodeInTree(server, destinationNodeId, @@ -737,8 +737,8 @@ deleteNode(server, newNodeId, true); return retval; } - - /* Clean up. Because it can happen that a string is assigned as ID at + + /* Clean up. Because it can happen that a string is assigned as ID at * generateChildNodeId. */ UA_NodeId_clear(&newNodeId); } @@ -921,7 +921,7 @@ UA_ReferenceTypeSet refTypes = UA_ReferenceTypeSet_union(refTypes1, refTypes2); if(retval != UA_STATUSCODE_GOOD) goto cleanup; - + /* Abstract variable is allowed if parent is a children of a * base data variable. An abstract variable may be part of an * object type which again is below BaseObjectType */ @@ -954,12 +954,12 @@ const UA_NodeId objectTypes = UA_NODEID_NUMERIC(0, UA_NS0ID_BASEOBJECTTYPE); UA_Boolean isInBaseObjectType = isNodeInTree(server, parentNodeId, &objectTypes, &refTypes); - + const UA_NodeId eventTypes = UA_NODEID_NUMERIC(0, UA_NS0ID_BASEEVENTTYPE); UA_Boolean isInBaseEventType = isNodeInTree_singleRef(server, &type->head.nodeId, &eventTypes, UA_REFERENCETYPEINDEX_HASSUBTYPE); - + if(!isInBaseObjectType && !(isInBaseEventType && UA_NodeId_isNull(parentNodeId))) { logAddNode(&server->config.logger, session, nodeId, @@ -1398,7 +1398,7 @@ /* Set the variable to "dynamic" */ UA_Server_editNode(server, session, nodeId, (UA_EditNodeCallback)setVariableNodeDynamic, NULL); - + return UA_STATUSCODE_GOOD; } @@ -1750,7 +1750,7 @@ lifecycle = &type->objectTypeNode.lifecycle; else lifecycle = &type->variableTypeNode.lifecycle; - + /* Call the destructor */ if(lifecycle->destructor) { UA_UNLOCK(&server->serviceMutex); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_securechannel.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_securechannel.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_securechannel.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_securechannel.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2014, 2017 (c) Florian Palm diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_subscription.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_subscription.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_subscription.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_subscription.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2018, 2022 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2016-2017 (c) Florian Palm diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_view.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_view.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_services_view.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_services_view.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2019 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2014-2017 (c) Florian Palm @@ -184,7 +184,7 @@ UA_ReferenceTypeSet reftypes = UA_REFTYPESET(relevantRefTypeIndex); return isNodeInTree(server, leafNode, nodeToFind, &reftypes); } - + static enum ZIP_CMP cmpTarget(const void *a, const void *b) { const RefEntry *aa = (const RefEntry*)a; @@ -525,7 +525,7 @@ UA_ExpandedNodeId en = UA_NodePointer_toExpandedNodeId(nodeP); retval = UA_ExpandedNodeId_copy(&en, &descr->nodeId); if(mask & UA_BROWSERESULTMASK_REFERENCETYPEID) { - const UA_NodeId *refTypeId = + const UA_NodeId *refTypeId = UA_NODESTORE_GETREFERENCETYPEID(server, ref->referenceTypeIndex); retval |= UA_NodeId_copy(refTypeId, &descr->referenceTypeId); } @@ -537,7 +537,7 @@ UA_ReferenceDescription_clear(descr); return retval; } - + /* Fields that require the actual node */ if(mask & UA_BROWSERESULTMASK_NODECLASS) descr->nodeClass = curr->head.nodeClass; @@ -1093,7 +1093,7 @@ aa_find(&_refNameTree, &browseNameHash); if(!rt) continue; - + res = recursiveAddBrowseHashTarget(next, &_refNameTree, rt); if(res != UA_STATUSCODE_GOOD) break; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_session.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_session.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_session.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_session.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2018 (c) Thomas Stalder, Blue Time Concept SA @@ -158,7 +158,7 @@ /* Reduce the number of outstanding retransmissions */ session->totalRetransmissionQueueSize -= sub->retransmissionQueueSize; - + /* Send remaining publish responses if the last subscription was removed */ if(!releasePublishResponses || !TAILQ_EMPTY(&session->subscriptions)) return; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_session.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_session.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_session.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_session.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2019 (c) HMS Industrial Networks AB (Author: Jonas Green) diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_subscription_alarms_conditions.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_subscription_alarms_conditions.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_subscription_alarms_conditions.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_subscription_alarms_conditions.c 2022-06-24 19:01:27.000000000 +0000 @@ -217,7 +217,7 @@ UA_Condition *c = getCondition(server, &conditionSource, &condition); if(!c) return UA_STATUSCODE_BADNOTFOUND; - + /* Set the callback */ switch(callbackType) { case UA_ENTERING_ENABLEDSTATE: @@ -653,16 +653,16 @@ UA_StatusCode retval = UA_Server_setConditionField(server, triggeredNode, &value, fieldMessageQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set Condition Message failed",); - + UA_Variant_setScalar(&value, &enableText, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); retval = UA_Server_setConditionField(server, triggeredNode, &value, fieldEnabledStateQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set Condition EnabledState text failed",); - + UA_Boolean retain = false; UA_Variant_setScalar(&value, &retain, &UA_TYPES[UA_TYPES_BOOLEAN]); retval = UA_Server_setConditionField(server, triggeredNode, &value, fieldRetainQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set Condition Retain failed",); - + /* Trigger event */ UA_ByteString lastEventId = UA_BYTESTRING_NULL; /* Trigger the event for Condition or its Branch */ @@ -671,13 +671,13 @@ retval = UA_Server_triggerEvent(server, triggeredNode, *conditionSource, &lastEventId, false); CONDITION_ASSERT_RETURN_RETVAL(retval, "Triggering condition event failed",); setIsCallerAC(server, &triggeredNode, conditionSource, false); - + /* Update list */ retval = updateConditionLastEventId(server, &triggeredNode, conditionSource, &lastEventId); UA_ByteString_clear(&lastEventId); CONDITION_ASSERT_RETURN_RETVAL(retval, "updating condition event failed",); } - + return UA_STATUSCODE_GOOD; } @@ -702,7 +702,7 @@ triggeredNode = cond->conditionId; else //enable branches triggeredNode = branch->conditionBranchId; - + UA_LocalizedText message = UA_LOCALIZEDTEXT(LOCALE, ENABLED_MESSAGE); UA_LocalizedText enableText = UA_LOCALIZEDTEXT(LOCALE, ENABLED_TEXT); UA_Variant value; @@ -710,24 +710,24 @@ UA_StatusCode retval = UA_Server_setConditionField(server, triggeredNode, &value, fieldMessageQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "set Condition Message failed",); - + UA_Variant_setScalar(&value, &enableText, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); retval = UA_Server_setConditionField(server, triggeredNode, &value, fieldEnabledStateQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "set Condition EnabledState text failed",); - + /* User callback TODO how should branches be evaluated? see p.19 (5.5.2) */ UA_Boolean removeBranch = false;//not used retval = callConditionTwoStateVariableCallback(server, &triggeredNode, conditionSource, &removeBranch, UA_ENTERING_ENABLEDSTATE); CONDITION_ASSERT_RETURN_RETVAL(retval, "calling condition callback failed",); - + /* Trigger event */ //Condition Nodes should not be deleted after triggering the event retval = UA_Server_triggerConditionEvent(server, triggeredNode, *conditionSource, NULL); CONDITION_ASSERT_RETURN_RETVAL(retval, "triggering condition event failed",); } - + return UA_STATUSCODE_GOOD; } @@ -837,21 +837,21 @@ retval = UA_Server_setConditionField(server, conditionNode, &value, fieldMessageQN); CONDITION_ASSERT_RETURN_VOID(retval, "Set Condition Message failed", UA_NodeId_clear(&conditionNode);); - + /* Set AckedState text */ UA_LocalizedText text = UA_LOCALIZEDTEXT(LOCALE, ACKED_TEXT); UA_Variant_setScalar(&value, &text, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); retval = UA_Server_setConditionField(server, conditionNode, &value, fieldAckedStateQN); CONDITION_ASSERT_RETURN_VOID(retval, "Set Condition AckedState failed", UA_NodeId_clear(&conditionNode);); - + /* Get conditionSource */ UA_NodeId conditionSource; retval = getNodeIdValueOfConditionField(server, &conditionNode, fieldSourceQN, &conditionSource); CONDITION_ASSERT_RETURN_VOID(retval, "ConditionSource not found", UA_NodeId_clear(&conditionNode);); - + /* User callback*/ UA_Boolean removeBranch = false; retval = callConditionTwoStateVariableCallback(server, &conditionNode, &conditionSource, @@ -859,7 +859,7 @@ CONDITION_ASSERT_RETURN_VOID(retval, "Calling condition callback failed", UA_NodeId_clear(&conditionNode); UA_NodeId_clear(&conditionSource);); - + /* Trigger event */ //Condition Nodes should not be deleted after triggering the event retval = UA_Server_triggerConditionEvent(server, conditionNode, conditionSource, NULL); @@ -895,7 +895,7 @@ &UA_TYPES[UA_TYPES_DATETIME]); CONDITION_ASSERT_RETURN_VOID(retval, "Set deactivating Time failed", UA_NodeId_clear(&conditionNode);); - + /* Set ConfirmedState text to (Unconfirmed)*/ UA_LocalizedText text = UA_LOCALIZEDTEXT(LOCALE, UNCONFIRMED_TEXT); UA_Variant_setScalar(&value, &text, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); @@ -925,27 +925,27 @@ &UA_TYPES[UA_TYPES_DATETIME]); CONDITION_ASSERT_RETURN_VOID(retval, "Set Confirming Time failed", UA_NodeId_clear(&conditionNode);); - + /* Set Message */ UA_LocalizedText message = UA_LOCALIZEDTEXT(LOCALE, CONFIRMED_MESSAGE); UA_Variant_setScalar(&value, &message, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); retval = UA_Server_setConditionField(server, conditionNode, &value, fieldMessageQN); CONDITION_ASSERT_RETURN_VOID(retval, "Set Condition Message failed", UA_NodeId_clear(&conditionNode);); - + /* Set ConfirmedState text */ UA_LocalizedText text = UA_LOCALIZEDTEXT(LOCALE, CONFIRMED_TEXT); UA_Variant_setScalar(&value, &text, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); retval = UA_Server_setConditionField(server, conditionNode, &value, fieldConfirmedStateQN); CONDITION_ASSERT_RETURN_VOID(retval, "Set Condition ConfirmedState failed", UA_NodeId_clear(&conditionNode);); - + /* Get conditionSource */ UA_NodeId conditionSource; retval = getNodeIdValueOfConditionField(server, &conditionNode, fieldSourceQN, &conditionSource); CONDITION_ASSERT_RETURN_VOID(retval, "ConditionSource not found", UA_NodeId_clear(&conditionNode);); - + /* User callback*/ UA_Boolean removeBranch = false; retval = callConditionTwoStateVariableCallback(server, &conditionNode, @@ -954,7 +954,7 @@ CONDITION_ASSERT_RETURN_VOID(retval, "Calling condition callback failed", UA_NodeId_clear(&conditionNode); UA_NodeId_clear(&conditionSource);); - + /* Trigger event */ //Condition Nodes should not be deleted after triggering the event retval = UA_Server_triggerConditionEvent(server, conditionNode, conditionSource, NULL); @@ -1080,7 +1080,7 @@ CONDITION_ASSERT_RETURN_VOID(retval, "Set Condition ActiveState failed", UA_NodeId_clear(&conditionNode); UA_NodeId_clear(&conditionSource);); - + /* Set deactivating time */ retval = UA_Server_writeObjectProperty_scalar(server, conditionNode, fieldTimeQN, &data->sourceTimestamp, @@ -1088,7 +1088,7 @@ CONDITION_ASSERT_RETURN_VOID(retval, "Set deactivating Time failed", UA_NodeId_clear(&conditionNode); UA_NodeId_clear(&conditionSource);); - + retval = updateConditionActiveState(server, &conditionSource, &conditionNode, currentActiveState, UA_INACTIVE, isLimitalarm); UA_NodeId_clear(&conditionSource); @@ -1239,7 +1239,7 @@ /* Check if disabled */ if(isTwoStateVariableInTrueState(server, objectId, &fieldEnabledStateQN)) return UA_STATUSCODE_BADCONDITIONALREADYENABLED; - + /* Enable by writing true to EnabledStateId--> will cause a callback to * trigger the new events */ UA_Variant value; @@ -1295,21 +1295,21 @@ fieldComment, fieldSourceTimeStamp); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set Condition EnabledState text failed", UA_NodeId_clear(&triggerEvent);); - + /* Set adding comment time (the same value of SourceTimestamp) */ retval = UA_Server_writeObjectProperty_scalar(server, triggerEvent, fieldTimeQN, &fieldSourceTimeStampValue, &UA_TYPES[UA_TYPES_DATETIME]); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set enabling/disabling Time failed", UA_NodeId_clear(&triggerEvent);); - + /* Set Message */ message = UA_LOCALIZEDTEXT(LOCALE, COMMENT_MESSAGE); UA_Variant_setScalar(&value, &message, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); retval = UA_Server_setConditionField(server, triggerEvent, &value, fieldMessageQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set Condition Message failed", UA_NodeId_clear(&triggerEvent);); - + /* Set Comment. Check whether comment is empty -> leave the last value as is*/ UA_LocalizedText *inputComment = (UA_LocalizedText *)input[1].data; UA_String nullString = UA_STRING_NULL; @@ -1320,13 +1320,13 @@ CONDITION_ASSERT_RETURN_RETVAL(retval, "Set Condition Comment failed", UA_NodeId_clear(&triggerEvent);); } - + /* Get conditionSource */ UA_NodeId conditionSource; retval = getNodeIdValueOfConditionField(server, &triggerEvent, fieldSourceQN, &conditionSource); CONDITION_ASSERT_RETURN_RETVAL(retval, "ConditionSource not found", UA_NodeId_clear(&triggerEvent);); - + /* Trigger event */ //Condition Nodes should not be deleted after triggering the event retval = UA_Server_triggerConditionEvent(server, triggerEvent, conditionSource, NULL); @@ -1375,7 +1375,7 @@ &eventType); CONDITION_ASSERT_RETURN_RETVAL(retval, "EventType not found", UA_NodeId_clear(&conditionNode);); - + /* Check if ConditionType is subType of AcknowledgeableConditionType TODO Over Kill*/ UA_NodeId AcknowledgeableConditionTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ACKNOWLEDGEABLECONDITIONTYPE); @@ -1387,9 +1387,9 @@ UA_NodeId_clear(&eventType); return UA_STATUSCODE_BADNODEIDINVALID; } - + UA_NodeId_clear(&eventType); - + /* Set Comment. Check whether comment is empty -> leave the last value as is*/ UA_LocalizedText *inputComment = (UA_LocalizedText *)input[1].data; UA_String nullString = UA_STRING_NULL; @@ -1451,7 +1451,7 @@ &eventType); CONDITION_ASSERT_RETURN_RETVAL(retval, "EventType not found", UA_NodeId_clear(&conditionNode);); - + /* Check if ConditionType is subType of AcknowledgeableConditionType. */ UA_NodeId AcknowledgeableConditionTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ACKNOWLEDGEABLECONDITIONTYPE); @@ -1463,9 +1463,9 @@ UA_NodeId_clear(&eventType); return UA_STATUSCODE_BADNODEIDINVALID; } - + UA_NodeId_clear(&eventType); - + /* Set Comment. Check whether comment is empty -> leave the last value as is*/ UA_LocalizedText *inputComment = (UA_LocalizedText *)input[1].data; UA_String nullString = UA_STRING_NULL; @@ -1476,7 +1476,7 @@ CONDITION_ASSERT_RETURN_RETVAL(retval, "Set Condition Comment failed", UA_NodeId_clear(&conditionNode);); } - + /* Set ConfirmedStateId */ UA_Boolean idValue = true; UA_Variant_setScalar(&value, &idValue, &UA_TYPES[UA_TYPES_BOOLEAN]); @@ -1658,7 +1658,7 @@ &refreshEvents[REFRESHEVENT_START_IDX], &refreshEvents[REFRESHEVENT_END_IDX]); CONDITION_ASSERT_RETURN_RETVAL(retval, "Create Event RefreshStart or RefreshEnd failed",); - + /* Trigger RefreshStartEvent and RefreshEndEvent for the each monitoredItem * in the subscription */ UA_MonitoredItem *monitoredItem = @@ -1693,7 +1693,7 @@ setRefreshMethodEvents(server, &refreshEvents[REFRESHEVENT_START_IDX], &refreshEvents[REFRESHEVENT_END_IDX]); CONDITION_ASSERT_RETURN_RETVAL(retval, "Create Event RefreshStart or RefreshEnd failed",); - + /* Trigger RefreshStartEvent and RefreshEndEvent for the each monitoredItem * in the subscription */ //TODO when there are a lot of monitoreditems (not only events)? @@ -1946,18 +1946,18 @@ if(!isNodeInTree_singleRef(server, conditionType, &acknowledgeableConditionTypeId, UA_REFERENCETYPEINDEX_HASSUBTYPE)) return UA_STATUSCODE_GOOD; - + /* Set AckedState (Id = false by default) */ text = UA_LOCALIZEDTEXT(LOCALE, UNACKED_TEXT); UA_Variant_setScalar(&value, &text, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); retval = UA_Server_setConditionField(server, *condition, &value, fieldAckedStateQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set AckedState Field failed",); - + UA_Variant_setScalar(&value, &stateId, &UA_TYPES[UA_TYPES_BOOLEAN]); retval = UA_Server_setConditionVariableFieldProperty(server, *condition, &value, fieldAckedStateQN, twoStateVariableIdQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set AckedState/Id Field failed",); - + #ifdef CONDITIONOPTIONALFIELDS_SUPPORT /* add optional field ConfirmedState*/ retval = UA_Server_addConditionOptionalField(server, *condition, acknowledgeableConditionTypeId, @@ -1969,14 +1969,14 @@ UA_Variant_setScalar(&value, &text, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); retval = UA_Server_setConditionField(server, *condition, &value, fieldConfirmedStateQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set ConfirmedState Field failed",); - + UA_Variant_setScalar(&value, &stateId, &UA_TYPES[UA_TYPES_BOOLEAN]); retval = UA_Server_setConditionVariableFieldProperty(server, *condition, &value, fieldConfirmedStateQN, twoStateVariableIdQN); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set EnabledState/Id Field failed",); #endif//CONDITIONOPTIONALFIELDS_SUPPORT - + /* 2. Check if ConditionType is subType of AlarmConditionType */ UA_NodeId alarmConditionTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ALARMCONDITIONTYPE); if(isNodeInTree_singleRef(server, conditionType, &alarmConditionTypeId, @@ -2146,7 +2146,7 @@ if(LIST_EMPTY(&server->conditionSources)) { retval = setConditionMethodCallbacks(server, condition, conditionType); CONDITION_ASSERT_RETURN_RETVAL(retval, "Set Method Callback failed",); - + // Create RefreshEvents if(UA_NodeId_isNull(&refreshEvents[REFRESHEVENT_START_IDX]) && UA_NodeId_isNull(&refreshEvents[REFRESHEVENT_END_IDX])) { @@ -2155,7 +2155,7 @@ CONDITION_ASSERT_RETURN_RETVAL(retval, "Create RefreshEvents failed",); } } - + return retval; } @@ -2302,7 +2302,7 @@ referenceToParent = UA_NODEID_NUMERIC(0, UA_NS0ID_HASPROPERTY); else referenceToParent = UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT); - + /* Set a random unused NodeId with specified Namespace Index*/ UA_NodeId optionalVariable = {originCondition->namespaceIndex, UA_NODEIDTYPE_NUMERIC, {0}}; retval = UA_Server_addVariableNode(server, optionalVariable, *originCondition, @@ -2340,7 +2340,7 @@ referenceToParent = UA_NODEID_NUMERIC(0, UA_NS0ID_HASPROPERTY); else referenceToParent = UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT); - + UA_NodeId optionalObject = {originCondition->namespaceIndex, UA_NODEIDTYPE_NUMERIC, {0}}; retval = UA_Server_addObjectNode(server, optionalObject, *originCondition, referenceToParent, *fieldName, type->head.nodeId, @@ -2505,9 +2505,9 @@ //Condition Nodes should not be deleted after triggering the event UA_StatusCode retval = UA_Server_triggerEvent(server, condition, conditionSource, &eventId, false); CONDITION_ASSERT_RETURN_RETVAL(retval, "Triggering condition event failed",); - + setIsCallerAC(server, &condition, &conditionSource, false); - + /* Update list */ retval = updateConditionLastEventId(server, &condition, &conditionSource, &eventId); if(outEventId) diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_subscription_events_filter.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_subscription_events_filter.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_subscription_events_filter.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_subscription_events_filter.c 2022-06-24 19:01:27.000000000 +0000 @@ -233,7 +233,7 @@ if(secondBoolean == UA_STATUSCODE_GOOD) { ctx->valueResult[ctx->index].type = &UA_TYPES[UA_TYPES_BOOLEAN]; return UA_STATUSCODE_GOOD; - } + } if((firstBoolean_or == UA_STATUSCODE_BADNOMATCH) && (secondBoolean == UA_STATUSCODE_BADNOMATCH)) { ctx->valueResult[ctx->index].type = &UA_TYPES[UA_TYPES_BOOLEAN]; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_subscription_monitoreditem.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_subscription_monitoreditem.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/server/ua_subscription_monitoreditem.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/server/ua_subscription_monitoreditem.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2017-2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Stefan Profanter, fortiss GmbH @@ -619,7 +619,7 @@ /* Nothing to do */ if(mon->queueSize - mon->eventOverflows <= mon->parameters.queueSize) return; - + /* Remove notifications until the required queue size is reached */ UA_Boolean reporting = false; size_t remove = mon->queueSize - mon->eventOverflows - mon->parameters.queueSize; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_connection_internal.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_connection_internal.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_connection_internal.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_connection_internal.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2016-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2016-2017 (c) Stefan Profanter, fortiss GmbH diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_securechannel.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_securechannel.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_securechannel.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_securechannel.c 2022-06-24 19:01:27.000000000 +0000 @@ -660,7 +660,7 @@ UA_ByteString payload; res = UA_ByteString_allocBuffer(&payload, messageSize); UA_CHECK_STATUS(res, return res); - + /* Assemble the full message */ size_t offset = 0; while(true) { @@ -673,7 +673,7 @@ if(ct == UA_CHUNKTYPE_FINAL) break; } - + /* Process the assembled message */ res = callback(application, channel, messageType, requestId, &payload); UA_ByteString_clear(&payload); @@ -910,7 +910,7 @@ UA_ProcessMessageCallback callback, UA_UInt32 timeout) { UA_Connection *connection = channel->connection; UA_CHECK_MEM(connection, return UA_STATUSCODE_BADINTERNALERROR); - + /* Listen for messages to arrive */ UA_ByteString buffer = UA_BYTESTRING_NULL; UA_StatusCode res = connection->recv(connection, &buffer, timeout); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_securechannel_crypto.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_securechannel_crypto.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_securechannel_crypto.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_securechannel_crypto.c 2022-06-24 19:01:27.000000000 +0000 @@ -338,10 +338,10 @@ /* Encrypt */ UA_ByteString dataToEncrypt; dataToEncrypt.data = messageContext->messageBuffer.data + - UA_SECURECHANNEL_CHANNELHEADER_LENGTH + + UA_SECURECHANNEL_CHANNELHEADER_LENGTH + UA_SECURECHANNEL_SYMMETRIC_SECURITYHEADER_LENGTH; dataToEncrypt.length = totalLength - - (UA_SECURECHANNEL_CHANNELHEADER_LENGTH + + (UA_SECURECHANNEL_CHANNELHEADER_LENGTH + UA_SECURECHANNEL_SYMMETRIC_SECURITYHEADER_LENGTH); return sp->symmetricModule.cryptoModule.encryptionAlgorithm. encrypt(channel->channelContext, &dataToEncrypt); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_securechannel.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_securechannel.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_securechannel.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_securechannel.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2020 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2017 (c) Florian Palm diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2020 (c) Fraunhofer IOSB (Author: Andreas Ebner) * Copyright 2014-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) @@ -1392,7 +1392,7 @@ (const UA_String*)&p2->content.encoded.body, NULL); return o; } - + case UA_EXTENSIONOBJECT_DECODED: default: { const UA_DataType *type1 = p1->content.decoded.type; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_encoding_binary.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_encoding_binary.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_encoding_binary.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_encoding_binary.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2020 (c) Fraunhofer IOSB (Author: Andreas Ebner) * Copyright 2020 (c) Grigory Friedman @@ -1193,7 +1193,7 @@ encodingMask |= (u8)(src->hasAdditionalInfo << 4u); encodingMask |= (u8)(src->hasInnerStatusCode << 5u); encodingMask |= (u8)(src->hasInnerDiagnosticInfo << 6u); - + /* Encode the numeric content */ status ret = ENCODE_DIRECT(&encodingMask, Byte); if(src->hasSymbolicId) diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_encoding_binary.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_encoding_binary.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_encoding_binary.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_encoding_binary.h 2022-06-24 19:01:27.000000000 +0000 @@ -37,7 +37,7 @@ Is ignored if NULL. * @param exchangeHandle Custom data passed into the exchangeCallback. * @return Returns a statuscode whether encoding succeeded. */ -UA_StatusCode +UA_StatusCode UA_encodeBinaryInternal(const void *src, const UA_DataType *type, UA_Byte **bufPos, const UA_Byte **bufEnd, UA_exchangeEncodeBuffer exchangeCallback, diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_encoding_json.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_encoding_json.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_encoding_json.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_encoding_json.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2018 (c) Fraunhofer IOSB (Author: Lukas Meling) @@ -504,7 +504,7 @@ break; /* TODO: Why is this commented? */ - /* slash + /* slash if((flags & JSON_ESCAPE_SLASH) && codepoint == '/') break;*/ @@ -1023,8 +1023,8 @@ } static status -addMultiArrayContentJSON(CtxJson *ctx, void* array, const UA_DataType *type, - size_t *index, UA_UInt32 *arrayDimensions, size_t dimensionIndex, +addMultiArrayContentJSON(CtxJson *ctx, void* array, const UA_DataType *type, + size_t *index, UA_UInt32 *arrayDimensions, size_t dimensionIndex, size_t dimensionSize) { /* Stop recursion: The inner Arrays are written */ status ret; @@ -1074,7 +1074,7 @@ typeId = UA_TYPES[UA_TYPES_EXTENSIONOBJECT].typeId.identifier.numeric; ret |= writeJsonKey(ctx, UA_JSONKEY_TYPE); ret |= ENCODE_DIRECT_JSON(&typeId, UInt32); - + /* Write the reversible form body */ if(!isBuiltin) { /* Not builtin. Can it be encoded? Wrap in extension object. */ @@ -1093,7 +1093,7 @@ /* Write the dimensions */ if(hasDimensions) { ret |= writeJsonKey(ctx, UA_JSONKEY_DIMENSION); - ret |= encodeJsonArray(ctx, src->arrayDimensions, src->arrayDimensionsSize, + ret |= encodeJsonArray(ctx, src->arrayDimensions, src->arrayDimensionsSize, &UA_TYPES[UA_TYPES_INT32]); } } else { @@ -1958,7 +1958,7 @@ } static status -prepareDecodeNodeIdJson(UA_NodeId *dst, CtxJson *ctx, ParseCtx *parseCtx, +prepareDecodeNodeIdJson(UA_NodeId *dst, CtxJson *ctx, ParseCtx *parseCtx, u8 *fieldCount, DecodeEntry *entries) { /* possible keys: Id, IdType, NamespaceIndex */ /* Id must always be present */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_encoding_json.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_encoding_json.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_encoding_json.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_encoding_json.h 2022-06-24 19:01:27.000000000 +0000 @@ -66,7 +66,7 @@ size_t namespacesSize; const UA_String *namespaces; - + size_t serverUrisSize; const UA_String *serverUris; } CtxJson; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_print.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_print.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_types_print.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_types_print.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2020 (c) Fraunhofer IOSB (Author: Julius Pfrommer) */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_util.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_util.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_util.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_util.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014, 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2014 (c) Florian Palm diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_util_internal.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_util_internal.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/src/ua_util_internal.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/src/ua_util_internal.h 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2014-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) * Copyright 2014, 2017 (c) Florian Palm diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/check_eventloop_udp.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/check_eventloop_udp.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/check_eventloop_udp.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/check_eventloop_udp.c 2022-06-24 19:01:27.000000000 +0000 @@ -307,20 +307,20 @@ ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); size_t listenSockets = testContext.connCount; - + /* Open a talker connection */ clientId = 0; - + UA_String targetHost = UA_STRING("localhost"); params[0].key = UA_QUALIFIEDNAME(0, "port"); params[0].value = portVar; params[1].key = UA_QUALIFIEDNAME(0, "hostname"); UA_Variant_setScalar(¶ms[1].value, &targetHost, &UA_TYPES[UA_TYPES_STRING]); - + retval = cmTalker->openConnection(cmTalker, 2, params, NULL, &testContext, connectionCallback); ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); - + /* The talker el should receive a signal "ready to be written on" */ ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); for(size_t i = 0; i < 2; i++) { @@ -329,7 +329,7 @@ } ck_assert_uint_ne(clientId, 0); ck_assert_uint_eq(testContext.connCount, listenSockets + 1); - + /* Send a message from the talker */ received = false; UA_ByteString snd; @@ -343,7 +343,7 @@ UA_fakeSleep((UA_UInt32)((next - UA_DateTime_now()) / UA_DATETIME_MSEC)); } ck_assert(received); - + /* Close the connection */ retval = cmTalker->closeConnection(cmTalker, clientId); ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); @@ -353,7 +353,7 @@ UA_fakeSleep((UA_UInt32)((next - UA_DateTime_now()) / UA_DATETIME_MSEC)); } ck_assert_uint_eq(testContext.connCount, listenSockets); - + /* Stop the Talker EventLoop */ int max_stop_iteration_count = 10; int iteration = 0; @@ -367,7 +367,7 @@ ck_assert_int_eq(elTalker->state, UA_EVENTLOOPSTATE_STOPPED); elTalker->free(elTalker); elTalker = NULL; - + /* Stop the Listener EventLoop */ max_stop_iteration_count = 10; iteration = 0; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/check_timer.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/check_timer.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/check_timer.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/check_timer.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,5 +1,5 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ua_timer.h" diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/check_types_builtin_json.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/check_types_builtin_json.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/check_types_builtin_json.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/check_types_builtin_json.c 2022-06-24 19:01:27.000000000 +0000 @@ -27,7 +27,7 @@ /* Test Boolean */ START_TEST(UA_Boolean_true_json_encode) { - + UA_Boolean *src = UA_Boolean_new(); UA_Boolean_init(src); *src = true; @@ -43,19 +43,19 @@ status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "true"; ck_assert_str_eq(result, (char*)buf.data); - + UA_ByteString_clear(&buf); UA_Boolean_delete(src); - + } END_TEST START_TEST(UA_Boolean_false_json_encode) { - + UA_Boolean *src = UA_Boolean_new(); UA_Boolean_init(src); *src = false; @@ -65,16 +65,16 @@ size_t size = UA_calcSizeJsonInternal((void *) src, type, NULL, 0, NULL, 0, true); ck_assert_int_eq(size, 5); - + UA_ByteString_allocBuffer(&buf, size+1); UA_Byte *bufPos = &buf.data[0]; const UA_Byte *bufEnd = &buf.data[size+1]; - + status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "false"; ck_assert_str_eq(result, (char*)buf.data); @@ -84,7 +84,7 @@ END_TEST START_TEST(UA_Boolean_true_bufferTooSmall_json_encode) { - + UA_Boolean *src = UA_Boolean_new(); UA_Boolean_init(src); *src = false; @@ -99,7 +99,7 @@ status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + ck_assert_int_eq(s, UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED); char* result = ""; ck_assert_str_eq(result, (char*)buf.data); @@ -112,9 +112,9 @@ START_TEST(UA_String_json_encode) { // given UA_String src = UA_STRING("hello"); - + const UA_DataType *type = &UA_TYPES[UA_TYPES_STRING]; - + UA_ByteString buf; size_t size = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, true); UA_ByteString_allocBuffer(&buf, size+1); @@ -137,7 +137,7 @@ UA_String src = UA_STRING(""); UA_ByteString buf; const UA_DataType *type = &UA_TYPES[UA_TYPES_STRING]; - + size_t size = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, true); UA_ByteString_allocBuffer(&buf, size+1); @@ -162,7 +162,7 @@ const UA_DataType *type = &UA_TYPES[UA_TYPES_STRING]; size_t size = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, true); UA_ByteString_allocBuffer(&buf, size+1); - + UA_Byte *bufPos = &buf.data[0]; const UA_Byte *bufEnd = &buf.data[size+1]; // when @@ -287,7 +287,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "0"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Byte_delete(src); } END_TEST @@ -360,7 +360,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "-128"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_SByte_delete(src); } END_TEST @@ -385,7 +385,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "0"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_SByte_delete(src); } END_TEST @@ -407,7 +407,7 @@ *bufPos = 0; // then ck_assert_int_eq(s, UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_SByte_delete(src); } END_TEST @@ -459,7 +459,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "0"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_UInt16_delete(src); } END_TEST @@ -481,7 +481,7 @@ *bufPos = 0; // then ck_assert_int_eq(s, UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_UInt16_delete(src); } END_TEST @@ -532,7 +532,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "-32768"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Int16_delete(src); } END_TEST @@ -607,7 +607,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "4294967295"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_UInt32_delete(src); } END_TEST @@ -752,7 +752,7 @@ *bufPos = 0; // then ck_assert_int_eq(s, UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Int32_delete(src); } END_TEST @@ -844,7 +844,7 @@ *bufPos = 0; // then ck_assert_int_eq(s, UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_UInt64_delete(src); } END_TEST @@ -862,7 +862,7 @@ ((u8*)src)[5] = 0xFF; ((u8*)src)[6] = 0xFF; ((u8*)src)[7] = 0x7F; - + const UA_DataType *type = &UA_TYPES[UA_TYPES_INT64]; size_t size = UA_calcSizeJsonInternal((void *) src, type, NULL, 0, NULL, 0, true); UA_ByteString buf; @@ -879,7 +879,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"9223372036854775807\""; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Int64_delete(src); } END_TEST @@ -887,10 +887,10 @@ START_TEST(UA_Int64_Min_Number_json_encode) { UA_Int64 *src = UA_Int64_new(); - + // TODO: compiler error: integer constant is so large that it is unsigned [-Werror] //*src = -9223372036854775808; - + ((u8*)src)[0] = 0x00; ((u8*)src)[1] = 0x00; ((u8*)src)[2] = 0x00; @@ -899,8 +899,8 @@ ((u8*)src)[5] = 0x00; ((u8*)src)[6] = 0x00; ((u8*)src)[7] = 0x80; - - + + const UA_DataType *type = &UA_TYPES[UA_TYPES_INT64]; size_t size = UA_calcSizeJsonInternal((void *) src, type, NULL, 0, NULL, 0, true); UA_ByteString buf; @@ -917,7 +917,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"-9223372036854775808\""; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Int64_delete(src); } END_TEST @@ -942,7 +942,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"0\""; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Int64_delete(src); } END_TEST @@ -965,7 +965,7 @@ *bufPos = 0; // then ck_assert_int_eq(s, UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Int64_delete(src); } END_TEST @@ -985,7 +985,7 @@ status s = UA_encodeJsonInternal(&src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "1.1233999999999999541699935434735380113124847412109375"; @@ -1008,7 +1008,7 @@ status s = UA_encodeJsonInternal(&src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "0"; @@ -1031,7 +1031,7 @@ status s = UA_encodeJsonInternal(&src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "0"; @@ -1054,7 +1054,7 @@ status s = UA_encodeJsonInternal(&src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"Infinity\""; @@ -1079,7 +1079,7 @@ status s = UA_encodeJsonInternal(&src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"-Infinity\""; @@ -1102,7 +1102,7 @@ status s = UA_encodeJsonInternal(&src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"NaN\""; @@ -1125,7 +1125,7 @@ status s = UA_encodeJsonInternal(&src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "1.0000000000000002220446049250313080847263336181640625"; @@ -1148,7 +1148,7 @@ status s = UA_encodeJsonInternal(&src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "1"; @@ -1182,7 +1182,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Locale\":\"theLocale\",\"Text\":\"theText\"}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_LocalizedText_delete(src); } END_TEST @@ -1210,7 +1210,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"theText\""; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_LocalizedText_delete(src); } END_TEST @@ -1302,7 +1302,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"1970-01-15T06:56:07Z\""; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_DateTime_delete(src); } END_TEST @@ -1325,7 +1325,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"1601-01-01T00:00:00Z\""; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); } END_TEST @@ -1369,7 +1369,7 @@ status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "2161770496"; @@ -1394,12 +1394,12 @@ status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, false); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Code\":2161770496,\"Symbol\":\"BadAggregateConfigurationRejected\"}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_StatusCode_delete(src); } END_TEST @@ -1419,12 +1419,12 @@ status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, false); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Code\":0,\"Symbol\":\"Good\"}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_StatusCode_delete(src); } END_TEST @@ -1444,7 +1444,7 @@ status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, false); // then ck_assert_int_eq(s, UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_StatusCode_delete(src); } END_TEST @@ -1496,7 +1496,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Id\":5555,\"Namespace\":4}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_NodeId_delete(src); } END_TEST @@ -1521,7 +1521,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"IdType\":1,\"Id\":\"foobar\"}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_NodeId_delete(src); } END_TEST @@ -1545,7 +1545,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"IdType\":1,\"Id\":\"foobar\",\"Namespace\":5}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_NodeId_delete(src); } END_TEST @@ -1572,7 +1572,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"IdType\":2,\"Id\":\"00000003-0009-000A-0807-060504030201\"}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_NodeId_delete(src); } END_TEST @@ -1587,7 +1587,7 @@ // {"IdType":2,"Id":"00000003-0009-000A-0807-060504030201","Namespace":5} ck_assert_int_eq(size, 70); - + UA_ByteString_allocBuffer(&buf, size+1); UA_Byte *bufPos = &buf.data[0]; @@ -1600,7 +1600,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"IdType\":2,\"Id\":\"00000003-0009-000A-0807-060504030201\",\"Namespace\":5}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_NodeId_delete(src); } END_TEST @@ -1620,7 +1620,7 @@ //{"IdType":3,"Id":"YXNkZmFzZGY="} ck_assert_int_eq(size, 32); - + status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; @@ -1628,7 +1628,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"IdType\":3,\"Id\":\"YXNkZmFzZGY=\"}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_NodeId_delete(src); } END_TEST @@ -1652,7 +1652,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"IdType\":3,\"Id\":\"YXNkZmFzZGY=\",\"Namespace\":5}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_NodeId_delete(src); } END_TEST @@ -1662,7 +1662,7 @@ UA_NodeId *src = UA_NodeId_new(); *src = UA_NODEID_NUMERIC(2, 5555); const UA_DataType *type = &UA_TYPES[UA_TYPES_NODEID]; - + UA_String namespaces[3] = {UA_STRING("ns0"),UA_STRING("ns1"),UA_STRING("ns2")}; size_t size = UA_calcSizeJsonInternal((void *) src, type, namespaces, 3, NULL, 0, false); ck_assert_int_ne(size, 0); @@ -1681,7 +1681,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Id\":5555,\"Namespace\":\"ns2\"}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_NodeId_delete(src); } END_TEST @@ -1772,7 +1772,7 @@ //{"SymbolicId":13,"LocalizedText":14,"Locale":12,"AdditionalInfo":"additionalInfo","InnerStatusCode":2155216896,"InnerDiagnosticInfo":{"AdditionalInfo":"INNER ADDITION INFO"}} ck_assert_int_eq(size, 174); - + status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; @@ -1780,13 +1780,13 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"SymbolicId\":13,\"LocalizedText\":14,\"Locale\":12,\"AdditionalInfo\":\"additionalInfo\",\"InnerStatusCode\":2155216896,\"InnerDiagnosticInfo\":{\"AdditionalInfo\":\"INNER ADDITION INFO\"}}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_DiagnosticInfo_delete(src); } END_TEST START_TEST(UA_DiagInfo_withTwoInner_json_encode) { - + UA_DiagnosticInfo *innerDiag2 = UA_DiagnosticInfo_new(); UA_DiagnosticInfo_init(innerDiag2); innerDiag2->hasAdditionalInfo = true; @@ -1797,7 +1797,7 @@ innerDiag2->hasSymbolicId = false; innerDiag2->hasLocalizedText = false; innerDiag2->hasNamespaceUri = false; - + UA_DiagnosticInfo *innerDiag = UA_DiagnosticInfo_new(); UA_DiagnosticInfo_init(innerDiag); innerDiag->hasAdditionalInfo = true; @@ -1812,7 +1812,7 @@ UA_DiagnosticInfo *src = UA_DiagnosticInfo_new(); UA_DiagnosticInfo_init(src); - + src->hasAdditionalInfo = true; src->hasInnerDiagnosticInfo = true; src->hasInnerStatusCode = true; @@ -1846,7 +1846,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"SymbolicId\":13,\"LocalizedText\":14,\"Locale\":12,\"AdditionalInfo\":\"additionalInfo\",\"InnerStatusCode\":2155216896,\"InnerDiagnosticInfo\":{\"AdditionalInfo\":\"INNER ADDITION INFO\",\"InnerDiagnosticInfo\":{\"AdditionalInfo\":\"INNER ADDITION INFO2\"}}}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_DiagnosticInfo_delete(src); } END_TEST @@ -1870,7 +1870,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_DiagnosticInfo_delete(src); } END_TEST @@ -1895,7 +1895,7 @@ const UA_DataType *type = &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]; - + UA_ByteString buf; UA_ByteString_allocBuffer(&buf, 2); @@ -1907,7 +1907,7 @@ // then ck_assert_int_eq(s, UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_DiagnosticInfo_delete(src); } END_TEST @@ -1953,14 +1953,14 @@ status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); - + //s = UA_decodeJsonInternal() *bufPos = 0; // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "\"TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4=\""; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_ByteString_delete(src); } END_TEST @@ -2023,7 +2023,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Name\":\"derName\",\"Uri\":1}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_QualifiedName_delete(src); } END_TEST @@ -2051,7 +2051,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Name\":\"derName\",\"Uri\":1}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_QualifiedName_delete(src); } END_TEST @@ -2079,7 +2079,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Name\":\"derName\",\"Uri\":\"ns2\"}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_QualifiedName_delete(src); } END_TEST @@ -2105,7 +2105,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Name\":\"derName\",\"Uri\":6789}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_QualifiedName_delete(src); } END_TEST @@ -2116,7 +2116,7 @@ START_TEST(UA_Variant_Bool_json_encode) { UA_Variant *src = UA_Variant_new(); UA_Variant_init(src); - + UA_Boolean *variantContent = UA_Boolean_new(); *variantContent = true; UA_Variant_setScalar(src, variantContent, &UA_TYPES[UA_TYPES_BOOLEAN]); @@ -2137,7 +2137,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Type\":1,\"Body\":true}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Variant_delete(src); } END_TEST @@ -2165,7 +2165,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Type\":9,\"Body\":\"345634563456\"}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Variant_delete(src); } END_TEST @@ -2417,7 +2417,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Type\":17,\"Body\":{\"IdType\":1,\"Id\":\"theID\",\"Namespace\":1}}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Variant_delete(src); } END_TEST @@ -2458,7 +2458,7 @@ UA_QualifiedName_init(&variantContent); variantContent.name = UA_STRING("derName"); variantContent.namespaceIndex = 1; - + UA_Variant_setScalarCopy(src, &variantContent, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]); const UA_DataType *type = &UA_TYPES[UA_TYPES_VARIANT]; @@ -2473,12 +2473,12 @@ status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Type\":20,\"Body\":{\"Name\":\"derName\",\"Uri\":1}}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Variant_delete(src); } END_TEST @@ -2490,7 +2490,7 @@ UA_Variant_init(src); UA_UInt16 zero[2] = {42,43}; UA_Variant_setArrayCopy(src, zero, 2, &UA_TYPES[UA_TYPES_UINT16]); - + const UA_DataType *type = &UA_TYPES[UA_TYPES_VARIANT]; size_t size = UA_calcSizeJsonInternal((void *) src, type, NULL, 0, NULL, 0, true); @@ -2502,7 +2502,7 @@ const UA_Byte *bufEnd = &buf.data[size+1]; ck_assert_int_eq(size, 25); - + status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; @@ -2548,7 +2548,7 @@ UA_Variant_init(src); UA_Byte zero[2] = {42,43}; UA_Variant_setArrayCopy(src, zero, 2, &UA_TYPES[UA_TYPES_BYTE]); - + const UA_DataType *type = &UA_TYPES[UA_TYPES_VARIANT]; size_t size = UA_calcSizeJsonInternal((void *) src, type, NULL, 0, NULL, 0, true); @@ -2576,7 +2576,7 @@ UA_Variant_init(src); UA_String zero[2] = {UA_STRING("eins"),UA_STRING("zwei")}; UA_Variant_setArrayCopy(src, zero, 2, &UA_TYPES[UA_TYPES_STRING]); - + const UA_DataType *type = &UA_TYPES[UA_TYPES_VARIANT]; size_t size = UA_calcSizeJsonInternal((void *) src, type, NULL, 0, NULL, 0, true); @@ -2590,7 +2590,7 @@ status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; - + // then ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Type\":12,\"Body\":[\"eins\",\"zwei\"]}"; @@ -2615,7 +2615,7 @@ src.arrayDimensionsSize = 2; src.arrayDimensions[0] = 3; src.arrayDimensions[1] = 3; - + const UA_DataType *type = &UA_TYPES[UA_TYPES_VARIANT]; size_t size = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, true); UA_ByteString buf; @@ -2628,7 +2628,7 @@ //{"Type":5,"Body":[1,2,3,4,5,6,7,8,9],"Dimension":[3,3]} size_t sizeOfBytes = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, true); ck_assert_int_eq(sizeOfBytes, 55); - + status s = UA_encodeJsonInternal((void *) &src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, true); *bufPos = 0; @@ -2665,7 +2665,7 @@ ck_assert_int_eq(s, UA_STATUSCODE_GOOD); char* result = "{\"Body\":{\"Code\":2161770496,\"Symbol\":\"BadAggregateConfigurationRejected\"}}"; ck_assert_str_eq(result, (char*)buf.data); - UA_ByteString_clear(&buf); + UA_ByteString_clear(&buf); UA_Variant_delete(src); } END_TEST @@ -2683,7 +2683,7 @@ src.arrayDimensions = (UA_UInt32 *)UA_Array_new(4, &UA_TYPES[UA_TYPES_UINT32]); src.arrayDimensionsSize = 1; src.arrayDimensions[0] = 8; - + const UA_DataType *type = &UA_TYPES[UA_TYPES_VARIANT]; size_t size = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, false); UA_ByteString buf; @@ -2720,7 +2720,7 @@ src.arrayDimensions[1] = 2; src.arrayDimensions[2] = 2; src.arrayDimensions[3] = 1; - + const UA_DataType *type = &UA_TYPES[UA_TYPES_VARIANT]; size_t size = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, false); UA_ByteString buf; @@ -2733,7 +2733,7 @@ //{"Body":[[[["1"],["2"]],[["3"],["4"]]],[[["5"],["6"]],[["7"],["8"]]]]} size_t sizeOfBytes = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, false); ck_assert_int_eq(sizeOfBytes, 70); - + status s = UA_encodeJsonInternal((void *) &src, type, &bufPos, &bufEnd, NULL, 0, NULL, 0, false); *bufPos = 0; @@ -2758,7 +2758,7 @@ src.arrayDimensions[1] = 2; src.arrayDimensions[2] = 2; src.arrayDimensions[3] = 1; - + const UA_DataType *type = &UA_TYPES[UA_TYPES_VARIANT]; size_t size = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, false); UA_ByteString buf; @@ -2790,7 +2790,7 @@ variantContent.timestamp = srvts; variantContent.viewVersion = 1236; variantContent.viewId = UA_NODEID_NUMERIC(0,99999); - + UA_Variant_setScalarCopy(src, &variantContent, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]); const UA_DataType *type = &UA_TYPES[UA_TYPES_VARIANT]; @@ -2820,20 +2820,20 @@ //src.arrayDimensions = (UA_UInt32 *)UA_Array_new(1, &UA_TYPES[UA_TYPES_UINT32]); //src.arrayDimensionsSize = 1; //src.arrayDimensions[0] = 2; - + UA_ViewDescription variantContent1; UA_DateTime srvts1 = UA_DateTime_fromUnixTime(1234567); variantContent1.timestamp = srvts1; variantContent1.viewVersion = 1; variantContent1.viewId = UA_NODEID_NUMERIC(0,1); - + UA_ViewDescription variantContent2; UA_DateTime srvts2 = UA_DateTime_fromUnixTime(1234567); variantContent2.timestamp = srvts2; variantContent2.viewVersion = 2; variantContent2.viewId = UA_NODEID_NUMERIC(0,2); - - + + UA_ViewDescription d[2] = {variantContent1, variantContent2}; UA_Variant_setArrayCopy(&src, d, 2, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]); @@ -2865,20 +2865,20 @@ //src.arrayDimensions = (UA_UInt32 *)UA_Array_new(1, &UA_TYPES[UA_TYPES_UINT32]); //src.arrayDimensionsSize = 1; //src.arrayDimensions[0] = 2; - + UA_ViewDescription variantContent1; UA_DateTime srvts1 = UA_DateTime_fromUnixTime(1234567); variantContent1.timestamp = srvts1; variantContent1.viewVersion = 1; variantContent1.viewId = UA_NODEID_NUMERIC(1,1); - + UA_ViewDescription variantContent2; UA_DateTime srvts2 = UA_DateTime_fromUnixTime(1234567); variantContent2.timestamp = srvts2; variantContent2.viewVersion = 2; variantContent2.viewId = UA_NODEID_NUMERIC(1,2); - - + + UA_ViewDescription d[2] = {variantContent1, variantContent2}; UA_Variant_setArrayCopy(&src, d, 2, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]); @@ -3092,7 +3092,7 @@ src->namespaceUri = UA_STRING_NULL; src->serverIndex = 1; const UA_DataType *type = &UA_TYPES[UA_TYPES_EXPANDEDNODEID]; - + UA_String serverUris[3] = {UA_STRING("uri0"),UA_STRING("uri1"),UA_STRING("uri2")}; size_t size = UA_calcSizeJsonInternal((void *) src, type, NULL, 0, serverUris, 3, false); UA_ByteString buf; @@ -3102,7 +3102,7 @@ UA_Byte *bufPos = &buf.data[0]; const UA_Byte *bufEnd = &buf.data[size+1]; - + status s = UA_encodeJsonInternal((void *) src, type, &bufPos, &bufEnd, NULL, 0, serverUris, 3, false); *bufPos = 0; @@ -3122,10 +3122,10 @@ src->namespaceUri = UA_STRING_NULL; src->serverIndex = 1; const UA_DataType *type = &UA_TYPES[UA_TYPES_EXPANDEDNODEID]; - + UA_String namespaces[3] = {UA_STRING("ns0"),UA_STRING("ns1"),UA_STRING("ns2")}; UA_String serverUris[3] = {UA_STRING("uri0"),UA_STRING("uri1"),UA_STRING("uri2")}; - + size_t size = UA_calcSizeJsonInternal((void *) src, type, namespaces, 3, serverUris, 3, false); UA_ByteString buf; @@ -3153,11 +3153,11 @@ *src = UA_EXPANDEDNODEID_STRING_ALLOC(2, "testtestTest"); src->namespaceUri = UA_STRING_ALLOC("NamespaceUri"); src->serverIndex = 1; - + UA_String namespaces[3] = {UA_STRING("ns0"),UA_STRING("ns1"),UA_STRING("ns2")}; UA_String serverUris[3] = {UA_STRING("uri0"),UA_STRING("uri1"),UA_STRING("uri2")}; - - + + const UA_DataType *type = &UA_TYPES[UA_TYPES_EXPANDEDNODEID]; size_t size = UA_calcSizeJsonInternal((void *) src, type, namespaces, 3, serverUris, 3, false); UA_ByteString buf; @@ -3197,7 +3197,7 @@ src->serverTimestamp = srvts; src->sourcePicoseconds = 5678; src->serverPicoseconds = 6789; - + UA_Variant variant; UA_Variant_init(&variant); UA_Boolean variantContent = true; @@ -3229,7 +3229,7 @@ START_TEST(UA_DataValue_null_json_encode) { UA_DataValue *src = UA_DataValue_new(); UA_DataValue_init(src); - + const UA_DataType *type = &UA_TYPES[UA_TYPES_DATAVALUE]; size_t size = UA_calcSizeJsonInternal((void *) src, type, NULL, 0, NULL, 0, true); UA_ByteString buf; @@ -3263,12 +3263,12 @@ innerDiag.hasSymbolicId = false; innerDiag.hasLocalizedText = false; innerDiag.hasNamespaceUri = false; - + UA_DiagnosticInfo *info = (UA_DiagnosticInfo*)UA_calloc(1, sizeof(UA_DiagnosticInfo)); info[0] = innerDiag; src.diagnosticInfos = info; src.diagnosticInfosSize = 1; - + UA_DataValue dv; UA_DataValue_init(&dv); dv.hasServerTimestamp = true; @@ -3283,8 +3283,8 @@ dv.serverTimestamp = srvts; dv.sourcePicoseconds = 0; dv.serverPicoseconds = 0; - - + + UA_Variant variant; UA_Variant_init(&variant); UA_Boolean variantContent = true; @@ -3292,21 +3292,21 @@ dv.value = variant; dv.status = UA_STATUSCODE_BADAPPLICATIONSIGNATUREINVALID; - + UA_DataValue *values = (UA_DataValue*)UA_calloc(1, sizeof(UA_DataValue)); values[0] = dv; src.results = values; src.resultsSize = 1; - - + + UA_ResponseHeader rh; UA_ResponseHeader_init(&rh); rh.stringTableSize = 0; rh.requestHandle = 123123; rh.serviceResult = UA_STATUSCODE_GOOD; rh.timestamp = UA_DateTime_fromUnixTime(1234567); - - + + UA_DiagnosticInfo serverDiag; UA_DiagnosticInfo_init(&serverDiag); serverDiag.hasAdditionalInfo = true; @@ -3318,8 +3318,8 @@ serverDiag.hasLocalizedText = false; serverDiag.hasNamespaceUri = false; rh.serviceDiagnostics = serverDiag; - - + + UA_ExtensionObject e; UA_ExtensionObject_init(&e); e.encoding = UA_EXTENSIONOBJECT_DECODED_NODELETE; @@ -3327,11 +3327,11 @@ UA_Boolean b = false; e.content.decoded.data = &b; - + rh.additionalHeader = e; - + src.responseHeader = rh; - + const UA_DataType *type = &UA_TYPES[UA_TYPES_READRESPONSE]; size_t size = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, true); UA_ByteString buf; @@ -3360,7 +3360,7 @@ src.timestamp = srvts; src.viewVersion = 1236; src.viewId = UA_NODEID_NUMERIC(0,99999); - + const UA_DataType *type = &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]; size_t size = UA_calcSizeJsonInternal((void *) &src, type, NULL, 0, NULL, 0, true); UA_ByteString buf; @@ -3385,7 +3385,7 @@ START_TEST(UA_WriteRequest_json_encode) { UA_WriteRequest src; UA_WriteRequest_init(&src); - + UA_RequestHeader rh; rh.returnDiagnostics = 1; rh.auditEntryId = UA_STRING_ALLOC("Auditentryid"); @@ -3393,7 +3393,7 @@ rh.authenticationToken = UA_NODEID_STRING_ALLOC(0,"authToken"); rh.timestamp = UA_DateTime_fromUnixTime(1234567); rh.timeoutHint = 120; - + UA_ExtensionObject e; UA_ExtensionObject_init(&e); e.encoding = UA_EXTENSIONOBJECT_DECODED_NODELETE; @@ -3401,11 +3401,11 @@ UA_Boolean b = false; e.content.decoded.data = &b; - + rh.additionalHeader = e; - - - + + + UA_DataValue dv; UA_DataValue_init(&dv); dv.hasServerTimestamp = true; @@ -3418,7 +3418,7 @@ dv.sourceTimestamp = srcts; dv.serverTimestamp = srvts; - + UA_Variant variant; UA_Variant_init(&variant); UA_Boolean variantContent = true; @@ -3426,7 +3426,7 @@ dv.value = variant; dv.status = UA_STATUSCODE_BADAPPLICATIONSIGNATUREINVALID; - + UA_DataValue dv2; UA_DataValue_init(&dv2); dv2.hasServerTimestamp = true; @@ -3441,7 +3441,7 @@ dv2.serverTimestamp = srvts2; dv2.sourcePicoseconds = 0; dv2.serverPicoseconds = 0; - + UA_Variant variant2; UA_Variant_init(&variant2); UA_Boolean variantContent2 = true; @@ -3449,25 +3449,25 @@ dv2.value = variant2; dv2.status = UA_STATUSCODE_BADAPPLICATIONSIGNATUREINVALID; - + UA_WriteValue value; UA_WriteValue_init(&value); value.value = dv; value.attributeId = 12; value.indexRange = UA_STRING_ALLOC("BLOAB"); value.nodeId = UA_NODEID_STRING_ALLOC(0, "a1111"); - + UA_WriteValue value2; UA_WriteValue_init(&value2); value2.value = dv2; value2.attributeId = 12; value2.indexRange = UA_STRING_ALLOC("BLOAB"); value2.nodeId = UA_NODEID_STRING_ALLOC(0, "a2222"); - + UA_WriteValue *values = (UA_WriteValue*)UA_calloc(2,sizeof(UA_WriteValue)); values[0] = value; values[1] = value2; - + src.nodesToWrite = values; src.nodesToWriteSize = 2; src.requestHeader = rh; @@ -3549,13 +3549,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":3,\"Body\":0}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_BYTE); ck_assert_uint_eq(*((UA_Byte*)out.data), 0); - + UA_Variant_clear(&out); } END_TEST @@ -3565,13 +3565,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":3,\"Body\":255}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_BYTE); ck_assert_uint_eq(*((UA_Byte*)out.data), 255); - + UA_Variant_clear(&out); } END_TEST @@ -3583,13 +3583,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":5,\"Body\":0}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_UINT16); ck_assert_uint_eq(*((UA_UInt16*)out.data), 0); - + UA_Variant_clear(&out); } END_TEST @@ -3599,13 +3599,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":5,\"Body\":65535}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_UINT16); ck_assert_uint_eq(*((UA_UInt16*)out.data), 65535); - + UA_Variant_clear(&out); } END_TEST @@ -3616,13 +3616,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":7,\"Body\":0}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_UINT32); ck_assert_uint_eq(*((UA_UInt32*)out.data), 0); - + UA_Variant_clear(&out); } END_TEST @@ -3632,13 +3632,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":7,\"Body\":4294967295}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_UINT32); ck_assert_uint_eq(*((UA_UInt32*)out.data), 4294967295); - + UA_Variant_clear(&out); } END_TEST @@ -3649,11 +3649,11 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":9,\"Body\":\"0\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); - ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_UINT64); + ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_UINT64); ck_assert_int_eq(((u8*)(out.data))[0], 0x00); ck_assert_int_eq(((u8*)(out.data))[1], 0x00); ck_assert_int_eq(((u8*)(out.data))[2], 0x00); @@ -3662,7 +3662,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0x00); ck_assert_int_eq(((u8*)(out.data))[6], 0x00); ck_assert_int_eq(((u8*)(out.data))[7], 0x00); - + UA_Variant_clear(&out); } END_TEST @@ -3672,7 +3672,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":9,\"Body\":\"18446744073709551615\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -3685,7 +3685,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0xFF); ck_assert_int_eq(((u8*)(out.data))[6], 0xFF); ck_assert_int_eq(((u8*)(out.data))[7], 0xFF); - + UA_Variant_clear(&out); } END_TEST @@ -3709,13 +3709,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":2,\"Body\":-128}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_SBYTE); ck_assert_int_eq(*((UA_SByte*)out.data), -128); - + UA_Variant_clear(&out); } END_TEST @@ -3725,13 +3725,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":2,\"Body\":127}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_SBYTE); ck_assert_int_eq(*((UA_SByte*)out.data), 127); - + UA_Variant_clear(&out); } END_TEST @@ -3742,13 +3742,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":4,\"Body\":-32768}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_INT16); ck_assert_int_eq(*((UA_Int16*)out.data), -32768); - + UA_Variant_clear(&out); } END_TEST @@ -3758,13 +3758,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":4,\"Body\":32767}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_INT16); ck_assert_int_eq(*((UA_Int16*)out.data), 32767); - + UA_Variant_clear(&out); } END_TEST @@ -3775,13 +3775,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":6,\"Body\":-2147483648}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_INT32); ck_assert(*(UA_Int32*)out.data == -2147483648); - + UA_Variant_clear(&out); } END_TEST @@ -3791,13 +3791,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":6,\"Body\":2147483647}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_INT32); ck_assert_int_eq(*((UA_Int32*)out.data), 2147483647); - + UA_Variant_clear(&out); } END_TEST @@ -3808,11 +3808,11 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":8,\"Body\":\"-9223372036854775808\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); - ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_INT64); + ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_INT64); ck_assert_int_eq(((u8*)(out.data))[0], 0x00); ck_assert_int_eq(((u8*)(out.data))[1], 0x00); ck_assert_int_eq(((u8*)(out.data))[2], 0x00); @@ -3821,7 +3821,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0x00); ck_assert_int_eq(((u8*)(out.data))[6], 0x00); ck_assert_int_eq(((u8*)(out.data))[7], 0x80); - + UA_Variant_clear(&out); } END_TEST @@ -3832,11 +3832,11 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":8,\"Body\":\"9223372036854775807\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); - ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_INT64); + ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_INT64); ck_assert_int_eq(((u8*)(out.data))[0], 0xFF); ck_assert_int_eq(((u8*)(out.data))[1], 0xFF); ck_assert_int_eq(((u8*)(out.data))[2], 0xFF); @@ -3845,7 +3845,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0xFF); ck_assert_int_eq(((u8*)(out.data))[6], 0xFF); ck_assert_int_eq(((u8*)(out.data))[7], 0x7F); - + UA_Variant_clear(&out); } END_TEST @@ -3898,7 +3898,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":10,\"Body\":3.1415927410}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then //0 10000000 10010010000111111011011 = 40 49 0f db @@ -3916,7 +3916,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":10,\"Body\":1}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then //0 01111111 00000000000000000000000 = 3f80 0000 @@ -3925,7 +3925,7 @@ ck_assert_int_eq(((u8*)(out.data))[1], 0x00); ck_assert_int_eq(((u8*)(out.data))[2], 0x80); ck_assert_int_eq(((u8*)(out.data))[3], 0x3f); - + UA_Variant_clear(&out); } END_TEST @@ -4017,10 +4017,10 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":1.1234}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then - ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); + ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(((u8*)(out.data))[0], 0xef); ck_assert_int_eq(((u8*)(out.data))[1], 0x38); ck_assert_int_eq(((u8*)(out.data))[2], 0x45); @@ -4029,7 +4029,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0xf9); ck_assert_int_eq(((u8*)(out.data))[6], 0xf1); ck_assert_int_eq(((u8*)(out.data))[7], 0x3f); - + UA_Variant_clear(&out); } END_TEST @@ -4054,12 +4054,12 @@ //UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":1}"); UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":1}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then // 0 01111111111 0000000000000000000000000000000000000000000000000000 // 3FF0000000000000 - ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); + ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(((u8*)(out.data))[0], 0x00); ck_assert_int_eq(((u8*)(out.data))[1], 0x00); ck_assert_int_eq(((u8*)(out.data))[2], 0x00); @@ -4068,7 +4068,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0x00); ck_assert_int_eq(((u8*)(out.data))[6], 0xF0); ck_assert_int_eq(((u8*)(out.data))[7], 0x3F); - + UA_Variant_clear(&out); } END_TEST @@ -4079,12 +4079,12 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":1.0000000000000002}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then // 0 01111111111 0000000000000000000000000000000000000000000000000001 // 3FF0000000000001 - ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); + ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(((u8*)(out.data))[0], 0x01); ck_assert_int_eq(((u8*)(out.data))[1], 0x00); ck_assert_int_eq(((u8*)(out.data))[2], 0x00); @@ -4093,7 +4093,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0x00); ck_assert_int_eq(((u8*)(out.data))[6], 0xF0); ck_assert_int_eq(((u8*)(out.data))[7], 0x3F); - + UA_Variant_clear(&out); } END_TEST @@ -4103,7 +4103,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":\"NaN\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4133,11 +4133,11 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":\"Infinity\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then // 0 111 1111 1111 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 - ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); + ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(((u8*)(out.data))[0], 0x00); ck_assert_int_eq(((u8*)(out.data))[1], 0x00); ck_assert_int_eq(((u8*)(out.data))[2], 0x00); @@ -4146,7 +4146,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0x00); ck_assert_int_eq(((u8*)(out.data))[6], 0xF0); ck_assert_int_eq(((u8*)(out.data))[7], 0x7F); - + UA_Variant_clear(&out); } END_TEST @@ -4156,11 +4156,11 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":\"-Infinity\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then // 1 111 1111 1111 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 - ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); + ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(((u8*)(out.data))[0], 0x00); ck_assert_int_eq(((u8*)(out.data))[1], 0x00); ck_assert_int_eq(((u8*)(out.data))[2], 0x00); @@ -4169,7 +4169,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0x00); ck_assert_int_eq(((u8*)(out.data))[6], 0xF0); ck_assert_int_eq(((u8*)(out.data))[7], 0xFF); - + UA_Variant_clear(&out); } END_TEST @@ -4179,11 +4179,11 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":0}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then // 0 000 0000 0000 0000 0000 0000 00000000 00000000 00000000 00000000 00000000 - ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); + ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(((u8*)(out.data))[0], 0x00); ck_assert_int_eq(((u8*)(out.data))[1], 0x00); ck_assert_int_eq(((u8*)(out.data))[2], 0x00); @@ -4192,7 +4192,7 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0x00); ck_assert_int_eq(((u8*)(out.data))[6], 0x00); ck_assert_int_eq(((u8*)(out.data))[7], 0x00); - + UA_Variant_clear(&out); } END_TEST @@ -4202,11 +4202,11 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":-0}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then // 1 000 0000 0000 0000 00000000 00000000 00000000 00000000 00000000 00000000 - ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); + ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(((u8*)(out.data))[0], 0x00); ck_assert_int_eq(((u8*)(out.data))[1], 0x00); ck_assert_int_eq(((u8*)(out.data))[2], 0x00); @@ -4215,17 +4215,17 @@ ck_assert_int_eq(((u8*)(out.data))[5], 0x00); ck_assert_int_eq(((u8*)(out.data))[6], 0x00); ck_assert_int_eq(((u8*)(out.data))[7], 0x80); - + UA_Variant_clear(&out); } END_TEST -START_TEST(UA_String_json_decode) { +START_TEST(UA_String_json_decode) { UA_Variant out; UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":12,\"Body\":\"abcdef\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4237,7 +4237,7 @@ ck_assert_int_eq(((UA_String*)out.data)->data[3], 'd'); ck_assert_int_eq(((UA_String*)out.data)->data[4], 'e'); ck_assert_int_eq(((UA_String*)out.data)->data[5], 'f'); - + UA_Variant_clear(&out); } END_TEST @@ -4259,12 +4259,12 @@ } END_TEST -START_TEST(UA_String_unescapeBS_json_decode) { +START_TEST(UA_String_unescapeBS_json_decode) { UA_Variant out; UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":12,\"Body\":\"ab\\tcdef\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4277,35 +4277,35 @@ ck_assert_int_eq(((UA_String*)out.data)->data[4], 'd'); ck_assert_int_eq(((UA_String*)out.data)->data[5], 'e'); ck_assert_int_eq(((UA_String*)out.data)->data[6], 'f'); - + UA_Variant_clear(&out); } END_TEST -START_TEST(UA_String_escape_unicode_json_decode) { +START_TEST(UA_String_escape_unicode_json_decode) { UA_Variant out; UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":12,\"Body\":\"\\u002c\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_STRING); ck_assert_int_eq( ((UA_String*)out.data)->length, 1); ck_assert_int_eq( ((UA_String*)out.data)->data[0], ','); - + UA_Variant_clear(&out); } END_TEST -START_TEST(UA_String_escape2_json_decode) { +START_TEST(UA_String_escape2_json_decode) { UA_Variant out; UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":12,\"Body\":\"\\b\\th\\\"e\\fl\\nl\\\\o\\r\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4323,18 +4323,18 @@ ck_assert_int_eq( ((UA_String*)out.data)->data[9], '\\'); ck_assert_int_eq( ((UA_String*)out.data)->data[10], 'o'); ck_assert_int_eq( ((UA_String*)out.data)->data[11], '\r'); - + UA_Variant_clear(&out); } END_TEST -START_TEST(UA_String_surrogatePair_json_decode) { +START_TEST(UA_String_surrogatePair_json_decode) { UA_Variant out; UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":12,\"Body\":\"\\uD800\\uDC00\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4344,7 +4344,7 @@ ck_assert_uint_eq( ((UA_String*)out.data)->data[1], 0x90); ck_assert_uint_eq( ((UA_String*)out.data)->data[2], 0x80); ck_assert_uint_eq( ((UA_String*)out.data)->data[3], 0x80); - + UA_Variant_clear(&out); } END_TEST @@ -4355,7 +4355,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":15,\"Body\":\"YXNkZmFzZGY=\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4369,7 +4369,7 @@ ck_assert_int_eq(((UA_ByteString*)out.data)->data[5], 's'); ck_assert_int_eq(((UA_ByteString*)out.data)->data[6], 'd'); ck_assert_int_eq(((UA_ByteString*)out.data)->data[7], 'f'); - + UA_Variant_clear(&out); } END_TEST @@ -4381,7 +4381,7 @@ UA_ByteString_init(&out); UA_ByteString buf = UA_STRING("\"\x90!\xc5 c{\""); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_BYTESTRING]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4407,7 +4407,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":14,\"Body\":\"00000001-0002-0003-0405-060708090A0B\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4423,7 +4423,7 @@ ck_assert_int_eq(((UA_Guid*)out.data)->data4[5], 9); ck_assert_int_eq(((UA_Guid*)out.data)->data4[6], 10); ck_assert_int_eq(((UA_Guid*)out.data)->data4[7], 11); - + UA_Variant_clear(&out); } END_TEST @@ -4460,7 +4460,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":14,\"Body\":\"00000001-00\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_BADDECODINGERROR); @@ -4474,7 +4474,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":14,\"Body\":\"00000001-0002-0003-0405-060708090A0B00000001\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_BADDECODINGERROR); @@ -4488,7 +4488,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":14,\"Body\":\"00000=01-0002-0003-0405-060708090A0B\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_BADDECODINGERROR); @@ -4503,13 +4503,13 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":19,\"Body\":2}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.type->typeKind, UA_DATATYPEKIND_STATUSCODE); ck_assert_uint_eq(*((UA_StatusCode*)out.data), 2); - + UA_Variant_clear(&out); } END_TEST @@ -4534,7 +4534,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":19,\"Body\":0}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4552,7 +4552,7 @@ UA_DateTime_init(&out); UA_ByteString buf = UA_STRING("\"1970-01-02T01:02:03.005Z\""); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_DATETIME]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4566,7 +4566,7 @@ ck_assert_int_eq(dts.milliSec, 5); ck_assert_int_eq(dts.microSec, 0); ck_assert_int_eq(dts.nanoSec, 0); - + UA_DateTime_clear(&out); } END_TEST @@ -4600,7 +4600,7 @@ UA_DateTime_init(&out); UA_ByteString buf = UA_STRING("\"-0050-01-02T01:02:03.005Z\""); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_DATETIME]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4614,7 +4614,7 @@ ck_assert_int_eq(dts.milliSec, 5); ck_assert_int_eq(dts.microSec, 0); ck_assert_int_eq(dts.nanoSec, 0); - + UA_DateTime_clear(&out); } END_TEST @@ -4699,7 +4699,7 @@ UA_DateTime_init(&out); UA_ByteString buf = UA_STRING("\"1970-01-02T01:02:03.042Z\""); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_DATETIME]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4713,7 +4713,7 @@ ck_assert_int_eq(dts.milliSec, 42); ck_assert_int_eq(dts.microSec, 0); ck_assert_int_eq(dts.nanoSec, 0); - + UA_DateTime_clear(&out); } END_TEST @@ -4726,7 +4726,7 @@ UA_QualifiedName_init(&out); UA_ByteString buf = UA_STRING("{\"Name\":\"derName\",\"Uri\":1}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_QUALIFIEDNAME]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4734,7 +4734,7 @@ ck_assert_int_eq(out.name.data[1], 'e'); ck_assert_int_eq(out.name.data[6], 'e'); ck_assert_int_eq(out.namespaceIndex, 1); - + UA_QualifiedName_clear(&out); } END_TEST @@ -4756,7 +4756,7 @@ UA_LocalizedText_init(&out); UA_ByteString buf = UA_STRING("{\"Locale\":\"t1\",\"Text\":\"t2\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4764,7 +4764,7 @@ ck_assert_int_eq(out.text.data[0], 't'); ck_assert_int_eq(out.locale.data[1], '1'); ck_assert_int_eq(out.text.data[1], '2'); - + UA_LocalizedText_clear(&out); } END_TEST @@ -4775,7 +4775,7 @@ UA_LocalizedText_init(&out); UA_ByteString buf = UA_STRING("{\"Locale\":\"t1\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_LOCALIZEDTEXT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4784,7 +4784,7 @@ ck_assert_int_eq(out.locale.data[1], '1'); ck_assert_ptr_eq(out.text.data, NULL); ck_assert_int_eq(out.text.length, 0); - + UA_LocalizedText_clear(&out); } END_TEST @@ -4807,7 +4807,7 @@ UA_ViewDescription_init(&out); UA_ByteString buf = UA_STRING("{\"Timestamp\":\"1970-01-15T06:56:07Z\",\"ViewVersion\":1236,\"ViewId\":{\"Id\":\"00000009-0002-027C-F3BF-BB7BEEFEEFBE\",\"IdType\":2}}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4825,7 +4825,7 @@ ck_assert_int_eq(dts.nanoSec, 0); ck_assert_int_eq(out.viewId.identifier.guid.data1, 9); ck_assert_int_eq(out.viewId.identifier.guid.data2, 2); - + UA_ViewDescription_clear(&out); } END_TEST @@ -4839,14 +4839,14 @@ UA_NodeId_init(&out); UA_ByteString buf = UA_STRING("{\"Id\":42}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_NODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.identifier.numeric, 42); ck_assert_int_eq(out.namespaceIndex, 0); ck_assert_int_eq(out.identifierType, UA_NODEIDTYPE_NUMERIC); - + UA_NodeId_clear(&out); } END_TEST @@ -4857,14 +4857,14 @@ UA_NodeId_init(&out); UA_ByteString buf = UA_STRING("{\"Id\":42,\"Namespace\":123}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_NODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.identifier.numeric, 42); ck_assert_int_eq(out.namespaceIndex, 123); ck_assert_int_eq(out.identifierType, UA_NODEIDTYPE_NUMERIC); - + UA_NodeId_clear(&out); } END_TEST @@ -4876,7 +4876,7 @@ UA_NodeId_init(&out); UA_ByteString buf = UA_STRING("{\"IdType\":1,\"Id\":\"test123\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_NODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4890,7 +4890,7 @@ ck_assert_int_eq(out.identifier.string.data[6], '3'); ck_assert_int_eq(out.namespaceIndex, 0); ck_assert_int_eq(out.identifierType, UA_NODEIDTYPE_STRING); - + UA_NodeId_clear(&out); } END_TEST @@ -4902,7 +4902,7 @@ UA_NodeId_init(&out); UA_ByteString buf = UA_STRING("{\"IdType\":2,\"Id\":\"00000001-0002-0003-0405-060708090A0B\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_NODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4920,7 +4920,7 @@ ck_assert_int_eq(out.identifier.guid.data4[5], 9); ck_assert_int_eq(out.identifier.guid.data4[6], 10); ck_assert_int_eq(out.identifier.guid.data4[7], 11); - + UA_NodeId_clear(&out); } END_TEST @@ -4931,7 +4931,7 @@ UA_NodeId_init(&out); UA_ByteString buf = UA_STRING("{\"IdType\":3,\"Id\":\"YXNkZmFzZGY=\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_NODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4947,7 +4947,7 @@ ck_assert_int_eq(out.identifier.byteString.data[5], 's'); ck_assert_int_eq(out.identifier.byteString.data[6], 'd'); ck_assert_int_eq(out.identifier.byteString.data[7], 'f'); - + UA_NodeId_clear(&out); } END_TEST @@ -4960,7 +4960,7 @@ UA_ExpandedNodeId_init(&out); UA_ByteString buf = UA_STRING("{\"Id\":42}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4969,7 +4969,7 @@ ck_assert_ptr_eq(out.namespaceUri.data, NULL); ck_assert_int_eq(out.namespaceUri.length, 0); ck_assert_int_eq(out.serverIndex, 0); - + UA_ExpandedNodeId_clear(&out); } END_TEST @@ -4980,7 +4980,7 @@ UA_ExpandedNodeId_init(&out); UA_ByteString buf = UA_STRING("{\"IdType\":1,\"Id\":\"test\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -4990,7 +4990,7 @@ ck_assert_ptr_eq(out.namespaceUri.data, NULL); ck_assert_int_eq(out.namespaceUri.length, 0); ck_assert_int_eq(out.serverIndex, 0); - + UA_ExpandedNodeId_clear(&out); } END_TEST @@ -5001,7 +5001,7 @@ UA_ExpandedNodeId_init(&out); UA_ByteString buf = UA_STRING("{\"IdType\":1,\"Id\":\"test\",\"Namespace\":\"abcdef\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5019,7 +5019,7 @@ ck_assert_int_eq(out.namespaceUri.data[4], 'e'); ck_assert_int_eq(out.namespaceUri.data[5], 'f'); ck_assert_int_eq(out.serverIndex, 0); - + UA_ExpandedNodeId_clear(&out); } END_TEST @@ -5030,7 +5030,7 @@ UA_ExpandedNodeId_init(&out); UA_ByteString buf = UA_STRING("{\"IdType\":1,\"Id\":\"test\",\"Namespace\":42}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5044,7 +5044,7 @@ ck_assert_ptr_eq(out.namespaceUri.data, NULL); ck_assert_int_eq(out.nodeId.namespaceIndex, 42); ck_assert_int_eq(out.serverIndex, 0); - + UA_ExpandedNodeId_clear(&out); } END_TEST @@ -5055,7 +5055,7 @@ UA_ExpandedNodeId_init(&out); UA_ByteString buf = UA_STRING("{\"IdType\":1,\"Id\":\"test\",\"Namespace\":\"test\",\"ServerUri\":13}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5070,7 +5070,7 @@ ck_assert_int_eq(out.namespaceUri.data[1], 'e'); ck_assert_int_eq(out.namespaceUri.data[2], 's'); ck_assert_int_eq(out.namespaceUri.data[3], 't'); - + UA_ExpandedNodeId_clear(&out); } END_TEST @@ -5081,7 +5081,7 @@ UA_ExpandedNodeId_init(&out); UA_ByteString buf = UA_STRING("{\"IdType\":3,\"Id\":\"YXNkZmFzZGY=\",\"Namespace\":\"test\",\"ServerUri\":13}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXPANDEDNODEID]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5100,7 +5100,7 @@ ck_assert_int_eq(out.namespaceUri.data[1], 'e'); ck_assert_int_eq(out.namespaceUri.data[2], 's'); ck_assert_int_eq(out.namespaceUri.data[3], 't'); - + UA_ExpandedNodeId_clear(&out); } END_TEST @@ -5108,7 +5108,7 @@ START_TEST(UA_DiagnosticInfo_json_decode) { // given - + UA_DiagnosticInfo out; UA_DiagnosticInfo_init(&out); out.innerDiagnosticInfo = NULL; @@ -5119,7 +5119,7 @@ "\"InnerStatusCode\":2155216896," "\"InnerDiagnosticInfo\":{\"AdditionalInfo\":\"INNER ADDITION INFO\"}}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5148,13 +5148,13 @@ /* --------------------DataValue--------------------------- */ START_TEST(UA_DataValue_json_decode) { // given - + UA_DataValue out; UA_DataValue_init(&out); UA_ByteString buf = UA_STRING("{\"Value\":{\"Type\":1,\"Body\":true},\"Status\":2153250816,\"SourceTimestamp\":\"1970-01-15T06:56:07Z\",\"SourcePicoseconds\":0,\"ServerTimestamp\":\"1970-01-15T06:56:07Z\",\"ServerPicoseconds\":0}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_DATAVALUE]); //UA_DiagnosticInfo inner = *out.innerDiagnosticInfo; @@ -5175,13 +5175,13 @@ START_TEST(UA_DataValueMissingFields_json_decode) { // given - + UA_DataValue out; UA_DataValue_init(&out); UA_ByteString buf = UA_STRING("{\"Value\":{\"Type\":1,\"Body\":true}}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_DATAVALUE]); //UA_DiagnosticInfo inner = *out.innerDiagnosticInfo; @@ -5211,13 +5211,13 @@ /*----------------------ExtensionObject------------------------*/ START_TEST(UA_ExtensionObject_json_decode) { // given - + UA_ExtensionObject out; UA_ExtensionObject_init(&out); UA_ByteString buf = UA_STRING("{\"TypeId\":{\"Id\":1},\"Body\":true}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5230,13 +5230,13 @@ START_TEST(UA_ExtensionObject_EncodedByteString_json_decode) { // given - + UA_ExtensionObject out; UA_ExtensionObject_init(&out); UA_ByteString buf = UA_STRING("{\"Encoding\":1,\"TypeId\":{\"Id\":42},\"Body\":\"YXNkZmFzZGY=\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5251,7 +5251,7 @@ ck_assert_int_eq(out.content.encoded.body.data[5], 'm'); ck_assert_int_eq(out.content.encoded.body.data[6], 'F'); ck_assert_int_eq(out.content.encoded.typeId.identifier.numeric, 42); - + UA_ExtensionObject_clear(&out); } END_TEST @@ -5259,13 +5259,13 @@ START_TEST(UA_ExtensionObject_EncodedXml_json_decode) { // given - + UA_ExtensionObject out; UA_ExtensionObject_init(&out); UA_ByteString buf = UA_STRING("{\"Encoding\":2,\"TypeId\":{\"Id\":42},\"Body\":\"\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5282,19 +5282,19 @@ START_TEST(UA_ExtensionObject_Unkown_json_decode) { // given - + UA_ExtensionObject out; UA_ExtensionObject_init(&out); UA_ByteString buf = UA_STRING("{\"TypeId\":{\"Id\":4711},\"Body\":{\"unknown\":\"body\",\"saveas\":\"Bytestring\"}}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert_int_eq(out.encoding, UA_EXTENSIONOBJECT_ENCODED_BYTESTRING); ck_assert_int_eq(out.content.encoded.typeId.identifier.numeric, 4711); - + //{"unknown":"body","saveas":"Bytestring"}Q ck_assert_int_eq(out.content.encoded.body.length, 40); ck_assert_int_eq(out.content.encoded.body.data[2], 'u'); @@ -5314,7 +5314,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":1,\"Body\":false}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5349,14 +5349,14 @@ START_TEST(UA_VariantStringArray_json_decode) { // given - + UA_Variant *out = UA_Variant_new(); UA_Variant_init(out); UA_ByteString buf = UA_STRING("{\"Type\":12,\"Body\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\"],\"Dimension\":[2,4]}"); //UA_ByteString buf = UA_STRING("{\"SymbolicId\":13,\"LocalizedText\":14,\"Locale\":12,\"AdditionalInfo\":\"additionalInfo\",\"InnerStatusCode\":2155216896}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, out, &UA_TYPES[UA_TYPES_VARIANT]); UA_String *testArray; @@ -5382,14 +5382,14 @@ START_TEST(UA_VariantStringArrayNull_json_decode) { // given - + UA_Variant out; UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":12,\"Body\":[null, null, null, null, null, null, null, null],\"Dimension\":[2,4]}"); //UA_ByteString buf = UA_STRING("{\"SymbolicId\":13,\"LocalizedText\":14,\"Locale\":12,\"AdditionalInfo\":\"additionalInfo\",\"InnerStatusCode\":2155216896}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); UA_String *testArray; @@ -5416,14 +5416,14 @@ START_TEST(UA_VariantLocalizedTextArrayNull_json_decode) { // given - + UA_Variant out; UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":21,\"Body\":[null, null, null, null, null, null, null, null],\"Dimension\":[2,4]}"); //UA_ByteString buf = UA_STRING("{\"SymbolicId\":13,\"LocalizedText\":14,\"Locale\":12,\"AdditionalInfo\":\"additionalInfo\",\"InnerStatusCode\":2155216896}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); UA_LocalizedText *testArray; @@ -5450,14 +5450,14 @@ START_TEST(UA_VariantVariantArrayNull_json_decode) { // given - + UA_Variant out; UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":22,\"Body\":[null, null, null, null, null, null, null, null],\"Dimension\":[2,4]}"); //UA_ByteString buf = UA_STRING("{\"SymbolicId\":13,\"LocalizedText\":14,\"Locale\":12,\"AdditionalInfo\":\"additionalInfo\",\"InnerStatusCode\":2155216896}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); UA_Variant *testArray; @@ -5501,7 +5501,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":12,\"Body\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\"]}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); UA_String *testArray; @@ -5530,7 +5530,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":1,\"Body\":[true, false, true]}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); UA_Boolean *testArray; @@ -5554,7 +5554,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":1,\"Body\":\"\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then UA_Variant_clear(&out); @@ -5564,16 +5564,16 @@ START_TEST(UA_Variant_ExtensionObjectWrap_json_decode) { // given - + UA_Variant out; UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":22,\"Body\":{\"TypeId\":{\"Id\":511},\"Body\":{\"ViewId\":{\"Id\":99999},\"Timestamp\":\"1970-01-15T06:56:07.000Z\",\"ViewVersion\":1236}}}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then - + ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); ck_assert(out.type == &UA_TYPES[UA_TYPES_VIEWDESCRIPTION]); UA_ViewDescription *vd = (UA_ViewDescription*)out.data; @@ -5589,7 +5589,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":1, \"Body\":false, \"Type\":1}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_BADDECODINGERROR); @@ -5603,7 +5603,7 @@ UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":1, \"Body\":\"asdfaaaaaaaaaaaaaaaaaaaa\"}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then ck_assert_int_eq(retval, UA_STATUSCODE_BADDECODINGERROR); @@ -5624,7 +5624,7 @@ "\"UserWriteMask\":63," "\"IsAbstract\":false}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES]); // then ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); @@ -5643,14 +5643,14 @@ //-------------------MISC heap free test cases-------------------------- START_TEST(UA_VariantStringArrayBad_shouldFreeArray_json_decode) { // given - + UA_Variant out; UA_Variant_init(&out); //not a string V UA_ByteString buf = UA_STRING("{\"Type\":12,\"Body\":[\"1\",\"2\",true,\"4\",\"5\",\"6\",\"7\",\"8\"],\"Dimension\":[2,4]}"); //UA_ByteString buf = UA_STRING("{\"SymbolicId\":13,\"LocalizedText\":14,\"Locale\":12,\"AdditionalInfo\":\"additionalInfo\",\"InnerStatusCode\":2155216896}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then @@ -5662,14 +5662,14 @@ START_TEST(UA_VariantFuzzer1_json_decode) { // given - + UA_Variant out; - UA_Variant_init(&out); + UA_Variant_init(&out); UA_ByteString buf = UA_STRING("\\x0a{\"Type\",\"Bode\",\"Body\":{\"se\":}}"); //UA_ByteString buf = UA_STRING("{\"SymbolicId\":13,\"LocalizedText\":14,\"Locale\":12,\"AdditionalInfo\":\"additionalInfo\",\"InnerStatusCode\":2155216896}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then @@ -5684,14 +5684,14 @@ // TODO: Verify against the spec START_TEST(UA_VariantFuzzer2_json_decode) { // given - + UA_Variant out; - UA_Variant_init(&out); + UA_Variant_init(&out); UA_ByteString buf = UA_STRING("{\"Type\":11,\"Body\":2E+}"); //UA_ByteString buf = UA_STRING("{\"SymbolicId\":13,\"LocalizedText\":14,\"Locale\":12,\"AdditionalInfo\":\"additionalInfo\",\"InnerStatusCode\":2155216896}"); // when - + UA_StatusCode retval = UA_decodeJsonInternal(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]); // then @@ -5763,7 +5763,7 @@ START_TEST(UA_JsonHelper) { // given - + CtxJson ctx; memset(&ctx, 0, sizeof(ctx)); ck_assert_int_eq(writeJsonArrStart(&ctx), UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED); @@ -5778,7 +5778,7 @@ ck_assert_int_eq(calcJsonObjStart(&ctx), UA_STATUSCODE_GOOD); ck_assert_int_eq(calcJsonObjEnd(&ctx), UA_STATUSCODE_GOOD); ck_assert_int_eq(calcJsonArrEnd(&ctx), UA_STATUSCODE_GOOD); -} +} END_TEST /* ----------------- Public API ---------------------*/ @@ -5815,12 +5815,12 @@ static Suite *testSuite_builtin_json(void) { Suite *s = suite_create("Built-in Data Types 62541-6 Json"); - + TCase *tc_json_encode = tcase_create("json_encode"); tcase_add_test(tc_json_encode, UA_Boolean_true_json_encode); tcase_add_test(tc_json_encode, UA_Boolean_false_json_encode); tcase_add_test(tc_json_encode, UA_Boolean_true_bufferTooSmall_json_encode); - + tcase_add_test(tc_json_encode, UA_String_json_encode); tcase_add_test(tc_json_encode, UA_String_Empty_json_encode); tcase_add_test(tc_json_encode, UA_String_Null_json_encode); @@ -5828,46 +5828,46 @@ tcase_add_test(tc_json_encode, UA_String_escapeutf_json_encode); tcase_add_test(tc_json_encode, UA_String_special_json_encode); - + tcase_add_test(tc_json_encode, UA_Byte_Max_Number_json_encode); tcase_add_test(tc_json_encode, UA_Byte_Min_Number_json_encode); tcase_add_test(tc_json_encode, UA_Byte_smallbuf_Number_json_encode); - + tcase_add_test(tc_json_encode, UA_SByte_Max_Number_json_encode); tcase_add_test(tc_json_encode, UA_SByte_Min_Number_json_encode); tcase_add_test(tc_json_encode, UA_SByte_Zero_Number_json_encode); tcase_add_test(tc_json_encode, UA_SByte_smallbuf_Number_json_encode); - - + + tcase_add_test(tc_json_encode, UA_UInt16_Max_Number_json_encode); tcase_add_test(tc_json_encode, UA_UInt16_Min_Number_json_encode); tcase_add_test(tc_json_encode, UA_UInt16_smallbuf_Number_json_encode); - + tcase_add_test(tc_json_encode, UA_Int16_Max_Number_json_encode); tcase_add_test(tc_json_encode, UA_Int16_Min_Number_json_encode); tcase_add_test(tc_json_encode, UA_Int16_Zero_Number_json_encode); tcase_add_test(tc_json_encode, UA_Int16_smallbuf_Number_json_encode); - - + + tcase_add_test(tc_json_encode, UA_UInt32_Max_Number_json_encode); tcase_add_test(tc_json_encode, UA_UInt32_Min_Number_json_encode); tcase_add_test(tc_json_encode, UA_UInt32_smallbuf_Number_json_encode); - + tcase_add_test(tc_json_encode, UA_Int32_Max_Number_json_encode); tcase_add_test(tc_json_encode, UA_Int32_Min_Number_json_encode); tcase_add_test(tc_json_encode, UA_Int32_Zero_Number_json_encode); tcase_add_test(tc_json_encode, UA_Int32_smallbuf_Number_json_encode); - - + + tcase_add_test(tc_json_encode, UA_UInt64_Max_Number_json_encode); tcase_add_test(tc_json_encode, UA_UInt64_Min_Number_json_encode); tcase_add_test(tc_json_encode, UA_UInt64_smallbuf_Number_json_encode); - + tcase_add_test(tc_json_encode, UA_Int64_Max_Number_json_encode); tcase_add_test(tc_json_encode, UA_Int64_Min_Number_json_encode); tcase_add_test(tc_json_encode, UA_Int64_Zero_Number_json_encode); tcase_add_test(tc_json_encode, UA_Int64_smallbuf_Number_json_encode); - + //Double Float tcase_add_test(tc_json_encode, UA_Double_json_encode); tcase_add_test(tc_json_encode, UA_Double_onesmallest_json_encode); @@ -5882,71 +5882,71 @@ tcase_add_test(tc_json_encode, UA_Variant_DoubleNan_json_encode); - + //LocalizedText tcase_add_test(tc_json_encode, UA_LocText_json_encode); tcase_add_test(tc_json_encode, UA_LocText_NonReversible_json_encode); tcase_add_test(tc_json_encode, UA_LocText_smallBuffer_json_encode); - + //Guid tcase_add_test(tc_json_encode, UA_Guid_json_encode); tcase_add_test(tc_json_encode, UA_Guid_smallbuf_json_encode); - + //DateTime tcase_add_test(tc_json_encode, UA_DateTime_json_encode); tcase_add_test(tc_json_encode, UA_DateTime_json_encode_null); tcase_add_test(tc_json_encode, UA_DateTime_with_nanoseconds_json_encode); - - + + //StatusCode tcase_add_test(tc_json_encode, UA_StatusCode_json_encode); tcase_add_test(tc_json_encode, UA_StatusCode_nonReversible_json_encode); tcase_add_test(tc_json_encode, UA_StatusCode_nonReversible_good_json_encode); tcase_add_test(tc_json_encode, UA_StatusCode_smallbuf_json_encode); - - + + //NodeId tcase_add_test(tc_json_encode, UA_NodeId_Numeric_json_encode); tcase_add_test(tc_json_encode, UA_NodeId_Numeric_Namespace_json_encode); - + tcase_add_test(tc_json_encode, UA_NodeId_String_json_encode); tcase_add_test(tc_json_encode, UA_NodeId_String_Namespace_json_encode); tcase_add_test(tc_json_encode, UA_NodeId_Guid_json_encode); tcase_add_test(tc_json_encode, UA_NodeId_Guid_Namespace_json_encode); - + tcase_add_test(tc_json_encode, UA_NodeId_ByteString_json_encode); tcase_add_test(tc_json_encode, UA_NodeId_ByteString_Namespace_json_encode); - + tcase_add_test(tc_json_encode, UA_NodeId_NonReversible_Numeric_Namespace_json_encode); - + //ExpandedNodeId tcase_add_test(tc_json_encode, UA_ExpandedNodeId_json_encode); tcase_add_test(tc_json_encode, UA_ExpandedNodeId_MissingNamespaceUri_json_encode); tcase_add_test(tc_json_encode, UA_ExpandedNodeId_NonReversible_Ns1_json_encode); tcase_add_test(tc_json_encode, UA_ExpandedNodeId_NonReversible_Namespace_json_encode); tcase_add_test(tc_json_encode, UA_ExpandedNodeId_NonReversible_NamespaceUriGiven_json_encode); - - + + //DiagnosticInfo tcase_add_test(tc_json_encode, UA_DiagInfo_json_encode); tcase_add_test(tc_json_encode, UA_DiagInfo_withInner_json_encode); tcase_add_test(tc_json_encode, UA_DiagInfo_withTwoInner_json_encode); tcase_add_test(tc_json_encode, UA_DiagInfo_noFields_json_encode); tcase_add_test(tc_json_encode, UA_DiagInfo_smallBuffer_json_encode); - - + + //ByteString tcase_add_test(tc_json_encode, UA_ByteString_json_encode); tcase_add_test(tc_json_encode, UA_ByteString2_json_encode); tcase_add_test(tc_json_encode, UA_ByteString3_json_encode); - + //QualifiedName tcase_add_test(tc_json_encode, UA_QualName_json_encode); tcase_add_test(tc_json_encode, UA_QualName_NonReversible_json_encode); tcase_add_test(tc_json_encode, UA_QualName_NonReversible_Namespace_json_encode); tcase_add_test(tc_json_encode, UA_QualName_NonReversible_NoNamespaceAsNumber_json_encode); - + //Variant -REVERSIBLE- tcase_add_test(tc_json_encode, UA_Variant_Bool_json_encode); tcase_add_test(tc_json_encode, UA_Variant_Number_json_encode); @@ -5957,41 +5957,41 @@ tcase_add_test(tc_json_encode, UA_Variant_NodeId_json_encode); tcase_add_test(tc_json_encode, UA_Variant_LocText_json_encode); tcase_add_test(tc_json_encode, UA_Variant_QualName_json_encode); - + //Array tcase_add_test(tc_json_encode, UA_Variant_Array_UInt16_json_encode); tcase_add_test(tc_json_encode, UA_Variant_Array_UInt16_Null_json_encode); tcase_add_test(tc_json_encode, UA_Variant_Array_Byte_json_encode); tcase_add_test(tc_json_encode, UA_Variant_Array_String_json_encode); - + //Matrix tcase_add_test(tc_json_encode, UA_Variant_Matrix_UInt16_json_encode); - + //Wrap tcase_add_test(tc_json_encode, UA_Variant_Wrap_json_encode); tcase_add_test(tc_json_encode, UA_Variant_Wrap_Array_json_encode); - + //Variant -NON-REVERSIBLE- tcase_add_test(tc_json_encode, UA_Variant_StatusCode_NonReversible_json_encode); - + //Array tcase_add_test(tc_json_encode, UA_Variant_Array_String_NonReversible_json_encode); - + //Matrix tcase_add_test(tc_json_encode, UA_Variant_Matrix_String_NonReversible_json_encode); tcase_add_test(tc_json_encode, UA_Variant_Matrix_NodeId_NonReversible_json_encode); - + //Wrap non reversible tcase_add_test(tc_json_encode, UA_Variant_Wrap_Array_NonReversible_json_encode); - - + + //ExtensionObject tcase_add_test(tc_json_encode, UA_ExtensionObject_json_encode); tcase_add_test(tc_json_encode, UA_ExtensionObject_xml_json_encode); tcase_add_test(tc_json_encode, UA_ExtensionObject_byteString_json_encode); - + tcase_add_test(tc_json_encode, UA_ExtensionObject_NonReversible_StatusCode_json_encode); - + //DataValue tcase_add_test(tc_json_encode, UA_DataValue_json_encode); tcase_add_test(tc_json_encode, UA_DataValue_null_json_encode); @@ -6002,40 +6002,40 @@ tcase_add_test(tc_json_encode, UA_VariableAttributes_json_encode); suite_add_tcase(s, tc_json_encode); - + TCase *tc_json_decode = tcase_create("json_decode"); - - + + tcase_add_test(tc_json_decode, UA_SByte_Min_json_decode); tcase_add_test(tc_json_decode, UA_SByte_Max_json_decode); - + tcase_add_test(tc_json_decode, UA_Byte_Min_json_decode); tcase_add_test(tc_json_decode, UA_Byte_Max_json_decode); - + tcase_add_test(tc_json_decode, UA_Int16_Min_json_decode); tcase_add_test(tc_json_decode, UA_Int16_Max_json_decode); - + tcase_add_test(tc_json_decode, UA_UInt16_Min_json_decode); tcase_add_test(tc_json_decode, UA_UInt16_Max_json_decode); - + tcase_add_test(tc_json_decode, UA_UInt32_Min_json_decode); tcase_add_test(tc_json_decode, UA_UInt32_Max_json_decode); - + tcase_add_test(tc_json_decode, UA_Int32_Min_json_decode); tcase_add_test(tc_json_decode, UA_Int32_Max_json_decode); - + tcase_add_test(tc_json_decode, UA_Int64_Min_json_decode); tcase_add_test(tc_json_decode, UA_Int64_Max_json_decode); tcase_add_test(tc_json_decode, UA_Int64_Overflow_json_decode); tcase_add_test(tc_json_decode, UA_Int64_TooBig_json_decode); tcase_add_test(tc_json_decode, UA_Int64_NoDigit_json_decode); - + tcase_add_test(tc_json_decode, UA_UInt64_Min_json_decode); tcase_add_test(tc_json_decode, UA_UInt64_Max_json_decode); tcase_add_test(tc_json_decode, UA_UInt64_Overflow_json_decode); - - + + tcase_add_test(tc_json_decode, UA_Float_json_decode); tcase_add_test(tc_json_decode, UA_Float_json_one_decode); @@ -6044,7 +6044,7 @@ tcase_add_test(tc_json_decode, UA_Float_json_nan_decode); tcase_add_test(tc_json_decode, UA_Float_json_negnan_decode); - + tcase_add_test(tc_json_decode, UA_Double_json_decode); tcase_add_test(tc_json_decode, UA_Double_one_json_decode); tcase_add_test(tc_json_decode, UA_Double_corrupt_json_decode); @@ -6056,24 +6056,24 @@ tcase_add_test(tc_json_decode, UA_Double_zero_json_decode); tcase_add_test(tc_json_decode, UA_Double_inf_json_decode); tcase_add_test(tc_json_decode, UA_Double_neginf_json_decode); - - + + //String tcase_add_test(tc_json_decode, UA_String_json_decode); tcase_add_test(tc_json_decode, UA_String_empty_json_decode); tcase_add_test(tc_json_decode, UA_String_unescapeBS_json_decode); - + tcase_add_test(tc_json_decode, UA_String_escape_unicode_json_decode); - + tcase_add_test(tc_json_decode, UA_String_escape2_json_decode); tcase_add_test(tc_json_decode, UA_String_surrogatePair_json_decode); - + //ByteString tcase_add_test(tc_json_decode, UA_ByteString_json_decode); tcase_add_test(tc_json_decode, UA_ByteString_bad_json_decode); tcase_add_test(tc_json_decode, UA_ByteString_null_json_decode); - - + + //DateTime tcase_add_test(tc_json_decode, UA_DateTime_json_decode); tcase_add_test(tc_json_decode, UA_DateTime_json_decode_large); @@ -6081,44 +6081,44 @@ tcase_add_test(tc_json_decode, UA_DateTime_json_decode_min); tcase_add_test(tc_json_decode, UA_DateTime_json_decode_max); tcase_add_test(tc_json_decode, UA_DateTime_micro_json_decode); - - + + //Guid tcase_add_test(tc_json_decode, UA_Guid_json_decode); tcase_add_test(tc_json_decode, UA_Guid_lower_json_decode); tcase_add_test(tc_json_decode, UA_Guid_tooShort_json_decode); tcase_add_test(tc_json_decode, UA_Guid_tooLong_json_decode); tcase_add_test(tc_json_decode, UA_Guid_wrong_json_decode); - - + + //StatusCode tcase_add_test(tc_json_decode, UA_StatusCode_2_json_decode); tcase_add_test(tc_json_decode, UA_StatusCode_3_json_decode); tcase_add_test(tc_json_decode, UA_StatusCode_0_json_decode); - - + + //QualName tcase_add_test(tc_json_decode, UA_QualifiedName_json_decode); tcase_add_test(tc_json_decode, UA_QualifiedName_null_json_decode); - - + + //LocalizedText tcase_add_test(tc_json_decode, UA_LocalizedText_json_decode); tcase_add_test(tc_json_decode, UA_LocalizedText_missing_json_decode); tcase_add_test(tc_json_decode, UA_LocalizedText_null_json_decode); - + //-NodeId- tcase_add_test(tc_json_decode, UA_NodeId_Nummeric_json_decode); tcase_add_test(tc_json_decode, UA_NodeId_Nummeric_Namespace_json_decode); tcase_add_test(tc_json_decode, UA_NodeId_String_json_decode); - + tcase_add_test(tc_json_decode, UA_NodeId_Guid_json_decode); - + tcase_add_test(tc_json_decode, UA_NodeId_ByteString_json_decode); - - + + //expandednodeid tcase_add_test(tc_json_decode, UA_ExpandedNodeId_Nummeric_json_decode); tcase_add_test(tc_json_decode, UA_ExpandedNodeId_String_json_decode); @@ -6126,12 +6126,12 @@ tcase_add_test(tc_json_decode, UA_ExpandedNodeId_String_NamespaceAsIndex_json_decode); tcase_add_test(tc_json_decode, UA_ExpandedNodeId_String_Namespace_ServerUri_json_decode); tcase_add_test(tc_json_decode, UA_ExpandedNodeId_ByteString_json_decode); - + //Diaginfo tcase_add_test(tc_json_decode, UA_DiagnosticInfo_json_decode); tcase_add_test(tc_json_decode, UA_DiagnosticInfo_null_json_decode); - - + + //Variant tcase_add_test(tc_json_decode, UA_VariantBool_json_decode); tcase_add_test(tc_json_decode, UA_VariantBoolNull_json_decode); @@ -6145,27 +6145,27 @@ tcase_add_test(tc_json_decode, UA_Variant_BooleanArray_json_decode); tcase_add_test(tc_json_decode, UA_Variant_bad1_json_decode); tcase_add_test(tc_json_decode, UA_Variant_ExtensionObjectWrap_json_decode); - + //DataValue tcase_add_test(tc_json_decode, UA_DataValue_json_decode); tcase_add_test(tc_json_decode, UA_DataValueMissingFields_json_decode); tcase_add_test(tc_json_decode, UA_DataValue_null_json_decode); - + //extensionobject tcase_add_test(tc_json_decode, UA_ExtensionObject_json_decode); tcase_add_test(tc_json_decode, UA_ExtensionObject_EncodedByteString_json_decode); tcase_add_test(tc_json_decode, UA_ExtensionObject_EncodedXml_json_decode); tcase_add_test(tc_json_decode, UA_ExtensionObject_Unkown_json_decode); - - + + //Others tcase_add_test(tc_json_decode, UA_duplicate_json_decode); tcase_add_test(tc_json_decode, UA_wrongBoolean_json_decode); - + tcase_add_test(tc_json_decode, UA_ViewDescription_json_decode); tcase_add_test(tc_json_decode, UA_DataTypeAttributes_json_decode); - - + + tcase_add_test(tc_json_decode, UA_VariantStringArrayBad_shouldFreeArray_json_decode); tcase_add_test(tc_json_decode, UA_VariantFuzzer1_json_decode); tcase_add_test(tc_json_decode, UA_VariantFuzzer2_json_decode); @@ -6181,7 +6181,7 @@ tcase_add_test(tc_json_decode, UA_Boolean_true_public_json_encode); suite_add_tcase(s, tc_json_decode); - + TCase *tc_json_helper = tcase_create("json_helper"); tcase_add_test(tc_json_decode, UA_JsonHelper); suite_add_tcase(s, tc_json_helper); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/client/check_client_highlevel.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/client/check_client_highlevel.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/client/check_client_highlevel.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/client/check_client_highlevel.c 2022-06-24 19:01:27.000000000 +0000 @@ -503,7 +503,7 @@ attr, &nodeReadWriteView); ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); } - + // iterate over children retval = UA_Client_forEachChildNodeCall(client, nodeReadWriteUnitTest, nodeIter, NULL); ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/client/check_client_securechannel.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/client/check_client_securechannel.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/client/check_client_securechannel.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/client/check_client_securechannel.c 2022-06-24 19:01:27.000000000 +0000 @@ -173,7 +173,7 @@ UA_StatusCode retval = UA_Client_connect(client, "opc.tcp://localhost:4840"); ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); - + UA_Client_disconnectSecureChannel(client); UA_ClientConfig *cconfig = UA_Client_getConfig(client); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/client/check_client_subscriptions.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/client/check_client_subscriptions.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/client/check_client_subscriptions.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/client/check_client_subscriptions.c 2022-06-24 19:01:27.000000000 +0000 @@ -1125,7 +1125,7 @@ UA_CloseSessionRequest_init(&closeRequest); closeRequest.deleteSubscriptions = false; UA_CloseSessionResponse closeResponse; - + __UA_Client_Service(client, &closeRequest, &UA_TYPES[UA_TYPES_CLOSESESSIONREQUEST], &closeResponse, &UA_TYPES[UA_TYPES_CLOSESESSIONRESPONSE]); @@ -1241,7 +1241,7 @@ UA_NODEID_NUMERIC(0, UA_NS0ID_SERVER_SERVERSTATUS_CURRENTTIME); UA_MonitoredItemCreateRequest monRequest = UA_MonitoredItemCreateRequest_default(currentTime); - + UA_MonitoredItemCreateResult monResponse = UA_Client_MonitoredItems_createDataChange(client, response.subscriptionId, UA_TIMESTAMPSTORETURN_BOTH, diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/encryption/certificates.h open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/encryption/certificates.h --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/encryption/certificates.h 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/encryption/certificates.h 2022-06-24 19:01:27.000000000 +0000 @@ -7,146 +7,146 @@ #define KEY_DER_LENGTH 1193 UA_Byte KEY_DER_DATA[1193] = { - 0x30, 0x82, 0x04, 0xa5, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, 0x01, 0x00, 0xe0, 0xc9, 0x91, 0x62, - 0xcd, 0x91, 0x68, 0x75, 0x2c, 0x32, 0x7a, 0xdd, 0xf1, 0xd6, 0x64, 0x77, 0x8b, 0x72, 0x9e, 0x14, - 0x2a, 0x62, 0x08, 0xd1, 0x89, 0x7d, 0xe2, 0x17, 0xdc, 0xb3, 0xda, 0xbc, 0x3a, 0x9f, 0x84, 0x03, - 0xd3, 0x2e, 0x68, 0xbe, 0xc1, 0x57, 0xcb, 0x2a, 0xe2, 0xd6, 0xcf, 0xc4, 0x7f, 0xbd, 0x53, 0x3f, - 0xeb, 0x39, 0x98, 0x69, 0xb0, 0x40, 0x14, 0xbf, 0xf5, 0x5a, 0x23, 0x23, 0xf4, 0x4c, 0xf8, 0xf1, - 0x03, 0x56, 0x6d, 0x7d, 0x1b, 0x93, 0xd7, 0x0f, 0xc1, 0x8c, 0x70, 0xe0, 0x2c, 0x55, 0x7e, 0xa1, - 0xfc, 0x05, 0xe9, 0xd7, 0xea, 0xb1, 0x5c, 0x0f, 0x9b, 0xac, 0x6a, 0x2e, 0xb4, 0xc5, 0xbf, 0x41, - 0x8f, 0xda, 0xfc, 0x85, 0xc6, 0xaa, 0x25, 0xe4, 0xb9, 0x9a, 0xc6, 0xd8, 0x9a, 0x31, 0x8a, 0x17, - 0x8b, 0x8c, 0x4e, 0x20, 0xd9, 0x71, 0xfc, 0x66, 0x3a, 0xfd, 0x49, 0x95, 0x54, 0xa8, 0xaf, 0x42, - 0x5e, 0xba, 0x26, 0xe6, 0xd3, 0xa0, 0xd2, 0x02, 0x3b, 0x51, 0x8b, 0x39, 0xd3, 0x97, 0xd2, 0xe4, - 0xd1, 0x01, 0x65, 0xab, 0x8e, 0xa2, 0x80, 0x5b, 0x5e, 0xbb, 0x11, 0x7f, 0x50, 0x1b, 0x2b, 0x0d, - 0x20, 0x40, 0xb5, 0xbf, 0xd1, 0x32, 0xfa, 0x25, 0xe1, 0x0d, 0x75, 0xfc, 0x11, 0xcf, 0x21, 0xdd, - 0x45, 0x16, 0xe4, 0x56, 0x58, 0x49, 0x33, 0xca, 0xaf, 0xe3, 0x17, 0x7b, 0x7a, 0x8f, 0xb1, 0xec, - 0x1c, 0x4d, 0xa2, 0xc2, 0xce, 0x8b, 0x19, 0x4b, 0xc0, 0xc4, 0x36, 0x6a, 0x7c, 0x5b, 0x89, 0x14, - 0x98, 0xcb, 0xa9, 0xca, 0x66, 0xf2, 0xaa, 0xf9, 0x12, 0x40, 0x0e, 0x6a, 0x78, 0x4d, 0x1f, 0x54, - 0x3c, 0x03, 0x7a, 0x91, 0xf5, 0xb7, 0x3d, 0xe2, 0xfc, 0x65, 0xb7, 0xaa, 0xa9, 0x39, 0x68, 0xa7, - 0xdb, 0x29, 0xc1, 0x40, 0x0b, 0x4e, 0xfb, 0xce, 0x74, 0xa5, 0x46, 0xb9, 0x02, 0x03, 0x01, 0x00, - 0x01, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb4, 0xc8, 0x07, 0x60, 0x01, 0xd9, 0xb6, 0xbb, 0xbd, 0x8e, - 0xdf, 0x97, 0xcd, 0xde, 0x51, 0xb0, 0x7e, 0xfa, 0xf0, 0x3d, 0x61, 0x94, 0xb4, 0x68, 0xe8, 0x7d, - 0xd0, 0x2e, 0xc6, 0xb5, 0xf2, 0xed, 0xbc, 0xeb, 0xfb, 0x3d, 0x24, 0x43, 0x47, 0xc4, 0x5a, 0x34, - 0x64, 0x56, 0x1a, 0x57, 0x0e, 0x83, 0x87, 0x04, 0x59, 0x86, 0xa7, 0x84, 0x0b, 0x9a, 0xbc, 0x3f, - 0xdd, 0x30, 0x40, 0x7f, 0x7c, 0x91, 0x76, 0xf1, 0xcc, 0xa7, 0xf0, 0xba, 0x3a, 0x96, 0x0a, 0x6e, - 0xcc, 0xe0, 0x84, 0x15, 0x91, 0xd6, 0x08, 0x71, 0xbd, 0xc5, 0x42, 0xad, 0xf2, 0xd2, 0x4e, 0x92, - 0xd3, 0x6a, 0x4e, 0x15, 0xcc, 0xd3, 0xc1, 0x58, 0xe4, 0x27, 0x33, 0x2d, 0xb8, 0x37, 0x52, 0x7e, - 0x16, 0xb9, 0xab, 0xb7, 0xd9, 0xc1, 0xeb, 0xc8, 0x79, 0xb9, 0xd3, 0xe6, 0x44, 0x13, 0x51, 0x2d, - 0xc6, 0x02, 0xe5, 0xe0, 0x3c, 0xa3, 0x15, 0x9b, 0x49, 0xae, 0x85, 0xbe, 0x8c, 0x84, 0xf9, 0x87, - 0x5d, 0x91, 0x9e, 0xf4, 0xf9, 0xf2, 0x8d, 0x81, 0x77, 0x7c, 0xfc, 0x60, 0x09, 0x48, 0x43, 0x2e, - 0xbb, 0xaf, 0xc9, 0xd6, 0x90, 0x2d, 0x40, 0x80, 0x59, 0xbd, 0x3b, 0x04, 0xda, 0x50, 0x2a, 0x53, - 0xf5, 0xc0, 0x97, 0x54, 0x04, 0x14, 0xb1, 0x8e, 0xd1, 0x6b, 0x53, 0x9e, 0xa4, 0xaa, 0x5e, 0x6e, - 0x1c, 0x11, 0x6b, 0x0a, 0xc4, 0xec, 0x5b, 0x77, 0xa8, 0x00, 0x83, 0x77, 0xdb, 0xf4, 0xfb, 0x00, - 0xf4, 0x06, 0x57, 0x25, 0x8e, 0x1c, 0x87, 0xb4, 0xbe, 0xb8, 0x04, 0x35, 0x93, 0x67, 0xaa, 0x36, - 0xa5, 0x62, 0xe4, 0xf6, 0xcb, 0xc8, 0xa6, 0x58, 0x77, 0x96, 0xc4, 0x6c, 0x0b, 0xc8, 0x41, 0xe2, - 0x36, 0x01, 0x94, 0xa5, 0xe9, 0x46, 0x17, 0xd3, 0x0b, 0x18, 0x7e, 0x06, 0x88, 0x9b, 0x7e, 0xdd, - 0x92, 0x20, 0xc6, 0xe3, 0x7e, 0xb1, 0x02, 0x81, 0x81, 0x00, 0xf5, 0xa6, 0xda, 0x32, 0xb9, 0x37, - 0x61, 0xe9, 0x7c, 0x99, 0xf7, 0x4a, 0x37, 0xee, 0x52, 0x30, 0x4f, 0xbf, 0x57, 0x6f, 0xfe, 0x20, - 0xdc, 0xa3, 0xfe, 0x51, 0xbf, 0x72, 0x13, 0x8a, 0xb1, 0xd7, 0x99, 0x7d, 0x67, 0xa8, 0xd4, 0xb0, - 0x35, 0x40, 0x7c, 0xc8, 0xdc, 0x03, 0x6b, 0x90, 0xb5, 0x65, 0x04, 0x7f, 0x97, 0x8b, 0xa8, 0x69, - 0x20, 0x04, 0xcb, 0x48, 0x39, 0xb7, 0x57, 0xe0, 0xd9, 0xbb, 0x15, 0xe1, 0x59, 0x16, 0xf3, 0xe1, - 0xab, 0x91, 0xea, 0x8a, 0x88, 0xad, 0x8d, 0xa3, 0x24, 0x4a, 0x35, 0xa5, 0xd2, 0x32, 0x19, 0x66, - 0xa8, 0xbb, 0x32, 0x9d, 0xf4, 0x94, 0x99, 0xc1, 0x2e, 0x2b, 0xf8, 0x98, 0x6a, 0x6e, 0x72, 0x77, - 0xd0, 0xc9, 0xfc, 0x5f, 0xd7, 0x69, 0xd1, 0x08, 0x12, 0xbf, 0x81, 0xc1, 0xa1, 0x1b, 0x3b, 0x41, - 0xb0, 0x24, 0x11, 0x0a, 0x65, 0xab, 0x81, 0x39, 0xb3, 0xd5, 0x02, 0x81, 0x81, 0x00, 0xea, 0x41, - 0xb5, 0xed, 0xac, 0xa0, 0x43, 0xd7, 0xde, 0x1e, 0x6b, 0x95, 0xbe, 0x88, 0x02, 0xaf, 0x2f, 0xbb, - 0x37, 0xf7, 0x2f, 0xf6, 0x4f, 0xa0, 0xaa, 0x43, 0x03, 0x7d, 0x33, 0xdd, 0x1e, 0x7a, 0xba, 0xa0, - 0x10, 0x77, 0x1f, 0x4a, 0xc9, 0x88, 0x58, 0x9d, 0x81, 0x3a, 0xe8, 0xac, 0x86, 0x2f, 0x80, 0x6c, - 0xc7, 0xa0, 0xe5, 0xed, 0x8d, 0x90, 0xa9, 0xa7, 0x36, 0x23, 0xd7, 0xb5, 0x89, 0xfc, 0xad, 0x4d, - 0xae, 0x0e, 0xec, 0xdc, 0xe7, 0x7e, 0x69, 0xfe, 0x62, 0x4b, 0x81, 0xfe, 0x52, 0x81, 0x77, 0x6a, - 0x35, 0xab, 0x52, 0x6f, 0x56, 0x41, 0x6c, 0x57, 0x3d, 0x75, 0x92, 0x14, 0x42, 0xa2, 0xc9, 0x50, - 0x52, 0x57, 0x9f, 0x26, 0x3c, 0xcd, 0x61, 0xa9, 0xda, 0x9b, 0x2c, 0xda, 0xc1, 0xd0, 0x26, 0x07, - 0x90, 0x15, 0x8c, 0x81, 0xe2, 0xde, 0xc0, 0x98, 0x58, 0x9d, 0x96, 0x0f, 0xcd, 0x55, 0x02, 0x81, - 0x81, 0x00, 0x87, 0xfb, 0xf8, 0x77, 0xf1, 0xcd, 0xf5, 0xb6, 0xa1, 0xd2, 0x3d, 0x71, 0x69, 0x6a, - 0xd5, 0x36, 0x87, 0x3e, 0xdd, 0xb1, 0x52, 0x55, 0x70, 0xae, 0x9b, 0x9f, 0x37, 0x42, 0x78, 0x0c, - 0xe4, 0x0b, 0xfc, 0x9c, 0xce, 0x20, 0x48, 0xb4, 0xce, 0x95, 0xc7, 0x3e, 0x0d, 0x85, 0x1b, 0x2b, - 0x7d, 0x2e, 0xd1, 0x81, 0xac, 0x2b, 0x94, 0x6b, 0xb5, 0x5c, 0xd2, 0x07, 0x46, 0x63, 0xf7, 0x12, - 0xb2, 0x94, 0xfd, 0x34, 0xc4, 0xf3, 0x8e, 0xc8, 0x13, 0x08, 0xf0, 0x74, 0x05, 0xdb, 0x45, 0x37, - 0xd5, 0x63, 0xfb, 0x34, 0xb3, 0x1a, 0x26, 0xb3, 0x8c, 0x9e, 0x2c, 0x14, 0x02, 0x8b, 0xac, 0x5d, - 0xa3, 0x28, 0x96, 0x32, 0x11, 0x60, 0xd8, 0x9e, 0xf9, 0x06, 0x87, 0x5d, 0xaa, 0xca, 0x99, 0xfb, - 0x45, 0x1d, 0x9c, 0x3f, 0xca, 0xe6, 0x5f, 0x34, 0x2a, 0xc4, 0x9c, 0x66, 0x4c, 0x07, 0xd7, 0xbe, - 0x50, 0x8d, 0x02, 0x81, 0x80, 0x51, 0xdb, 0x96, 0x6c, 0x30, 0x37, 0x6c, 0x9d, 0xa1, 0x43, 0x76, - 0x0a, 0xc4, 0xa2, 0x98, 0x75, 0x89, 0x33, 0x5d, 0xd2, 0x25, 0xd3, 0x67, 0x6d, 0xd8, 0x31, 0x44, - 0xa5, 0xda, 0x9a, 0xb9, 0x0c, 0xdf, 0xec, 0x10, 0xf4, 0xdf, 0x5d, 0x6d, 0xe1, 0x14, 0x3e, 0x2d, - 0xab, 0x5d, 0x24, 0xf4, 0x5a, 0xe3, 0x00, 0xa0, 0x1d, 0x8c, 0x5b, 0x1f, 0x6d, 0xde, 0xaa, 0xcc, - 0x93, 0x67, 0xcc, 0x4b, 0x24, 0x9d, 0x96, 0x98, 0x6d, 0x24, 0xbd, 0xe8, 0xb2, 0xd6, 0xed, 0x0a, - 0x82, 0x22, 0x31, 0xb1, 0xb9, 0x05, 0xf6, 0x7a, 0x3c, 0x9c, 0xb8, 0xc5, 0x26, 0x65, 0x6a, 0x72, - 0xd2, 0x83, 0xb2, 0x4a, 0xba, 0xc1, 0xa8, 0x2c, 0xad, 0xeb, 0xb2, 0x1b, 0xeb, 0x14, 0xe6, 0x9a, - 0xba, 0x40, 0xc9, 0x4c, 0x92, 0xa4, 0xc7, 0x5d, 0xc4, 0xf9, 0xed, 0x65, 0x4e, 0xbb, 0x74, 0x40, - 0xfb, 0x08, 0x36, 0x0b, 0x65, 0x02, 0x81, 0x81, 0x00, 0xeb, 0x60, 0x01, 0x21, 0x22, 0xa1, 0xde, - 0x89, 0x62, 0xfa, 0x68, 0x03, 0x09, 0xf1, 0xa6, 0x14, 0xf0, 0xbe, 0xf7, 0x71, 0x3a, 0x01, 0x85, - 0x1f, 0x2c, 0x86, 0xde, 0x4a, 0xfb, 0x35, 0x16, 0xc4, 0x84, 0x22, 0x83, 0x49, 0xeb, 0x0d, 0xf7, - 0x33, 0x47, 0x8f, 0x96, 0x37, 0x32, 0xd3, 0xd2, 0xec, 0xea, 0x0f, 0xd0, 0xde, 0x0d, 0x27, 0x9e, - 0xc1, 0xf1, 0xe0, 0x39, 0xa6, 0x3e, 0x6c, 0xd4, 0x39, 0xdf, 0xde, 0xbd, 0x4c, 0xb8, 0xe7, 0xb7, - 0x4e, 0x2a, 0x32, 0x92, 0x83, 0xd3, 0x12, 0xb9, 0xa1, 0x91, 0x52, 0x46, 0x24, 0x58, 0x05, 0x35, - 0x22, 0x5f, 0x10, 0x3c, 0x13, 0x5b, 0xbe, 0x47, 0x5e, 0xbf, 0x85, 0xd6, 0xac, 0xfc, 0xbb, 0xd9, - 0x91, 0xf9, 0x50, 0x8f, 0xfc, 0xc2, 0x2c, 0x81, 0x5c, 0xa5, 0xc3, 0xc2, 0x15, 0xbe, 0xf4, 0x72, - 0xfd, 0x4d, 0xf0, 0x10, 0x6f, 0xe5, 0xbf, 0x8c, 0xb1 + 0x30, 0x82, 0x04, 0xa5, 0x02, 0x01, 0x00, 0x02, 0x82, 0x01, 0x01, 0x00, 0xe0, 0xc9, 0x91, 0x62, + 0xcd, 0x91, 0x68, 0x75, 0x2c, 0x32, 0x7a, 0xdd, 0xf1, 0xd6, 0x64, 0x77, 0x8b, 0x72, 0x9e, 0x14, + 0x2a, 0x62, 0x08, 0xd1, 0x89, 0x7d, 0xe2, 0x17, 0xdc, 0xb3, 0xda, 0xbc, 0x3a, 0x9f, 0x84, 0x03, + 0xd3, 0x2e, 0x68, 0xbe, 0xc1, 0x57, 0xcb, 0x2a, 0xe2, 0xd6, 0xcf, 0xc4, 0x7f, 0xbd, 0x53, 0x3f, + 0xeb, 0x39, 0x98, 0x69, 0xb0, 0x40, 0x14, 0xbf, 0xf5, 0x5a, 0x23, 0x23, 0xf4, 0x4c, 0xf8, 0xf1, + 0x03, 0x56, 0x6d, 0x7d, 0x1b, 0x93, 0xd7, 0x0f, 0xc1, 0x8c, 0x70, 0xe0, 0x2c, 0x55, 0x7e, 0xa1, + 0xfc, 0x05, 0xe9, 0xd7, 0xea, 0xb1, 0x5c, 0x0f, 0x9b, 0xac, 0x6a, 0x2e, 0xb4, 0xc5, 0xbf, 0x41, + 0x8f, 0xda, 0xfc, 0x85, 0xc6, 0xaa, 0x25, 0xe4, 0xb9, 0x9a, 0xc6, 0xd8, 0x9a, 0x31, 0x8a, 0x17, + 0x8b, 0x8c, 0x4e, 0x20, 0xd9, 0x71, 0xfc, 0x66, 0x3a, 0xfd, 0x49, 0x95, 0x54, 0xa8, 0xaf, 0x42, + 0x5e, 0xba, 0x26, 0xe6, 0xd3, 0xa0, 0xd2, 0x02, 0x3b, 0x51, 0x8b, 0x39, 0xd3, 0x97, 0xd2, 0xe4, + 0xd1, 0x01, 0x65, 0xab, 0x8e, 0xa2, 0x80, 0x5b, 0x5e, 0xbb, 0x11, 0x7f, 0x50, 0x1b, 0x2b, 0x0d, + 0x20, 0x40, 0xb5, 0xbf, 0xd1, 0x32, 0xfa, 0x25, 0xe1, 0x0d, 0x75, 0xfc, 0x11, 0xcf, 0x21, 0xdd, + 0x45, 0x16, 0xe4, 0x56, 0x58, 0x49, 0x33, 0xca, 0xaf, 0xe3, 0x17, 0x7b, 0x7a, 0x8f, 0xb1, 0xec, + 0x1c, 0x4d, 0xa2, 0xc2, 0xce, 0x8b, 0x19, 0x4b, 0xc0, 0xc4, 0x36, 0x6a, 0x7c, 0x5b, 0x89, 0x14, + 0x98, 0xcb, 0xa9, 0xca, 0x66, 0xf2, 0xaa, 0xf9, 0x12, 0x40, 0x0e, 0x6a, 0x78, 0x4d, 0x1f, 0x54, + 0x3c, 0x03, 0x7a, 0x91, 0xf5, 0xb7, 0x3d, 0xe2, 0xfc, 0x65, 0xb7, 0xaa, 0xa9, 0x39, 0x68, 0xa7, + 0xdb, 0x29, 0xc1, 0x40, 0x0b, 0x4e, 0xfb, 0xce, 0x74, 0xa5, 0x46, 0xb9, 0x02, 0x03, 0x01, 0x00, + 0x01, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb4, 0xc8, 0x07, 0x60, 0x01, 0xd9, 0xb6, 0xbb, 0xbd, 0x8e, + 0xdf, 0x97, 0xcd, 0xde, 0x51, 0xb0, 0x7e, 0xfa, 0xf0, 0x3d, 0x61, 0x94, 0xb4, 0x68, 0xe8, 0x7d, + 0xd0, 0x2e, 0xc6, 0xb5, 0xf2, 0xed, 0xbc, 0xeb, 0xfb, 0x3d, 0x24, 0x43, 0x47, 0xc4, 0x5a, 0x34, + 0x64, 0x56, 0x1a, 0x57, 0x0e, 0x83, 0x87, 0x04, 0x59, 0x86, 0xa7, 0x84, 0x0b, 0x9a, 0xbc, 0x3f, + 0xdd, 0x30, 0x40, 0x7f, 0x7c, 0x91, 0x76, 0xf1, 0xcc, 0xa7, 0xf0, 0xba, 0x3a, 0x96, 0x0a, 0x6e, + 0xcc, 0xe0, 0x84, 0x15, 0x91, 0xd6, 0x08, 0x71, 0xbd, 0xc5, 0x42, 0xad, 0xf2, 0xd2, 0x4e, 0x92, + 0xd3, 0x6a, 0x4e, 0x15, 0xcc, 0xd3, 0xc1, 0x58, 0xe4, 0x27, 0x33, 0x2d, 0xb8, 0x37, 0x52, 0x7e, + 0x16, 0xb9, 0xab, 0xb7, 0xd9, 0xc1, 0xeb, 0xc8, 0x79, 0xb9, 0xd3, 0xe6, 0x44, 0x13, 0x51, 0x2d, + 0xc6, 0x02, 0xe5, 0xe0, 0x3c, 0xa3, 0x15, 0x9b, 0x49, 0xae, 0x85, 0xbe, 0x8c, 0x84, 0xf9, 0x87, + 0x5d, 0x91, 0x9e, 0xf4, 0xf9, 0xf2, 0x8d, 0x81, 0x77, 0x7c, 0xfc, 0x60, 0x09, 0x48, 0x43, 0x2e, + 0xbb, 0xaf, 0xc9, 0xd6, 0x90, 0x2d, 0x40, 0x80, 0x59, 0xbd, 0x3b, 0x04, 0xda, 0x50, 0x2a, 0x53, + 0xf5, 0xc0, 0x97, 0x54, 0x04, 0x14, 0xb1, 0x8e, 0xd1, 0x6b, 0x53, 0x9e, 0xa4, 0xaa, 0x5e, 0x6e, + 0x1c, 0x11, 0x6b, 0x0a, 0xc4, 0xec, 0x5b, 0x77, 0xa8, 0x00, 0x83, 0x77, 0xdb, 0xf4, 0xfb, 0x00, + 0xf4, 0x06, 0x57, 0x25, 0x8e, 0x1c, 0x87, 0xb4, 0xbe, 0xb8, 0x04, 0x35, 0x93, 0x67, 0xaa, 0x36, + 0xa5, 0x62, 0xe4, 0xf6, 0xcb, 0xc8, 0xa6, 0x58, 0x77, 0x96, 0xc4, 0x6c, 0x0b, 0xc8, 0x41, 0xe2, + 0x36, 0x01, 0x94, 0xa5, 0xe9, 0x46, 0x17, 0xd3, 0x0b, 0x18, 0x7e, 0x06, 0x88, 0x9b, 0x7e, 0xdd, + 0x92, 0x20, 0xc6, 0xe3, 0x7e, 0xb1, 0x02, 0x81, 0x81, 0x00, 0xf5, 0xa6, 0xda, 0x32, 0xb9, 0x37, + 0x61, 0xe9, 0x7c, 0x99, 0xf7, 0x4a, 0x37, 0xee, 0x52, 0x30, 0x4f, 0xbf, 0x57, 0x6f, 0xfe, 0x20, + 0xdc, 0xa3, 0xfe, 0x51, 0xbf, 0x72, 0x13, 0x8a, 0xb1, 0xd7, 0x99, 0x7d, 0x67, 0xa8, 0xd4, 0xb0, + 0x35, 0x40, 0x7c, 0xc8, 0xdc, 0x03, 0x6b, 0x90, 0xb5, 0x65, 0x04, 0x7f, 0x97, 0x8b, 0xa8, 0x69, + 0x20, 0x04, 0xcb, 0x48, 0x39, 0xb7, 0x57, 0xe0, 0xd9, 0xbb, 0x15, 0xe1, 0x59, 0x16, 0xf3, 0xe1, + 0xab, 0x91, 0xea, 0x8a, 0x88, 0xad, 0x8d, 0xa3, 0x24, 0x4a, 0x35, 0xa5, 0xd2, 0x32, 0x19, 0x66, + 0xa8, 0xbb, 0x32, 0x9d, 0xf4, 0x94, 0x99, 0xc1, 0x2e, 0x2b, 0xf8, 0x98, 0x6a, 0x6e, 0x72, 0x77, + 0xd0, 0xc9, 0xfc, 0x5f, 0xd7, 0x69, 0xd1, 0x08, 0x12, 0xbf, 0x81, 0xc1, 0xa1, 0x1b, 0x3b, 0x41, + 0xb0, 0x24, 0x11, 0x0a, 0x65, 0xab, 0x81, 0x39, 0xb3, 0xd5, 0x02, 0x81, 0x81, 0x00, 0xea, 0x41, + 0xb5, 0xed, 0xac, 0xa0, 0x43, 0xd7, 0xde, 0x1e, 0x6b, 0x95, 0xbe, 0x88, 0x02, 0xaf, 0x2f, 0xbb, + 0x37, 0xf7, 0x2f, 0xf6, 0x4f, 0xa0, 0xaa, 0x43, 0x03, 0x7d, 0x33, 0xdd, 0x1e, 0x7a, 0xba, 0xa0, + 0x10, 0x77, 0x1f, 0x4a, 0xc9, 0x88, 0x58, 0x9d, 0x81, 0x3a, 0xe8, 0xac, 0x86, 0x2f, 0x80, 0x6c, + 0xc7, 0xa0, 0xe5, 0xed, 0x8d, 0x90, 0xa9, 0xa7, 0x36, 0x23, 0xd7, 0xb5, 0x89, 0xfc, 0xad, 0x4d, + 0xae, 0x0e, 0xec, 0xdc, 0xe7, 0x7e, 0x69, 0xfe, 0x62, 0x4b, 0x81, 0xfe, 0x52, 0x81, 0x77, 0x6a, + 0x35, 0xab, 0x52, 0x6f, 0x56, 0x41, 0x6c, 0x57, 0x3d, 0x75, 0x92, 0x14, 0x42, 0xa2, 0xc9, 0x50, + 0x52, 0x57, 0x9f, 0x26, 0x3c, 0xcd, 0x61, 0xa9, 0xda, 0x9b, 0x2c, 0xda, 0xc1, 0xd0, 0x26, 0x07, + 0x90, 0x15, 0x8c, 0x81, 0xe2, 0xde, 0xc0, 0x98, 0x58, 0x9d, 0x96, 0x0f, 0xcd, 0x55, 0x02, 0x81, + 0x81, 0x00, 0x87, 0xfb, 0xf8, 0x77, 0xf1, 0xcd, 0xf5, 0xb6, 0xa1, 0xd2, 0x3d, 0x71, 0x69, 0x6a, + 0xd5, 0x36, 0x87, 0x3e, 0xdd, 0xb1, 0x52, 0x55, 0x70, 0xae, 0x9b, 0x9f, 0x37, 0x42, 0x78, 0x0c, + 0xe4, 0x0b, 0xfc, 0x9c, 0xce, 0x20, 0x48, 0xb4, 0xce, 0x95, 0xc7, 0x3e, 0x0d, 0x85, 0x1b, 0x2b, + 0x7d, 0x2e, 0xd1, 0x81, 0xac, 0x2b, 0x94, 0x6b, 0xb5, 0x5c, 0xd2, 0x07, 0x46, 0x63, 0xf7, 0x12, + 0xb2, 0x94, 0xfd, 0x34, 0xc4, 0xf3, 0x8e, 0xc8, 0x13, 0x08, 0xf0, 0x74, 0x05, 0xdb, 0x45, 0x37, + 0xd5, 0x63, 0xfb, 0x34, 0xb3, 0x1a, 0x26, 0xb3, 0x8c, 0x9e, 0x2c, 0x14, 0x02, 0x8b, 0xac, 0x5d, + 0xa3, 0x28, 0x96, 0x32, 0x11, 0x60, 0xd8, 0x9e, 0xf9, 0x06, 0x87, 0x5d, 0xaa, 0xca, 0x99, 0xfb, + 0x45, 0x1d, 0x9c, 0x3f, 0xca, 0xe6, 0x5f, 0x34, 0x2a, 0xc4, 0x9c, 0x66, 0x4c, 0x07, 0xd7, 0xbe, + 0x50, 0x8d, 0x02, 0x81, 0x80, 0x51, 0xdb, 0x96, 0x6c, 0x30, 0x37, 0x6c, 0x9d, 0xa1, 0x43, 0x76, + 0x0a, 0xc4, 0xa2, 0x98, 0x75, 0x89, 0x33, 0x5d, 0xd2, 0x25, 0xd3, 0x67, 0x6d, 0xd8, 0x31, 0x44, + 0xa5, 0xda, 0x9a, 0xb9, 0x0c, 0xdf, 0xec, 0x10, 0xf4, 0xdf, 0x5d, 0x6d, 0xe1, 0x14, 0x3e, 0x2d, + 0xab, 0x5d, 0x24, 0xf4, 0x5a, 0xe3, 0x00, 0xa0, 0x1d, 0x8c, 0x5b, 0x1f, 0x6d, 0xde, 0xaa, 0xcc, + 0x93, 0x67, 0xcc, 0x4b, 0x24, 0x9d, 0x96, 0x98, 0x6d, 0x24, 0xbd, 0xe8, 0xb2, 0xd6, 0xed, 0x0a, + 0x82, 0x22, 0x31, 0xb1, 0xb9, 0x05, 0xf6, 0x7a, 0x3c, 0x9c, 0xb8, 0xc5, 0x26, 0x65, 0x6a, 0x72, + 0xd2, 0x83, 0xb2, 0x4a, 0xba, 0xc1, 0xa8, 0x2c, 0xad, 0xeb, 0xb2, 0x1b, 0xeb, 0x14, 0xe6, 0x9a, + 0xba, 0x40, 0xc9, 0x4c, 0x92, 0xa4, 0xc7, 0x5d, 0xc4, 0xf9, 0xed, 0x65, 0x4e, 0xbb, 0x74, 0x40, + 0xfb, 0x08, 0x36, 0x0b, 0x65, 0x02, 0x81, 0x81, 0x00, 0xeb, 0x60, 0x01, 0x21, 0x22, 0xa1, 0xde, + 0x89, 0x62, 0xfa, 0x68, 0x03, 0x09, 0xf1, 0xa6, 0x14, 0xf0, 0xbe, 0xf7, 0x71, 0x3a, 0x01, 0x85, + 0x1f, 0x2c, 0x86, 0xde, 0x4a, 0xfb, 0x35, 0x16, 0xc4, 0x84, 0x22, 0x83, 0x49, 0xeb, 0x0d, 0xf7, + 0x33, 0x47, 0x8f, 0x96, 0x37, 0x32, 0xd3, 0xd2, 0xec, 0xea, 0x0f, 0xd0, 0xde, 0x0d, 0x27, 0x9e, + 0xc1, 0xf1, 0xe0, 0x39, 0xa6, 0x3e, 0x6c, 0xd4, 0x39, 0xdf, 0xde, 0xbd, 0x4c, 0xb8, 0xe7, 0xb7, + 0x4e, 0x2a, 0x32, 0x92, 0x83, 0xd3, 0x12, 0xb9, 0xa1, 0x91, 0x52, 0x46, 0x24, 0x58, 0x05, 0x35, + 0x22, 0x5f, 0x10, 0x3c, 0x13, 0x5b, 0xbe, 0x47, 0x5e, 0xbf, 0x85, 0xd6, 0xac, 0xfc, 0xbb, 0xd9, + 0x91, 0xf9, 0x50, 0x8f, 0xfc, 0xc2, 0x2c, 0x81, 0x5c, 0xa5, 0xc3, 0xc2, 0x15, 0xbe, 0xf4, 0x72, + 0xfd, 0x4d, 0xf0, 0x10, 0x6f, 0xe5, 0xbf, 0x8c, 0xb1 }; #define CERT_DER_LENGTH 968 UA_Byte CERT_DER_DATA[968] = { - 0x30, 0x82, 0x03, 0xc4, 0x30, 0x82, 0x02, 0xac, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, - 0xa7, 0x17, 0x44, 0x2f, 0x8e, 0x6b, 0x74, 0xba, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, - 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x39, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, - 0x04, 0x06, 0x13, 0x02, 0x44, 0x45, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, - 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x36, 0x32, 0x35, 0x34, 0x31, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, - 0x55, 0x04, 0x03, 0x0c, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x36, 0x32, 0x35, 0x34, 0x31, 0x2e, 0x6f, - 0x72, 0x67, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x33, 0x32, 0x38, 0x30, 0x38, 0x33, 0x33, - 0x35, 0x37, 0x5a, 0x17, 0x0d, 0x32, 0x38, 0x30, 0x33, 0x32, 0x35, 0x30, 0x38, 0x33, 0x33, 0x35, - 0x37, 0x5a, 0x30, 0x45, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x44, - 0x45, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x09, 0x6f, 0x70, 0x65, 0x6e, - 0x36, 0x32, 0x35, 0x34, 0x31, 0x31, 0x22, 0x30, 0x20, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x19, - 0x6f, 0x70, 0x65, 0x6e, 0x36, 0x32, 0x35, 0x34, 0x31, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x40, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, - 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, - 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xe0, 0xc9, 0x91, 0x62, 0xcd, 0x91, - 0x68, 0x75, 0x2c, 0x32, 0x7a, 0xdd, 0xf1, 0xd6, 0x64, 0x77, 0x8b, 0x72, 0x9e, 0x14, 0x2a, 0x62, - 0x08, 0xd1, 0x89, 0x7d, 0xe2, 0x17, 0xdc, 0xb3, 0xda, 0xbc, 0x3a, 0x9f, 0x84, 0x03, 0xd3, 0x2e, - 0x68, 0xbe, 0xc1, 0x57, 0xcb, 0x2a, 0xe2, 0xd6, 0xcf, 0xc4, 0x7f, 0xbd, 0x53, 0x3f, 0xeb, 0x39, - 0x98, 0x69, 0xb0, 0x40, 0x14, 0xbf, 0xf5, 0x5a, 0x23, 0x23, 0xf4, 0x4c, 0xf8, 0xf1, 0x03, 0x56, - 0x6d, 0x7d, 0x1b, 0x93, 0xd7, 0x0f, 0xc1, 0x8c, 0x70, 0xe0, 0x2c, 0x55, 0x7e, 0xa1, 0xfc, 0x05, - 0xe9, 0xd7, 0xea, 0xb1, 0x5c, 0x0f, 0x9b, 0xac, 0x6a, 0x2e, 0xb4, 0xc5, 0xbf, 0x41, 0x8f, 0xda, - 0xfc, 0x85, 0xc6, 0xaa, 0x25, 0xe4, 0xb9, 0x9a, 0xc6, 0xd8, 0x9a, 0x31, 0x8a, 0x17, 0x8b, 0x8c, - 0x4e, 0x20, 0xd9, 0x71, 0xfc, 0x66, 0x3a, 0xfd, 0x49, 0x95, 0x54, 0xa8, 0xaf, 0x42, 0x5e, 0xba, - 0x26, 0xe6, 0xd3, 0xa0, 0xd2, 0x02, 0x3b, 0x51, 0x8b, 0x39, 0xd3, 0x97, 0xd2, 0xe4, 0xd1, 0x01, - 0x65, 0xab, 0x8e, 0xa2, 0x80, 0x5b, 0x5e, 0xbb, 0x11, 0x7f, 0x50, 0x1b, 0x2b, 0x0d, 0x20, 0x40, - 0xb5, 0xbf, 0xd1, 0x32, 0xfa, 0x25, 0xe1, 0x0d, 0x75, 0xfc, 0x11, 0xcf, 0x21, 0xdd, 0x45, 0x16, - 0xe4, 0x56, 0x58, 0x49, 0x33, 0xca, 0xaf, 0xe3, 0x17, 0x7b, 0x7a, 0x8f, 0xb1, 0xec, 0x1c, 0x4d, - 0xa2, 0xc2, 0xce, 0x8b, 0x19, 0x4b, 0xc0, 0xc4, 0x36, 0x6a, 0x7c, 0x5b, 0x89, 0x14, 0x98, 0xcb, - 0xa9, 0xca, 0x66, 0xf2, 0xaa, 0xf9, 0x12, 0x40, 0x0e, 0x6a, 0x78, 0x4d, 0x1f, 0x54, 0x3c, 0x03, - 0x7a, 0x91, 0xf5, 0xb7, 0x3d, 0xe2, 0xfc, 0x65, 0xb7, 0xaa, 0xa9, 0x39, 0x68, 0xa7, 0xdb, 0x29, - 0xc1, 0x40, 0x0b, 0x4e, 0xfb, 0xce, 0x74, 0xa5, 0x46, 0xb9, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, - 0x81, 0xc2, 0x30, 0x81, 0xbf, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, - 0x60, 0x6e, 0x44, 0x94, 0xa8, 0xa2, 0x4e, 0x7a, 0x3e, 0xe2, 0x4b, 0x84, 0x5e, 0xec, 0x01, 0xc9, - 0xa3, 0xf9, 0x69, 0xaf, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, - 0x14, 0x53, 0x77, 0xe0, 0xa2, 0xf2, 0x49, 0x38, 0xcf, 0x71, 0x58, 0x0a, 0x67, 0xa6, 0xc0, 0x17, - 0xd7, 0xb5, 0xdc, 0x52, 0x4b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x04, 0x02, 0x30, 0x00, - 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x05, 0xe0, 0x30, 0x1d, 0x06, - 0x03, 0x55, 0x1d, 0x25, 0x04, 0x16, 0x30, 0x14, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, - 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x02, 0x30, 0x46, 0x06, 0x03, - 0x55, 0x1d, 0x11, 0x04, 0x3f, 0x30, 0x3d, 0x82, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, - 0x73, 0x74, 0x82, 0x06, 0x64, 0x65, 0x62, 0x69, 0x61, 0x6e, 0x87, 0x04, 0x7f, 0x00, 0x00, 0x01, - 0x87, 0x04, 0x00, 0x00, 0x00, 0x00, 0x86, 0x1c, 0x75, 0x72, 0x6e, 0x3a, 0x75, 0x6e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x3a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, - 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0xa4, 0xc1, 0x4f, 0x0e, 0xfe, 0xce, 0x2d, 0x91, - 0x8a, 0x51, 0x25, 0xd2, 0x6c, 0x07, 0x86, 0x95, 0xba, 0xc5, 0xe0, 0xad, 0x9b, 0x09, 0x3e, 0x7f, - 0x36, 0xc4, 0xa8, 0x10, 0x5b, 0x33, 0x77, 0xe5, 0xb5, 0x3b, 0xd8, 0x98, 0x7c, 0x42, 0x05, 0xcb, - 0xb7, 0x91, 0x07, 0x3f, 0x47, 0xff, 0x13, 0x15, 0x45, 0xff, 0x05, 0x03, 0x3d, 0xed, 0x63, 0x96, - 0x3a, 0x5c, 0xf8, 0x59, 0xd0, 0xbc, 0x68, 0x8c, 0xfb, 0xf8, 0x29, 0x07, 0x76, 0x63, 0xa7, 0x39, - 0xc1, 0x82, 0xc1, 0x10, 0x8b, 0x17, 0xf2, 0x1d, 0x14, 0xdd, 0x88, 0xe7, 0xdc, 0x2f, 0xa7, 0x9d, - 0xa3, 0xaa, 0xfd, 0x1a, 0x70, 0xce, 0x57, 0xb5, 0x9f, 0xc3, 0x7b, 0xd0, 0xc0, 0x6f, 0x73, 0x81, - 0x74, 0x41, 0x93, 0x0d, 0x0d, 0x1a, 0x95, 0xf6, 0xe4, 0x1c, 0x04, 0x2b, 0x37, 0x4f, 0xf9, 0x99, - 0x82, 0x57, 0xf0, 0x4f, 0x14, 0xcb, 0x0f, 0x3d, 0x1a, 0x52, 0x69, 0x18, 0x3f, 0xbe, 0x1c, 0x1c, - 0x1b, 0xca, 0xbd, 0xe7, 0xe0, 0x81, 0x44, 0x6d, 0x4a, 0x08, 0x8a, 0xe2, 0x7e, 0x59, 0x9f, 0x89, - 0x44, 0x7e, 0x4d, 0xaf, 0x5a, 0x8e, 0xe8, 0xd2, 0x2e, 0x98, 0x72, 0x86, 0xef, 0x7b, 0xcf, 0x88, - 0xd0, 0xe2, 0xd5, 0xd9, 0xd5, 0x19, 0xa2, 0x8c, 0xf4, 0x40, 0x98, 0x86, 0x32, 0x9f, 0x3e, 0x25, - 0x05, 0xd0, 0xdc, 0xf8, 0x1a, 0x0f, 0xdf, 0xc0, 0x54, 0x46, 0x20, 0xbd, 0xd4, 0xf6, 0xf5, 0xdd, - 0x10, 0x2e, 0xa7, 0x1a, 0xf4, 0xbb, 0xed, 0x5d, 0xf3, 0x1c, 0x96, 0x44, 0x81, 0x69, 0xd4, 0x0b, - 0xbe, 0x59, 0x07, 0x1b, 0x7f, 0x93, 0xc3, 0x4e, 0x7b, 0x32, 0x51, 0xd0, 0x13, 0x47, 0x57, 0x52, - 0xf0, 0x5c, 0x54, 0x36, 0x22, 0xb6, 0xf5, 0x67, 0xbb, 0xd3, 0xa6, 0x43, 0xf0, 0xca, 0x98, 0x91, - 0xda, 0x31, 0x3e, 0xd2, 0x8c, 0xfe, 0xd7, 0x51 + 0x30, 0x82, 0x03, 0xc4, 0x30, 0x82, 0x02, 0xac, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, + 0xa7, 0x17, 0x44, 0x2f, 0x8e, 0x6b, 0x74, 0xba, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, + 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x39, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, + 0x04, 0x06, 0x13, 0x02, 0x44, 0x45, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, + 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x36, 0x32, 0x35, 0x34, 0x31, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, + 0x55, 0x04, 0x03, 0x0c, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x36, 0x32, 0x35, 0x34, 0x31, 0x2e, 0x6f, + 0x72, 0x67, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x33, 0x32, 0x38, 0x30, 0x38, 0x33, 0x33, + 0x35, 0x37, 0x5a, 0x17, 0x0d, 0x32, 0x38, 0x30, 0x33, 0x32, 0x35, 0x30, 0x38, 0x33, 0x33, 0x35, + 0x37, 0x5a, 0x30, 0x45, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x44, + 0x45, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x09, 0x6f, 0x70, 0x65, 0x6e, + 0x36, 0x32, 0x35, 0x34, 0x31, 0x31, 0x22, 0x30, 0x20, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x19, + 0x6f, 0x70, 0x65, 0x6e, 0x36, 0x32, 0x35, 0x34, 0x31, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x40, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, + 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, + 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xe0, 0xc9, 0x91, 0x62, 0xcd, 0x91, + 0x68, 0x75, 0x2c, 0x32, 0x7a, 0xdd, 0xf1, 0xd6, 0x64, 0x77, 0x8b, 0x72, 0x9e, 0x14, 0x2a, 0x62, + 0x08, 0xd1, 0x89, 0x7d, 0xe2, 0x17, 0xdc, 0xb3, 0xda, 0xbc, 0x3a, 0x9f, 0x84, 0x03, 0xd3, 0x2e, + 0x68, 0xbe, 0xc1, 0x57, 0xcb, 0x2a, 0xe2, 0xd6, 0xcf, 0xc4, 0x7f, 0xbd, 0x53, 0x3f, 0xeb, 0x39, + 0x98, 0x69, 0xb0, 0x40, 0x14, 0xbf, 0xf5, 0x5a, 0x23, 0x23, 0xf4, 0x4c, 0xf8, 0xf1, 0x03, 0x56, + 0x6d, 0x7d, 0x1b, 0x93, 0xd7, 0x0f, 0xc1, 0x8c, 0x70, 0xe0, 0x2c, 0x55, 0x7e, 0xa1, 0xfc, 0x05, + 0xe9, 0xd7, 0xea, 0xb1, 0x5c, 0x0f, 0x9b, 0xac, 0x6a, 0x2e, 0xb4, 0xc5, 0xbf, 0x41, 0x8f, 0xda, + 0xfc, 0x85, 0xc6, 0xaa, 0x25, 0xe4, 0xb9, 0x9a, 0xc6, 0xd8, 0x9a, 0x31, 0x8a, 0x17, 0x8b, 0x8c, + 0x4e, 0x20, 0xd9, 0x71, 0xfc, 0x66, 0x3a, 0xfd, 0x49, 0x95, 0x54, 0xa8, 0xaf, 0x42, 0x5e, 0xba, + 0x26, 0xe6, 0xd3, 0xa0, 0xd2, 0x02, 0x3b, 0x51, 0x8b, 0x39, 0xd3, 0x97, 0xd2, 0xe4, 0xd1, 0x01, + 0x65, 0xab, 0x8e, 0xa2, 0x80, 0x5b, 0x5e, 0xbb, 0x11, 0x7f, 0x50, 0x1b, 0x2b, 0x0d, 0x20, 0x40, + 0xb5, 0xbf, 0xd1, 0x32, 0xfa, 0x25, 0xe1, 0x0d, 0x75, 0xfc, 0x11, 0xcf, 0x21, 0xdd, 0x45, 0x16, + 0xe4, 0x56, 0x58, 0x49, 0x33, 0xca, 0xaf, 0xe3, 0x17, 0x7b, 0x7a, 0x8f, 0xb1, 0xec, 0x1c, 0x4d, + 0xa2, 0xc2, 0xce, 0x8b, 0x19, 0x4b, 0xc0, 0xc4, 0x36, 0x6a, 0x7c, 0x5b, 0x89, 0x14, 0x98, 0xcb, + 0xa9, 0xca, 0x66, 0xf2, 0xaa, 0xf9, 0x12, 0x40, 0x0e, 0x6a, 0x78, 0x4d, 0x1f, 0x54, 0x3c, 0x03, + 0x7a, 0x91, 0xf5, 0xb7, 0x3d, 0xe2, 0xfc, 0x65, 0xb7, 0xaa, 0xa9, 0x39, 0x68, 0xa7, 0xdb, 0x29, + 0xc1, 0x40, 0x0b, 0x4e, 0xfb, 0xce, 0x74, 0xa5, 0x46, 0xb9, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, + 0x81, 0xc2, 0x30, 0x81, 0xbf, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, + 0x60, 0x6e, 0x44, 0x94, 0xa8, 0xa2, 0x4e, 0x7a, 0x3e, 0xe2, 0x4b, 0x84, 0x5e, 0xec, 0x01, 0xc9, + 0xa3, 0xf9, 0x69, 0xaf, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, + 0x14, 0x53, 0x77, 0xe0, 0xa2, 0xf2, 0x49, 0x38, 0xcf, 0x71, 0x58, 0x0a, 0x67, 0xa6, 0xc0, 0x17, + 0xd7, 0xb5, 0xdc, 0x52, 0x4b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x04, 0x02, 0x30, 0x00, + 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x05, 0xe0, 0x30, 0x1d, 0x06, + 0x03, 0x55, 0x1d, 0x25, 0x04, 0x16, 0x30, 0x14, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, + 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x02, 0x30, 0x46, 0x06, 0x03, + 0x55, 0x1d, 0x11, 0x04, 0x3f, 0x30, 0x3d, 0x82, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, + 0x73, 0x74, 0x82, 0x06, 0x64, 0x65, 0x62, 0x69, 0x61, 0x6e, 0x87, 0x04, 0x7f, 0x00, 0x00, 0x01, + 0x87, 0x04, 0x00, 0x00, 0x00, 0x00, 0x86, 0x1c, 0x75, 0x72, 0x6e, 0x3a, 0x75, 0x6e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x64, 0x3a, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, + 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0xa4, 0xc1, 0x4f, 0x0e, 0xfe, 0xce, 0x2d, 0x91, + 0x8a, 0x51, 0x25, 0xd2, 0x6c, 0x07, 0x86, 0x95, 0xba, 0xc5, 0xe0, 0xad, 0x9b, 0x09, 0x3e, 0x7f, + 0x36, 0xc4, 0xa8, 0x10, 0x5b, 0x33, 0x77, 0xe5, 0xb5, 0x3b, 0xd8, 0x98, 0x7c, 0x42, 0x05, 0xcb, + 0xb7, 0x91, 0x07, 0x3f, 0x47, 0xff, 0x13, 0x15, 0x45, 0xff, 0x05, 0x03, 0x3d, 0xed, 0x63, 0x96, + 0x3a, 0x5c, 0xf8, 0x59, 0xd0, 0xbc, 0x68, 0x8c, 0xfb, 0xf8, 0x29, 0x07, 0x76, 0x63, 0xa7, 0x39, + 0xc1, 0x82, 0xc1, 0x10, 0x8b, 0x17, 0xf2, 0x1d, 0x14, 0xdd, 0x88, 0xe7, 0xdc, 0x2f, 0xa7, 0x9d, + 0xa3, 0xaa, 0xfd, 0x1a, 0x70, 0xce, 0x57, 0xb5, 0x9f, 0xc3, 0x7b, 0xd0, 0xc0, 0x6f, 0x73, 0x81, + 0x74, 0x41, 0x93, 0x0d, 0x0d, 0x1a, 0x95, 0xf6, 0xe4, 0x1c, 0x04, 0x2b, 0x37, 0x4f, 0xf9, 0x99, + 0x82, 0x57, 0xf0, 0x4f, 0x14, 0xcb, 0x0f, 0x3d, 0x1a, 0x52, 0x69, 0x18, 0x3f, 0xbe, 0x1c, 0x1c, + 0x1b, 0xca, 0xbd, 0xe7, 0xe0, 0x81, 0x44, 0x6d, 0x4a, 0x08, 0x8a, 0xe2, 0x7e, 0x59, 0x9f, 0x89, + 0x44, 0x7e, 0x4d, 0xaf, 0x5a, 0x8e, 0xe8, 0xd2, 0x2e, 0x98, 0x72, 0x86, 0xef, 0x7b, 0xcf, 0x88, + 0xd0, 0xe2, 0xd5, 0xd9, 0xd5, 0x19, 0xa2, 0x8c, 0xf4, 0x40, 0x98, 0x86, 0x32, 0x9f, 0x3e, 0x25, + 0x05, 0xd0, 0xdc, 0xf8, 0x1a, 0x0f, 0xdf, 0xc0, 0x54, 0x46, 0x20, 0xbd, 0xd4, 0xf6, 0xf5, 0xdd, + 0x10, 0x2e, 0xa7, 0x1a, 0xf4, 0xbb, 0xed, 0x5d, 0xf3, 0x1c, 0x96, 0x44, 0x81, 0x69, 0xd4, 0x0b, + 0xbe, 0x59, 0x07, 0x1b, 0x7f, 0x93, 0xc3, 0x4e, 0x7b, 0x32, 0x51, 0xd0, 0x13, 0x47, 0x57, 0x52, + 0xf0, 0x5c, 0x54, 0x36, 0x22, 0xb6, 0xf5, 0x67, 0xbb, 0xd3, 0xa6, 0x43, 0xf0, 0xca, 0x98, 0x91, + 0xda, 0x31, 0x3e, 0xd2, 0x8c, 0xfe, 0xd7, 0x51 }; #define KEY_PEM_LENGTH 1679 diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/fuzz/corpus_generator.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/fuzz/corpus_generator.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/fuzz/corpus_generator.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/fuzz/corpus_generator.c 2022-06-24 19:01:27.000000000 +0000 @@ -408,7 +408,7 @@ ASSERT_GOOD(setPublishingModeResponse.responseHeader.serviceResult); UA_SetPublishingModeRequest_clear(&setPublishingModeRequest); UA_SetPublishingModeResponse_clear(&setPublishingModeResponse); - + // createMonitoredItemsRequest UA_UInt32 monId; @@ -461,7 +461,7 @@ ASSERT_GOOD(modifyMonitoredItemsResponse.responseHeader.serviceResult); UA_ModifyMonitoredItemsRequest_clear(&modifyMonitoredItemsRequest); UA_ModifyMonitoredItemsResponse_clear(&modifyMonitoredItemsResponse); - + // setMonitoringMode UA_SetMonitoringModeRequest setMonitoringModeRequest; UA_SetMonitoringModeRequest_init(&setMonitoringModeRequest); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/fuzz/ua_debug_dump_pkgs_file.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/fuzz/ua_debug_dump_pkgs_file.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/fuzz/ua_debug_dump_pkgs_file.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/fuzz/ua_debug_dump_pkgs_file.c 2022-06-24 19:01:27.000000000 +0000 @@ -134,7 +134,7 @@ struct UA_dump_filename dump_filename; dump_filename.messageType = NULL; dump_filename.serviceName[0] = 0; - + UA_Connection c = createDummyConnection(RECEIVE_BUFFER_SIZE, NULL); UA_SecureChannel dummy; UA_SecureChannel_init(&dummy, &connection->channel->config); @@ -155,7 +155,7 @@ dummy.securityPolicy = NULL; UA_SecureChannel_deleteBuffered(&dummy); c.close(&c); - + char fileName[250]; snprintf(fileName, sizeof(fileName), "%s/%05u_%s%s", UA_CORPUS_OUTPUT_DIR, ++UA_dump_chunkCount, dump_filename.messageType ? dump_filename.messageType : "", dump_filename.serviceName); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/multithreading/check_mt_addVariableTypeNode.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/multithreading/check_mt_addVariableTypeNode.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/multithreading/check_mt_addVariableTypeNode.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/multithreading/check_mt_addVariableTypeNode.c 2022-06-24 19:01:27.000000000 +0000 @@ -110,7 +110,7 @@ static void initTest(void) { initThreadContext(NUMBER_OF_WORKERS, NUMBER_OF_CLIENTS, checkServer); - + for (size_t i = 0; i < tc.numberOfWorkers; i++) { setThreadContext(&tc.workerContext[i], i, ITERATIONS_PER_WORKER, server_addVariableType); } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/nodeset-compiler/check_nodeset_compiler_testnodeset.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/nodeset-compiler/check_nodeset_compiler_testnodeset.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/nodeset-compiler/check_nodeset_compiler_testnodeset.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/nodeset-compiler/check_nodeset_compiler_testnodeset.c 2022-06-24 19:01:27.000000000 +0000 @@ -190,8 +190,8 @@ ck_assert(out.type == &UA_TYPES[UA_TYPES_GUID]); ck_assert(out.arrayLength == 3); UA_Guid *ArrayData = (UA_Guid *)out.data; - UA_Guid ArrayGuidVal[3] = {UA_GUID("7822a391-1111-4a59-b08d-b70bc63fecec"), - UA_GUID("7822a391-2222-4a59-b08d-b70bc63fecec"), + UA_Guid ArrayGuidVal[3] = {UA_GUID("7822a391-1111-4a59-b08d-b70bc63fecec"), + UA_GUID("7822a391-2222-4a59-b08d-b70bc63fecec"), UA_GUID("7822a391-3333-4a59-b08d-b70bc63fecec")}; ck_assert(UA_Guid_equal(&ArrayData[0], &ArrayGuidVal[0])); ck_assert(UA_Guid_equal(&ArrayData[1], &ArrayGuidVal[1])); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_config_freeze.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_config_freeze.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_config_freeze.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_config_freeze.c 2022-06-24 19:01:27.000000000 +0000 @@ -71,7 +71,7 @@ UA_WriterGroup *writerGroup = UA_WriterGroup_findWGbyId(server, writerGroup1); ck_assert(writerGroup->state == UA_PUBSUBSTATE_DISABLED); - UA_DataSetMetaDataType dataSetMetaDataType; + UA_DataSetMetaDataType dataSetMetaDataType; UA_DataSetMetaDataType_init(&dataSetMetaDataType); ck_assert(UA_Server_getPublishedDataSetMetaData(server, publishedDataSet1, &dataSetMetaDataType) == UA_STATUSCODE_GOOD); UA_DataSetMetaDataType_clear(&dataSetMetaDataType); @@ -79,7 +79,7 @@ UA_PublishedDataSetConfig publishedDataSetConfig; memset(&publishedDataSetConfig, 0, sizeof(UA_PublishedDataSetConfig)); publishedDataSetConfig.publishedDataSetType = UA_PUBSUB_DATASET_PUBLISHEDITEMS_TEMPLATE; - UA_DataSetMetaDataType metaDataType; + UA_DataSetMetaDataType metaDataType; UA_DataSetMetaDataType_init(&metaDataType); publishedDataSetConfig.config.itemsTemplate.metaData = metaDataType; publishedDataSetConfig.config.itemsTemplate.variablesToAddSize = 1; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_encoding.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_encoding.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_encoding.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_encoding.c 2022-06-24 19:01:27.000000000 +0000 @@ -44,7 +44,7 @@ memset(bufPos, 0, msgSize); const UA_Byte *bufEnd = &(buffer.data[buffer.length]); rv = UA_NetworkMessage_encodeBinary(&m, &bufPos, bufEnd, NULL); - + ck_assert_int_eq(rv, UA_STATUSCODE_GOOD); UA_NetworkMessage m2; @@ -1023,7 +1023,7 @@ m.promotedFieldsEnabled = true; m.promotedFieldsSize = 1; m.promotedFields = (UA_Variant*)UA_Array_new(m.promotedFieldsSize, &UA_TYPES[UA_TYPES_VARIANT]); - + UA_DataSetMessage dmkf; memset(&dmkf, 0, sizeof(UA_DataSetMessage)); dmkf.header.dataSetMessageValid = true; @@ -1364,13 +1364,13 @@ TCase *tc_ende2 = tcase_create("encode_decode2DS"); tcase_add_test(tc_ende2, UA_PubSub_EnDecode_ShallWorkOn2DSVariant); - - Suite *s = suite_create("PubSub NetworkMessage"); + + Suite *s = suite_create("PubSub NetworkMessage"); suite_add_tcase(s, tc_encode); suite_add_tcase(s, tc_decode); suite_add_tcase(s, tc_ende1); suite_add_tcase(s, tc_ende2); - + SRunner *sr = srunner_create(s); srunner_set_fork_status(sr, CK_NOFORK); srunner_run_all(sr,CK_NORMAL); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_get_state.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_get_state.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_get_state.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_get_state.c 2022-06-24 19:01:27.000000000 +0000 @@ -37,7 +37,7 @@ /***************************************************************************************************/ static void AddConnection( - char *pName, + char *pName, UA_UInt32 PublisherId, UA_NodeId *opConnectionId) { @@ -63,7 +63,7 @@ /***************************************************************************************************/ static void AddWriterGroup( UA_NodeId *pConnectionId, - char *pName, + char *pName, UA_UInt32 WriterGroupId, UA_Duration PublishingInterval, UA_NodeId *opWriterGroupId) { @@ -94,10 +94,10 @@ /***************************************************************************************************/ static void AddPublishedDataSet( UA_NodeId *pWriterGroupId, - char *pPublishedDataSetName, + char *pPublishedDataSetName, char *pDataSetWriterName, UA_UInt32 DataSetWriterId, - UA_NodeId *opPublishedDataSetId, + UA_NodeId *opPublishedDataSetId, UA_NodeId *opPublishedVarId, UA_NodeId *opDataSetWriterId) { @@ -152,7 +152,7 @@ /***************************************************************************************************/ static void AddReaderGroup( UA_NodeId *pConnectionId, - char *pName, + char *pName, UA_NodeId *opReaderGroupId) { assert(pConnectionId != 0); @@ -169,7 +169,7 @@ /***************************************************************************************************/ static void AddDataSetReader( UA_NodeId *pReaderGroupId, - char *pName, + char *pName, UA_UInt32 PublisherId, UA_UInt32 WriterGroupId, UA_UInt32 DataSetWriterId, @@ -221,7 +221,7 @@ UA_FieldTargetVariable *pTargetVariables = (UA_FieldTargetVariable *) UA_calloc(readerConfig.dataSetMetaData.fieldsSize, sizeof(UA_FieldTargetVariable)); assert(pTargetVariables != 0); - + UA_FieldTargetDataType_init(&pTargetVariables[0].targetVariable); pTargetVariables[0].targetVariable.attributeId = UA_ATTRIBUTEID_VALUE; @@ -229,7 +229,7 @@ ck_assert(UA_Server_DataSetReader_createTargetVariables(server, *opDataSetReaderId, readerConfig.dataSetMetaData.fieldsSize, pTargetVariables) == UA_STATUSCODE_GOOD); - + UA_FieldTargetDataType_clear(&pTargetVariables[0].targetVariable); UA_free(pTargetVariables); pTargetVariables = 0; @@ -264,7 +264,7 @@ UA_NodeId PDSId_Conn1_WG1_PDS1; UA_NodeId_init(&PDSId_Conn1_WG1_PDS1); UA_UInt32 DSWNo_Conn1_WG1_DS1 = 1; - AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1_DS1, &PDSId_Conn1_WG1_PDS1, + AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1_DS1, &PDSId_Conn1_WG1_PDS1, &VarId_Conn1_WG1_DS1, &DsWId_Conn1_WG1_DS1); /* setup Connection 1: reader */ @@ -277,7 +277,7 @@ UA_NodeId VarId_Conn1_RG1_DSR1; UA_NodeId_init(&VarId_Conn1_RG1_DSR1); UA_Duration MessageReceiveTimeout_Conn1_RG1_DSR1 = 350.0; - AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1_DS1, + AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1_DS1, MessageReceiveTimeout_Conn1_RG1_DSR1, &VarId_Conn1_RG1_DSR1, &DSRId_Conn1_RG1_DSR1); @@ -362,7 +362,7 @@ UA_NodeId PDSId_Conn1_WG1_PDS1; UA_NodeId_init(&PDSId_Conn1_WG1_PDS1); UA_UInt32 DSWNo_Conn1_WG1_DS1 = 1; - AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1_DS1, &PDSId_Conn1_WG1_PDS1, + AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1_DS1, &PDSId_Conn1_WG1_PDS1, &VarId_Conn1_WG1_DS1, &DsWId_Conn1_WG1_DS1); ck_assert_int_eq(UA_STATUSCODE_GOOD, UA_Server_WriterGroup_getState(server, WGId_Conn1_WG1, &state)); @@ -383,7 +383,7 @@ UA_NodeId VarId_Conn1_RG1_DSR1; UA_NodeId_init(&VarId_Conn1_RG1_DSR1); UA_Duration MessageReceiveTimeout_Conn1_RG1_DSR1 = 350.0; - AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1_DS1, + AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1_DS1, MessageReceiveTimeout_Conn1_RG1_DSR1, &VarId_Conn1_RG1_DSR1, &DSRId_Conn1_RG1_DSR1); ck_assert_int_eq(UA_STATUSCODE_GOOD, UA_Server_ReaderGroup_getState(server, RGId_Conn1_RG1, &state)); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_informationmodel_methods.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_informationmodel_methods.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_informationmodel_methods.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_informationmodel_methods.c 2022-06-24 19:01:27.000000000 +0000 @@ -1043,7 +1043,7 @@ targetVars.targetVariablesSize = 4; targetVars.targetVariables = (UA_FieldTargetDataType *) UA_calloc(targetVars.targetVariablesSize, sizeof(UA_FieldTargetDataType)); - UA_ExtensionObject extensionObjectTargetVars; + UA_ExtensionObject extensionObjectTargetVars; for(size_t i = 0; i < targetVars.targetVariablesSize; i++) { /* For creating Targetvariables */ UA_FieldTargetDataType_init(&targetVars.targetVariables[i]); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_subscribe.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_subscribe.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_subscribe.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_subscribe.c 2022-06-24 19:01:27.000000000 +0000 @@ -1435,7 +1435,7 @@ UA_NodeId dataSetWriter; UA_NodeId readerIdentifier; UA_NodeId writerGroup; - + /* Published DataSet */ memset(&pdsConfig, 0, sizeof(UA_PublishedDataSetConfig)); pdsConfig.publishedDataSetType = UA_PUBSUB_DATASET_PUBLISHEDITEMS; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_subscribe_msgrcvtimeout.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_subscribe_msgrcvtimeout.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_subscribe_msgrcvtimeout.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/pubsub/check_pubsub_subscribe_msgrcvtimeout.c 2022-06-24 19:01:27.000000000 +0000 @@ -79,7 +79,7 @@ /***************************************************************************************************/ static void AddConnection( - char *pName, + char *pName, UA_UInt32 PublisherId, UA_NodeId *opConnectionId) { @@ -105,7 +105,7 @@ /***************************************************************************************************/ static void AddWriterGroup( UA_NodeId *pConnectionId, - char *pName, + char *pName, UA_UInt32 WriterGroupId, UA_Duration PublishingInterval, UA_NodeId *opWriterGroupId) { @@ -139,10 +139,10 @@ /***************************************************************************************************/ static void AddPublishedDataSet( UA_NodeId *pWriterGroupId, - char *pPublishedDataSetName, + char *pPublishedDataSetName, char *pDataSetWriterName, UA_UInt32 DataSetWriterId, - UA_NodeId *opPublishedDataSetId, + UA_NodeId *opPublishedDataSetId, UA_NodeId *opPublishedVarId, UA_NodeId *opDataSetWriterId) { @@ -212,7 +212,7 @@ /***************************************************************************************************/ static void AddReaderGroup( UA_NodeId *pConnectionId, - char *pName, + char *pName, UA_NodeId *opReaderGroupId) { ck_assert(pConnectionId != 0); @@ -232,7 +232,7 @@ /***************************************************************************************************/ static void AddDataSetReader( UA_NodeId *pReaderGroupId, - char *pName, + char *pName, UA_UInt32 PublisherId, UA_UInt32 WriterGroupId, UA_UInt32 DataSetWriterId, @@ -309,7 +309,7 @@ UA_FieldTargetVariable *pTargetVariables = (UA_FieldTargetVariable *) UA_calloc(readerConfig.dataSetMetaData.fieldsSize, sizeof(UA_FieldTargetVariable)); ck_assert(pTargetVariables != 0); - + UA_FieldTargetDataType_init(&pTargetVariables[0].targetVariable); pTargetVariables[0].targetVariable.attributeId = UA_ATTRIBUTEID_VALUE; @@ -317,7 +317,7 @@ ck_assert(UA_Server_DataSetReader_createTargetVariables(server, *opDataSetReaderId, readerConfig.dataSetMetaData.fieldsSize, pTargetVariables) == UA_STATUSCODE_GOOD); - + UA_FieldTargetDataType_clear(&pTargetVariables[0].targetVariable); UA_free(pTargetVariables); pTargetVariables = 0; @@ -334,7 +334,7 @@ static void ServerDoProcess( const char *pMessage, const UA_UInt32 Sleep_ms, /* use at least publishing interval */ - const UA_UInt32 NoOfRunIterateCycles) + const UA_UInt32 NoOfRunIterateCycles) { ck_assert(pMessage != 0); @@ -355,7 +355,7 @@ UA_NodeId SubscribedVarId, UA_Int32 TestValue, UA_UInt32 Sleep_ms, /* use at least publishing interval */ - UA_UInt32 NoOfRunIterateCycles) + UA_UInt32 NoOfRunIterateCycles) { UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "ValidatePublishSubscribe(): set variable to publish"); @@ -373,7 +373,7 @@ retVal = UA_Server_readValue(server, SubscribedVarId, &SubscribedNodeData); ck_assert_int_eq(retVal, UA_STATUSCODE_GOOD); ck_assert(SubscribedNodeData.data != 0); - UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "ValidatePublishSubscribe(): check value: %i vs. %i", + UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "ValidatePublishSubscribe(): check value: %i vs. %i", TestValue, *(UA_Int32 *)SubscribedNodeData.data); ck_assert_int_eq(TestValue, *(UA_Int32 *)SubscribedNodeData.data); UA_Variant_clear(&SubscribedNodeData); @@ -385,7 +385,7 @@ static void ValidatePublishSubscribe_fast_path( UA_Int32 TestValue, UA_UInt32 Sleep_ms, /* use at least publishing interval */ - UA_UInt32 NoOfRunIterateCycles) + UA_UInt32 NoOfRunIterateCycles) { UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "ValidatePublishSubscribe_fast_path(): set variable to publish"); @@ -467,7 +467,7 @@ UA_NodeId PDSId_Conn1_WG1_PDS1; UA_NodeId_init(&PDSId_Conn1_WG1_PDS1); - AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", 1, &PDSId_Conn1_WG1_PDS1, + AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", 1, &PDSId_Conn1_WG1_PDS1, &VarId_Conn1_WG1, &DsWId_Conn1_WG1_DS1); /* setup Connection 2: corresponding readergroup and reader for Connection 1 */ @@ -563,7 +563,7 @@ ExpectedCallbackCnt = 2; pExpectedComponentCallbackIds[0] = DsWId_Conn1_WG1_DS1; pExpectedComponentCallbackIds[1] = WGId_Conn1_WG1; - + ExpectedCallbackStatus = UA_STATUSCODE_BADRESOURCEUNAVAILABLE; ExpectedCallbackStateChange = UA_PUBSUBSTATE_DISABLED; UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "disable writergroup"); @@ -720,11 +720,11 @@ PubSubStateChangeCallback_different_timeouts(UA_Server *hostServer, UA_NodeId *pubsubComponentId, UA_PubSubState state, UA_StatusCode status) { ck_assert(hostServer == server); - + /* Disable some checks during shutdown */ if(!runtime) return; - + UA_String strId; UA_String_init(&strId); UA_NodeId_print(pubsubComponentId, &strId); @@ -753,14 +753,14 @@ /* TODO: test does not work if we add the same reader on the same connection ... maybe only 1 reader per connection receives the data ... ?? - or the second reader overwrites the first? + or the second reader overwrites the first? issue: https://github.com/open62541/open62541/issues/3901 */ START_TEST(Test_different_timeouts) { UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "\n\nSTART: Test_different_timeouts"); - /* + /* Connection 1: WG1 : DSW1 (pub interval = 20) --> Connection 1: RG1 : DSR1 (msgrcvtimeout = 100) --> Connection 1: RG1 : DSR2 (msgrcvtimeout = 200) --> Connection 2: RG1 : DSR1 (msgrcvtimeout = 300) @@ -791,7 +791,7 @@ UA_NodeId PDSId_Conn1_WG1_PDS1; UA_NodeId_init(&PDSId_Conn1_WG1_PDS1); UA_UInt32 DSWNo_Conn1_WG1 = 1; - AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1, &PDSId_Conn1_WG1_PDS1, + AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1, &PDSId_Conn1_WG1_PDS1, &VarId_Conn1_WG1_DS1, &DsWId_Conn1_WG1_DS1); UA_NodeId RGId_Conn1_RG1; @@ -803,7 +803,7 @@ UA_NodeId VarId_Conn1_RG1_DSR1; UA_NodeId_init(&VarId_Conn1_RG1_DSR1); UA_Duration MessageReceiveTimeout_Conn1_RG1_DSR1 = 100.0; - AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1, + AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1, MessageReceiveTimeout_Conn1_RG1_DSR1, &VarId_Conn1_RG1_DSR1, &DSRId_Conn1_RG1_DSR1); UA_String strId; @@ -818,7 +818,7 @@ // UA_NodeId VarId_Conn1_RG1_DSR2; // UA_NodeId_init(&VarId_Conn1_RG1_DSR2); // UA_Duration MessageReceiveTimeout_Conn1_RG1_DSR2 = 200.0; - // AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR2", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1, + // AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR2", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1, // MessageReceiveTimeout_Conn1_RG1_DSR2, &VarId_Conn1_RG1_DSR2, &DSRId_Conn1_RG1_DSR2); // UA_String_init(&strId); // UA_NodeId_print(&DSRId_Conn1_RG1_DSR2, &strId); @@ -840,7 +840,7 @@ UA_NodeId VarId_Conn2_RG1_DSR1; UA_NodeId_init(&VarId_Conn2_RG1_DSR1); UA_Duration MessageReceiveTimeout_Conn2_RG1_DSR1 = 300.0; - AddDataSetReader(&RGId_Conn2_RG1, "Conn2_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1, MessageReceiveTimeout_Conn2_RG1_DSR1, + AddDataSetReader(&RGId_Conn2_RG1, "Conn2_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1, MessageReceiveTimeout_Conn2_RG1_DSR1, &VarId_Conn2_RG1_DSR1, &DSRId_Conn2_RG1_DSR1); UA_String_init(&strId); UA_NodeId_print(&DSRId_Conn2_RG1_DSR1, &strId); @@ -855,9 +855,9 @@ UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "check normal pubsub operation"); /* set all writer- and readergroups to operational (this triggers the publish and subscribe callback) - enable the readers first, because otherwise we receive something immediately and start the + enable the readers first, because otherwise we receive something immediately and start the message receive timeout. - If we do some other checks before triggering the server_run_iterate function, this could + If we do some other checks before triggering the server_run_iterate function, this could cause a timeout. */ ExpectedCallbackStateChange = UA_PUBSUBSTATE_OPERATIONAL; ExpectedCallbackStatus = UA_STATUSCODE_GOOD; @@ -889,7 +889,7 @@ // ck_assert(UA_Server_DataSetReader_getState(server, DSRId_Conn1_RG1_DSR2, &state) == UA_STATUSCODE_GOOD); // ck_assert(state == UA_PUBSUBSTATE_OPERATIONAL); ck_assert(UA_Server_DataSetReader_getState(server, DSRId_Conn2_RG1_DSR1, &state) == UA_STATUSCODE_GOOD); - ck_assert(state == UA_PUBSUBSTATE_OPERATIONAL); + ck_assert(state == UA_PUBSUBSTATE_OPERATIONAL); /* check that publish/subscribe works (for all readers) -> set some test values */ ValidatePublishSubscribe(VarId_Conn1_WG1_DS1, VarId_Conn1_RG1_DSR1, 10, (UA_UInt32) (PublishingInterval_Conn1_WG1), 20); @@ -907,7 +907,7 @@ pExpectedComponentCallbackIds[1] = WGId_Conn1_WG1; ExpectedCallbackStatus = UA_STATUSCODE_BADRESOURCEUNAVAILABLE; ExpectedCallbackStateChange = UA_PUBSUBSTATE_DISABLED; - + ck_assert(UA_STATUSCODE_GOOD == UA_Server_setWriterGroupDisabled(server, WGId_Conn1_WG1)); /* check that callback has been called for writer group and dataset */ @@ -947,7 +947,7 @@ UA_NodeId *pubsubComponentId, UA_PubSubState state, UA_StatusCode status) { - + ck_assert(hostServer == server); UA_String strId; @@ -957,10 +957,10 @@ "Component Id = %.*s, state = %i, status = 0x%08x %s", (UA_Int32) strId.length, strId.data, state, status, UA_StatusCode_name(status)); UA_String_clear(&strId); - if ((UA_NodeId_equal(pubsubComponentId, &ExpectedCallbackComponentNodeId) == UA_TRUE) && + if ((UA_NodeId_equal(pubsubComponentId, &ExpectedCallbackComponentNodeId) == UA_TRUE) && (state == ExpectedCallbackStateChange) && (status == ExpectedCallbackStatus)) { - + CallbackCnt++; } } @@ -970,7 +970,7 @@ UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "\n\nSTART: Test_wrong_timeout"); - /* + /* Connection 1: WG1 : DSW1 --> Connection 1: RG1 : DSR1 */ @@ -999,7 +999,7 @@ UA_NodeId PDSId_Conn1_WG1_PDS1; UA_NodeId_init(&PDSId_Conn1_WG1_PDS1); UA_UInt32 DSWNo_Conn1_WG1 = 1; - AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1, &PDSId_Conn1_WG1_PDS1, + AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1, &PDSId_Conn1_WG1_PDS1, &VarId_Conn1_WG1_DS1, &DsWId_Conn1_WG1_DS1); UA_NodeId RGId_Conn1_RG1; @@ -1011,7 +1011,7 @@ UA_NodeId VarId_Conn1_RG1_DSR1; UA_NodeId_init(&VarId_Conn1_RG1_DSR1); UA_Duration MessageReceiveTimeout_Conn1_RG1_DSR1 = 200.0; - AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1, + AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1, MessageReceiveTimeout_Conn1_RG1_DSR1, &VarId_Conn1_RG1_DSR1, &DSRId_Conn1_RG1_DSR1); /* expected order of pubsub component timeouts: */ @@ -1066,10 +1066,10 @@ PubSubStateChangeCallback_many_components(UA_Server *hostServer, UA_NodeId *pubsubComponentId, UA_PubSubState state, UA_StatusCode status) { ck_assert(hostServer == server); - + if(!runtime) return; - + UA_String strId; UA_String_init(&strId); UA_NodeId_print(pubsubComponentId, &strId); @@ -1091,7 +1091,7 @@ if (ExpectedCallbackStateChange == UA_PUBSUBSTATE_ERROR) { /* On error we want to verify the order of DataSetReader timeouts */ ck_assert(UA_NodeId_equal(pubsubComponentId, &pExpectedComponentCallbackIds[CallbackCnt]) == UA_TRUE); - } /* when the state is set back to operational we cannot verify the order of StateChanges, because we + } /* when the state is set back to operational we cannot verify the order of StateChanges, because we cannot know which DataSetReader will be operational first */ CallbackCnt++; } @@ -1134,7 +1134,7 @@ UA_NodeId PDSId_Conn1_WG1_PDS1; UA_NodeId_init(&PDSId_Conn1_WG1_PDS1); UA_UInt32 DSWNo_Conn1_WG1_DS1 = 1; - AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1_DS1, &PDSId_Conn1_WG1_PDS1, + AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", DSWNo_Conn1_WG1_DS1, &PDSId_Conn1_WG1_PDS1, &VarId_Conn1_WG1_DS1, &DsWId_Conn1_WG1_DS1); UA_NodeId DsWId_Conn1_WG1_DS2; @@ -1144,7 +1144,7 @@ UA_NodeId PDSId_Conn1_WG1_PDS2; UA_NodeId_init(&PDSId_Conn1_WG1_PDS2); UA_UInt32 DSWNo_Conn1_WG1_DS2 = 2; - AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS2", "Conn1_WG1_DS2", DSWNo_Conn1_WG1_DS2, &PDSId_Conn1_WG1_PDS2, + AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS2", "Conn1_WG1_DS2", DSWNo_Conn1_WG1_DS2, &PDSId_Conn1_WG1_PDS2, &VarId_Conn1_WG1_DS2, &DsWId_Conn1_WG1_DS2); @@ -1167,7 +1167,7 @@ UA_NodeId PDSId_Conn2_WG1_PDS1; UA_NodeId_init(&PDSId_Conn2_WG1_PDS1); UA_UInt32 DSWNo_Conn2_WG1_DS1 = 1; - AddPublishedDataSet(&WGId_Conn2_WG1, "Conn2_WG1_PDS1", "Conn2_WG1_DS1", DSWNo_Conn2_WG1_DS1, &PDSId_Conn2_WG1_PDS1, + AddPublishedDataSet(&WGId_Conn2_WG1, "Conn2_WG1_PDS1", "Conn2_WG1_DS1", DSWNo_Conn2_WG1_DS1, &PDSId_Conn2_WG1_PDS1, &VarId_Conn2_WG1_DS1, &DsWId_Conn2_WG1_DS1); @@ -1184,7 +1184,7 @@ UA_NodeId PDSId_Conn2_WG2_PDS1; UA_NodeId_init(&PDSId_Conn2_WG2_PDS1); UA_UInt32 DSWNo_Conn2_WG2_DS1 = 1; - AddPublishedDataSet(&WGId_Conn2_WG2, "Conn2_WG2_PDS1", "Conn2_WG2_DS1", DSWNo_Conn2_WG2_DS1, &PDSId_Conn2_WG2_PDS1, + AddPublishedDataSet(&WGId_Conn2_WG2, "Conn2_WG2_PDS1", "Conn2_WG2_DS1", DSWNo_Conn2_WG2_DS1, &PDSId_Conn2_WG2_PDS1, &VarId_Conn2_WG2_DS1, &DsWId_Conn2_WG2_DS1); /* setup Connection 1: readers */ @@ -1197,7 +1197,7 @@ UA_NodeId VarId_Conn1_RG1_DSR1; UA_NodeId_init(&VarId_Conn1_RG1_DSR1); UA_Duration MessageReceiveTimeout_Conn1_RG1_DSR1 = 25.0; - AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn2, WGNo_Conn2_WG1, DSWNo_Conn2_WG1_DS1, + AddDataSetReader(&RGId_Conn1_RG1, "Conn1_RG1_DSR1", PublisherNo_Conn2, WGNo_Conn2_WG1, DSWNo_Conn2_WG1_DS1, MessageReceiveTimeout_Conn1_RG1_DSR1, &VarId_Conn1_RG1_DSR1, &DSRId_Conn1_RG1_DSR1); UA_String strId; UA_String_init(&strId); @@ -1215,7 +1215,7 @@ UA_NodeId VarId_Conn2_RG1_DSR1; UA_NodeId_init(&VarId_Conn2_RG1_DSR1); UA_Duration MessageReceiveTimeout_Conn2_RG1_DSR1 = 40.0; - AddDataSetReader(&RGId_Conn2_RG1, "Conn2_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1_DS1, + AddDataSetReader(&RGId_Conn2_RG1, "Conn2_RG1_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1_DS1, MessageReceiveTimeout_Conn2_RG1_DSR1, &VarId_Conn2_RG1_DSR1, &DSRId_Conn2_RG1_DSR1); UA_String_init(&strId); UA_NodeId_print(&DSRId_Conn2_RG1_DSR1, &strId); @@ -1231,7 +1231,7 @@ UA_NodeId VarId_Conn2_RG2_DSR1; UA_NodeId_init(&VarId_Conn2_RG2_DSR1); UA_Duration MessageReceiveTimeout_Conn2_RG2_DSR1 = 45.0; - AddDataSetReader(&RGId_Conn2_RG2, "Conn2_RG2_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1_DS2, + AddDataSetReader(&RGId_Conn2_RG2, "Conn2_RG2_DSR1", PublisherNo_Conn1, WGNo_Conn1_WG1, DSWNo_Conn1_WG1_DS2, MessageReceiveTimeout_Conn2_RG2_DSR1, &VarId_Conn2_RG2_DSR1, &DSRId_Conn2_RG2_DSR1); UA_String_init(&strId); UA_NodeId_print(&DSRId_Conn2_RG2_DSR1, &strId); @@ -1253,7 +1253,7 @@ UA_NodeId VarId_Conn3_RG1_DSR1; UA_NodeId_init(&VarId_Conn3_RG1_DSR1); UA_Duration MessageReceiveTimeout_Conn3_RG1_DSR1 = 25.0; - AddDataSetReader(&RGId_Conn3_RG1, "Conn3_RG1_DSR1", PublisherNo_Conn2, WGNo_Conn2_WG2, DSWNo_Conn2_WG2_DS1, + AddDataSetReader(&RGId_Conn3_RG1, "Conn3_RG1_DSR1", PublisherNo_Conn2, WGNo_Conn2_WG2, DSWNo_Conn2_WG2_DS1, MessageReceiveTimeout_Conn3_RG1_DSR1, &VarId_Conn3_RG1_DSR1, &DSRId_Conn3_RG1_DSR1); UA_String_init(&strId); UA_NodeId_print(&DSRId_Conn3_RG1_DSR1, &strId); @@ -1302,7 +1302,7 @@ /* check that publish/subscribe works -> set some test values */ - /* use a low enough sleep value to ensure that publishing intervals and message receive timeouts + /* use a low enough sleep value to ensure that publishing intervals and message receive timeouts are handled */ UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "check Conn2_RG1_DSR1"); ValidatePublishSubscribe(VarId_Conn1_WG1_DS1, VarId_Conn2_RG1_DSR1, 10, SleepTime, NoOfRunIterateCycles); @@ -1386,7 +1386,7 @@ pExpectedComponentCallbackIds[0] = DsWId_Conn1_WG1_DS1; pExpectedComponentCallbackIds[1] = DsWId_Conn1_WG1_DS2; pExpectedComponentCallbackIds[2] = WGId_Conn1_WG1; - + ck_assert(UA_Server_setWriterGroupOperational(server, WGId_Conn1_WG1) == UA_STATUSCODE_GOOD); /* check number of state changes */ @@ -1461,7 +1461,7 @@ ExpectedCallbackCnt = 2; pExpectedComponentCallbackIds[0] = DsWId_Conn2_WG1_DS1; pExpectedComponentCallbackIds[1] = WGId_Conn2_WG1; - + ExpectedCallbackStatus = UA_STATUSCODE_GOOD; ExpectedCallbackStateChange = UA_PUBSUBSTATE_OPERATIONAL; ck_assert(UA_Server_setWriterGroupOperational(server, WGId_Conn2_WG1) == UA_STATUSCODE_GOOD); @@ -1637,10 +1637,10 @@ PubSubStateChangeCallback_update_config(UA_Server *hostServer, UA_NodeId *pubsubComponentId, UA_PubSubState state, UA_StatusCode status) { ck_assert(hostServer == server); - + if(!runtime) return; - + UA_String strId; UA_String_init(&strId); UA_NodeId_print(pubsubComponentId, &strId); @@ -1688,7 +1688,7 @@ UA_NodeId PDSId_Conn1_WG1_PDS1; UA_NodeId_init(&PDSId_Conn1_WG1_PDS1); - AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", 1, &PDSId_Conn1_WG1_PDS1, + AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", 1, &PDSId_Conn1_WG1_PDS1, &VarId_Conn1_WG1, &DsWId_Conn1_WG1_DS1); /* setup corresponding readergroup and reader for Connection 1 */ @@ -1729,7 +1729,7 @@ /* check that publish/subscribe works -> set some test values */ ValidatePublishSubscribe(VarId_Conn1_WG1, VarId_Conn1_RG1_DSR1, 10, SleepTime, NoOfRunIterateCycles); ValidatePublishSubscribe(VarId_Conn1_WG1, VarId_Conn1_RG1_DSR1, 33, SleepTime, NoOfRunIterateCycles); - + ck_assert(UA_Server_DataSetReader_getState(server, DSRId_Conn1_RG1_DSR1, &state) == UA_STATUSCODE_GOOD); ck_assert(state == UA_PUBSUBSTATE_OPERATIONAL); @@ -1869,7 +1869,7 @@ UA_NodeId PDSId_Conn1_WG1_PDS1; UA_NodeId_init(&PDSId_Conn1_WG1_PDS1); - AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", 1, &PDSId_Conn1_WG1_PDS1, + AddPublishedDataSet(&WGId_Conn1_WG1, "Conn1_WG1_PDS1", "Conn1_WG1_DS1", 1, &PDSId_Conn1_WG1_PDS1, &VarId_Conn1_WG1, &DsWId_Conn1_WG1_DS1); /* setup Connection 2: corresponding readergroup and reader for Connection 1 */ @@ -1970,7 +1970,7 @@ /* check that PubSubStateChange callback has been called for the specific DataSetReader */ ck_assert_int_eq(1, CallbackCnt); - + /* enable the publisher WriterGroup again */ /* DataSetReader state shall be back to operational after receiving a new message */ ExpectedCallbackStatus = UA_STATUSCODE_GOOD; @@ -1995,7 +1995,7 @@ UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_USERLAND, "disable readergroup. writergroup is still working"); ExpectedCallbackStatus = UA_STATUSCODE_BADRESOURCEUNAVAILABLE; ExpectedCallbackStateChange = UA_PUBSUBSTATE_DISABLED; - + ck_assert(UA_Server_setReaderGroupDisabled(server, RGId_Conn2_RG1) == UA_STATUSCODE_GOOD); /* check number of state changes */ @@ -2039,7 +2039,7 @@ TCase *tc_basic = tcase_create("Message Receive Timeout"); tcase_add_checked_fixture(tc_basic, setup, teardown); - /* test case description: + /* test case description: - check normal pubsub operation (2 connections) - 1 Connection with 1 DataSetWriter, 1 Connection with counterpart DataSetReader - enable/disable writer- and readergroup multiple times @@ -2047,14 +2047,14 @@ */ tcase_add_test(tc_basic, Test_basic); - /* test case description: + /* test case description: - 1 DataSetWriter - multiple DataSetReaders with different timeout settings - check order and no of message receive timeouts for the different DataSetReaders */ tcase_add_test(tc_basic, Test_different_timeouts); - /* test case description: + /* test case description: - 1 Connection, 1 DataSetWriter, 1 DataSetReader - reader with wrong timeout setting (timeout is smaller than publishing interval) */ @@ -2062,7 +2062,7 @@ /* test case description: - configure multiple connections with multiple readers and writers - - disable/enable and check for correct timeouts + - disable/enable and check for correct timeouts */ tcase_add_test(tc_basic, Test_many_components); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_nodestore.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_nodestore.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_nodestore.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_nodestore.c 2022-06-24 19:01:27.000000000 +0000 @@ -280,7 +280,7 @@ tcase_add_test (tc_iterate, iterateOverUA_NodeStoreShallNotVisitEmptyNodes); tcase_add_test (tc_iterate, iterateOverExpandedNamespaceShallNotVisitEmptyNodes); suite_add_tcase (s, tc_iterate); - + TCase* tc_profile = tcase_create ("Profile-ZipTree"); tcase_add_checked_fixture(tc_profile, setupZipTree, teardown); tcase_add_test (tc_profile, profileGetDelete); @@ -306,7 +306,7 @@ tcase_add_test (tc_iterate_hm, iterateOverUA_NodeStoreShallNotVisitEmptyNodes); tcase_add_test (tc_iterate_hm, iterateOverExpandedNamespaceShallNotVisitEmptyNodes); suite_add_tcase (s, tc_iterate_hm); - + TCase* tc_profile_hm = tcase_create ("Profile-HashMap"); tcase_add_checked_fixture(tc_profile_hm, setupHashMap, teardown); tcase_add_test (tc_profile_hm, profileGetDelete); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_server_asyncop.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_server_asyncop.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_server_asyncop.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_server_asyncop.c 2022-06-24 19:01:27.000000000 +0000 @@ -80,7 +80,7 @@ THREAD_CREATE(server_thread, serverloop); } -static void teardown(void) { +static void teardown(void) { running = false; THREAD_JOIN(server_thread); UA_Server_run_shutdown(server); @@ -256,7 +256,7 @@ tcase_add_test(tc_manager, Async_timeout); tcase_add_test(tc_manager, Async_timeout_worker); suite_add_tcase(s, tc_manager); - + return s; } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_server_callbacks.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_server_callbacks.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_server_callbacks.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_server_callbacks.c 2022-06-24 19:01:27.000000000 +0000 @@ -128,7 +128,7 @@ return UA_STATUSCODE_GOOD; } -static UA_StatusCode +static UA_StatusCode readPressureNoAccess( UA_Server *tmpServer, const UA_NodeId *sessionId, @@ -139,7 +139,7 @@ return UA_STATUSCODE_BADUSERACCESSDENIED; } -static UA_StatusCode +static UA_StatusCode readPressure( UA_Server *tmpServer, const UA_NodeId *sessionId, @@ -179,13 +179,13 @@ pressureValueBackend.backend.external.value = &pPressure; pressureValueBackend.backend.external.callback.userWrite = writePressure ; pressureValueBackend.backend.external.callback.notificationRead = readPressure; - + UA_StatusCode retval = UA_Server_addVariableNode(server, pressureNodeId, UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER), UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), UA_QUALIFIEDNAME(1, "Pressure"), UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr, NULL, NULL); ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); - + retval = UA_Server_setVariableNode_valueBackend(server, pressureNodeId, pressureValueBackend); ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); } @@ -202,14 +202,14 @@ pressureValueBackend.backend.external.value = &pPressure; pressureValueBackend.backend.external.callback.userWrite = writePressureNoAccess ; pressureValueBackend.backend.external.callback.notificationRead = readPressureNoAccess; - + UA_StatusCode retval = UA_Server_addVariableNode(server, pressureNodeIdNoAccess, UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER), UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES), UA_QUALIFIEDNAME(1, "Pressure_noAccess"), UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE), attr, NULL, NULL); ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); - + retval = UA_Server_setVariableNode_valueBackend(server, pressureNodeIdNoAccess, pressureValueBackend); ck_assert_int_eq(retval, UA_STATUSCODE_GOOD); } @@ -367,21 +367,21 @@ UA_ClientConfig_setDefault(UA_Client_getConfig(client)); UA_StatusCode retval = UA_Client_connect(client, "opc.tcp://localhost:4840"); ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); - + UA_Variant value; UA_Variant_init(&value); - + UA_UInt32 pressureVal = 1000; UA_Variant_setScalarCopy(&value, &pressureVal, &UA_TYPES[UA_TYPES_UINT32]); - + retval = UA_Client_writeValueAttribute(client, pressureNodeId, &value); ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); - + retval = UA_Client_writeValueAttribute(client, pressureNodeIdNoAccess, &value); ck_assert_uint_eq(retval, UA_STATUSCODE_BADUSERACCESSDENIED); UA_Variant_clear(&value); - + UA_Client_disconnect(client); UA_Client_delete(client); } @@ -392,18 +392,18 @@ UA_ClientConfig_setDefault(UA_Client_getConfig(client)); UA_StatusCode retval = UA_Client_connect(client, "opc.tcp://localhost:4840"); ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); - + UA_Variant value; UA_Variant_init(&value); - + retval = UA_Client_readValueAttribute(client, pressureNodeId, &value); ck_assert_uint_eq(retval, UA_STATUSCODE_GOOD); - + retval = UA_Client_readValueAttribute(client, pressureNodeIdNoAccess, &value); ck_assert_uint_eq(retval, UA_STATUSCODE_BADUSERACCESSDENIED); UA_Variant_clear(&value); - + UA_Client_disconnect(client); UA_Client_delete(client); } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_server_readspeed.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_server_readspeed.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_server_readspeed.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_server_readspeed.c 2022-06-24 19:01:27.000000000 +0000 @@ -33,7 +33,7 @@ START_TEST(readSpeed) { UA_StatusCode retval = UA_STATUSCODE_GOOD; - + /* Add variable nodes to the address space */ UA_VariableAttributes attr = UA_VariableAttributes_default; UA_Int32 myInteger = 42; @@ -70,7 +70,7 @@ UA_ReadResponse res; UA_ReadResponse_init(&res); - + clock_t begin, finish; begin = clock(); @@ -102,7 +102,7 @@ START_TEST(readSpeedWithEncoding) { UA_StatusCode retval = UA_STATUSCODE_GOOD; - + /* Add variable nodes to the address space */ UA_VariableAttributes attr = UA_VariableAttributes_default; UA_Int32 myInteger = 42; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_services_attributes.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_services_attributes.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_services_attributes.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_services_attributes.c 2022-06-24 19:01:27.000000000 +0000 @@ -280,7 +280,7 @@ rvi.attributeId = UA_ATTRIBUTEID_BROWSENAME; UA_DataValue resp = UA_Server_read(server, &rvi, UA_TIMESTAMPSTORETURN_NEITHER); - + UA_QualifiedName* respval = (UA_QualifiedName*) resp.value.data; const UA_QualifiedName myIntegerName = UA_QUALIFIEDNAME(1, "the answer"); ck_assert_uint_eq(0, resp.value.arrayLength); @@ -316,7 +316,7 @@ rvi.attributeId = UA_ATTRIBUTEID_DESCRIPTION; UA_DataValue resp = UA_Server_read(server, &rvi, UA_TIMESTAMPSTORETURN_NEITHER); - + UA_LocalizedText* respval = (UA_LocalizedText*) resp.value.data; UA_VariableNode* compNode = makeCompareSequence(); ck_assert_uint_eq(0, resp.value.arrayLength); @@ -334,7 +334,7 @@ rvi.attributeId = UA_ATTRIBUTEID_WRITEMASK; UA_DataValue resp = UA_Server_read(server, &rvi, UA_TIMESTAMPSTORETURN_NEITHER); - + UA_UInt32* respval = (UA_UInt32*) resp.value.data; ck_assert_uint_eq(0, resp.value.arrayLength); ck_assert(&UA_TYPES[UA_TYPES_UINT32] == resp.value.type); @@ -516,7 +516,7 @@ rvi.attributeId = UA_ATTRIBUTEID_MINIMUMSAMPLINGINTERVAL; UA_DataValue resp = UA_Server_read(server, &rvi, UA_TIMESTAMPSTORETURN_NEITHER); - + UA_Double* respval = (UA_Double*) resp.value.data; UA_VariableNode *compNode = makeCompareSequence(); UA_Double comp = (UA_Double) compNode->minimumSamplingInterval; @@ -607,7 +607,7 @@ rvi.attributeId = UA_ATTRIBUTEID_ARRAYDIMENSIONS; UA_DataValue resp = UA_Server_read(server, &rvi, UA_TIMESTAMPSTORETURN_NEITHER); - + ck_assert_int_eq(UA_STATUSCODE_GOOD, resp.status); UA_DataValue_clear(&resp); } END_TEST diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_services_call.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_services_call.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_services_call.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_services_call.c 2022-06-24 19:01:27.000000000 +0000 @@ -58,10 +58,10 @@ UA_QUALIFIEDNAME(1, "Not executable"), nonExecAttr, &methodCallback, 0, NULL, 0, NULL, NULL, NULL); - + /* Add callback to ServerType's getMonitoredItems method */ - UA_Server_setMethodNodeCallback(server, - UA_NODEID_NUMERIC(0,UA_NS0ID_SERVERTYPE_GETMONITOREDITEMS), + UA_Server_setMethodNodeCallback(server, + UA_NODEID_NUMERIC(0,UA_NS0ID_SERVERTYPE_GETMONITOREDITEMS), &methodCallback); } diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_services_nodemanagement.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_services_nodemanagement.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_services_nodemanagement.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_services_nodemanagement.c 2022-06-24 19:01:27.000000000 +0000 @@ -200,7 +200,7 @@ START_TEST(InstantiateVariableTypeNode) { addVariableTypeNode(); - + /* Prepare the node attributes */ UA_UInt32 arrayDims[1] = {2}; UA_VariableAttributes vAttr = UA_VariableAttributes_default; @@ -232,7 +232,7 @@ START_TEST(InstantiateVariableTypeNodeWrongDims) { addVariableTypeNode(); - + /* Prepare the node attributes */ UA_UInt32 arrayDims[1] = {3}; /* This will fail as the dimensions are too big */ UA_VariableAttributes vAttr = UA_VariableAttributes_default; @@ -256,7 +256,7 @@ START_TEST(InstantiateVariableTypeNodeLessDims) { addVariableTypeNode(); - + /* Prepare the node attributes */ UA_UInt32 arrayDims[1] = {1}; /* This will match as the dimension * constraints are an upper bound */ @@ -291,7 +291,7 @@ UA_ObjectAttributes attr = UA_ObjectAttributes_default; attr.description = UA_LOCALIZEDTEXT("en-US","fakeServerStruct"); attr.displayName = UA_LOCALIZEDTEXT("en-US","fakeServerStruct"); - + UA_NodeId myObjectNodeId = UA_NODEID_STRING(1, "the.fake.Server.Struct"); UA_QualifiedName myObjectName = UA_QUALIFIEDNAME(1, "the.fake.Server.Struct"); UA_NodeId parentNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER); @@ -442,7 +442,7 @@ bd.nodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER); bd.referenceTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT); bd.browseDirection = UA_BROWSEDIRECTION_FORWARD; - + UA_BrowseResult br = UA_Server_browse(server, 0, &bd); ck_assert_int_eq(br.statusCode, UA_STATUSCODE_GOOD); size_t refCount = 0; @@ -693,7 +693,7 @@ oAttr.displayName = UA_LOCALIZEDTEXT(NULL, dispName); UA_QualifiedName browseName = UA_QUALIFIEDNAME(1, dispName); UA_StatusCode st = - UA_Server_addObjectNode(server, UA_NODEID_NULL, + UA_Server_addObjectNode(server, UA_NODEID_NULL, parentNodeId, UA_NODEID_NUMERIC(0, UA_NS0ID_HASCOMPONENT), browseName, UA_NODEID_NUMERIC(0, UA_NS0ID_BASEOBJECTTYPE), oAttr, NULL, &outNodeId); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_services_subscriptions.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_services_subscriptions.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_services_subscriptions.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_services_subscriptions.c 2022-06-24 19:01:27.000000000 +0000 @@ -162,7 +162,7 @@ START_TEST(Server_setPublishingMode) { createSubscription(); - + UA_SetPublishingModeRequest request; UA_SetPublishingModeRequest_init(&request); request.publishingEnabled = UA_TRUE; @@ -186,7 +186,7 @@ START_TEST(Server_republish) { createSubscription(); - + UA_RepublishRequest request; UA_RepublishRequest_init(&request); request.subscriptionId = subscriptionId; @@ -225,7 +225,7 @@ START_TEST(Server_deleteSubscription) { createSubscription(); - + /* Remove the subscription */ UA_DeleteSubscriptionsRequest del_request; UA_DeleteSubscriptionsRequest_init(&del_request); @@ -576,7 +576,7 @@ START_TEST(Server_setMonitoringMode) { createSubscription(); createMonitoredItem(); - + UA_SetMonitoringModeRequest request; UA_SetMonitoringModeRequest_init(&request); request.subscriptionId = subscriptionId; @@ -601,7 +601,7 @@ START_TEST(Server_deleteMonitoredItems) { createSubscription(); createMonitoredItem(); - + UA_DeleteMonitoredItemsRequest request; UA_DeleteMonitoredItemsRequest_init(&request); request.subscriptionId = subscriptionId; diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_subscription_events.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_subscription_events.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tests/server/check_subscription_events.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tests/server/check_subscription_events.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,7 +1,7 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * + * * Copyright 2020-2021 (c) Christian von Arnim, ISW University of Stuttgart (for VDW and umati) * Copyright 2021 (c) Fraunhofer IOSB (Author: Andreas Ebner) */ diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tools/ua2json/ua2json.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tools/ua2json/ua2json.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tools/ua2json/ua2json.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tools/ua2json/ua2json.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer) */ @@ -173,7 +173,7 @@ fprintf(stderr, "Error: The first argument must be \"encode\" or \"decode\"\n"); return -1; } - + for(int argpos = 2; argpos < argc; argpos++) { if(strcmp(argv[argpos], "--help") == 0) { usage(); @@ -291,7 +291,7 @@ } else { result = decode(&buf, &outbuf, type); } - + if(result != UA_STATUSCODE_GOOD) { fprintf(stderr, "Error: Parsing failed with code %s\n", UA_StatusCode_name(result)); diff -Nru open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tools/ua-tool/ua.c open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tools/ua-tool/ua.c --- open62541-20220623T184559~1.3.1~292~ge47a1045~daily~ubuntu21.10.1/tools/ua-tool/ua.c 2022-06-23 19:04:25.000000000 +0000 +++ open62541-20220624T090700~1.3.1~293~g13af9b86~daily~ubuntu21.10.1/tools/ua-tool/ua.c 2022-06-24 19:01:27.000000000 +0000 @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2021 (c) Fraunhofer IOSB (Author: Julius Pfrommer) */