Commit Graph

474 Commits

Author SHA1 Message Date
Alin Moldovean 20957233ae Allow to set HiResClock Enabled/Disabled only once. Fixes #1269 (#1341)
fixes #1269 
- Add a reset method for testing
2021-03-26 21:35:17 +01:00
tobiasdroessler d9498f523c bugfix in RelativePath.ParseName(..): update variable last for loop i… (#1330)
* bugfix in RelativePath.ParseName(..): update variable last for loop increment statement to keep it for further processing
2021-03-24 10:04:35 +02:00
Camille Guérin be1aadeaf5 Fixed FormatException and Fixed missing sourcePicoseconds in DataValue Equals (#1335)
* Fixed FormatException

* Fixed missing sourcePicoseconds in DataValue Equals
2021-03-23 13:35:16 +02:00
Alin Moldovean 0ebe579448 Fixes #1300 - Minor fix in NodeId constructor comment. (#1326)
* Fixes #1300 - Minor fix in NodeId constructor comment.

* Minor fix in NodeId constructor comment.
2021-03-23 13:34:36 +02:00
Jonas Arndt bcfed5e698 Fix: Format Exception (#1307)
fixed the index in a format string
2021-03-08 09:41:50 +02:00
Alin Moldovean c541994ca2 Limit recursion level in XmlDecoder.ReadMatrix() and XmlEncoder.WriteMatrix() (#1295) 2021-02-25 09:25:23 +02:00
Martin Regen 46ada27179 Add certificate password provider interface to support password protected pfx files. (#1291)
* Add a certificate password provider.
2021-02-23 11:31:42 +02:00
Lyubomyr Vyhovskyy 61eede8628 Fix issue with https binding .net core 3.0 #1283 (#1286)
commenting out Kestrel listenOptions.NoDelay b/c:
1. the default value = true
2. it was removed in .net core 3.0 and this can be configured in SocketTransportOptions

fixes #1283
2021-02-15 15:23:29 +01:00
Randy Armstrong e016a9bb29 Fix unit tests errors. 2021-02-05 23:53:30 +09:00
Randy Armstrong c22ecec8f5 Fix XmlEncoder. 2021-02-05 19:14:10 +09:00
Randy Armstrong 1305e94182 Merge model compiler fixes with latest code. 2021-02-05 18:35:53 +09:00
Archie Miller a2e8489d91 Fix Issues 1274 and 1275 (#1277)
* Fix Issues 1274 and 1275
* Update Documentation for Publicly visible UnshelveTimeUpdateRate
* Adds a timer specifically to update UnshelveTime periodically.
* Initializes Unshelve to double maximum value or MaxTimeShelved if it exists, even for OneShotShelve method calls (Mantis 6462).
2021-02-04 18:16:12 +01:00
Bill Berry e138777638 fix comment spelling mistakes - 'refernces' to 'references' (#1273) 2021-02-03 11:14:45 +02:00
dependabot[bot] 9ce1c33b78 Bump System.ServiceModel.Primitives from 4.8.0 to 4.8.1 (#1268)
Bumps [System.ServiceModel.Primitives](https://github.com/dotnet/wcf) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/dotnet/wcf/releases)
- [Commits](https://github.com/dotnet/wcf/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-02 07:36:16 +01:00
Archie Miller fac8ed2fc8 Fix issue setting empty comments Issue #1264 (#1265)
* Fix issue setting empty comments

On Acknowledge and Confirm, if a comment with an empty Locale and empty Text is passed from the client, then the comment should remain untouched.
Also fixed issue when firing an event, clearing the change mask on all children of the alarm will update any monitored item watching the alarm parameters, like Comment, EventId, etc.

fixes #1264
2021-01-29 16:08:41 +01:00
Alin Moldovean b363442ffd Set TypeId for structured types at decode. (#1260) 2021-01-29 10:39:42 +02:00
Martin Regen 4a14df9cd5 Fix build and LGTM warnings (#1251)
- Fix only build and LGTM warnings
- no bug fixes - - oh wait -- found and fixed root cause for flaky builds, forgotten await when add cert to trusted folder
- remove source files from WinForms libraries which are not used in the projects
2021-01-20 20:18:36 +01:00
Martin Regen 32dc6bcacc Private key is not stored to the Windows certificate store when using .NET Standard 2.1 (#1244)
- added test cases to repro fact
- added code to transfer ephemeral private key to persisted state as suggested by @ChristofferGersen pointing to  dotnet/runtime#29144 
- fixes #1238
- note: on .NET Standard 2.1 with this change the private keys stored in the windows certificate store are not exportable
2021-01-19 16:30:24 +01:00
Alin Moldovean 97c22fdd25 Method calls validation for Executable and UserExecutable. Fixes #1190 (#1246) 2021-01-18 10:32:14 +02:00
Сергей 1102853812 Use monotonic timer for HiResClock and fix loss of monitored items when system time is changed (#1124)
Thanks @MyLastAngel for your contribution!

- Solves an issue when MonitoredItems are lost, when system time is changed.
- Use HiResClock.TickCount64  when update nextSamplingTime.
- Update HiResClock class with method of TickCount64 for use as monotonic timer
2021-01-15 07:44:32 +01:00
Alin Moldovean 333aadc6f3 Compliance fixes in ReferenceServer (#1241)
Compliance fixes for certificate validation.
Add config flag in ReferenceServer to specify whether  Certificate dialog should be displayed.
2021-01-14 13:52:51 +02:00
Alin Moldovean 16ff6511f2 PubSub Support for UADP (#1195)
* Add PubSub library and console samples. #1169
2021-01-08 17:48:09 +02:00
Martin Regen bfa117b7a7 Implement an AcceptAll flag in the cert validator callback (#1230)
- The AcceptAll flag can be used to accept all suppressible errors in one call back
- Behaviour unchanged when only Accept is set, callback is invoked for all errors and all must be approved
2021-01-07 10:16:07 +01:00
Martin Regen 4752a808df Validate server domains in Cert validator (#1226)
- Based on new handling of multiple suppressible errors, add also the domain check to the list
- Move domain check in validator and use cert validation callback to handle BadCertificateInvalidHostname.
- Allow to handle all suppressible errors including the domain check by the cert validator callback, approve all errors by new AcceptAll flag. Applications which only set Approve are called for each of the suppressible errors and must approve eah of them.
- Add approval of multiple errors to sample UI
- fix a few warnings
2021-01-07 09:26:14 +01:00
Martin Regen ac8e358c2c Escape special characters in JSON fieldnames (#1224)
- Values were properly escaped, field names not.
- Fix fieldname encoding in various places
- Tests to verify strings are escaped in all codepaths.
- Fixes #1210
2021-01-04 14:49:17 +01:00
Martin Regen 8c216e78f4 Replace CRLF in debug strings with AppendLine and improve cert validator tests (#1220)
- improve cross platform support, replace CRLF by AppendLine 
- replace $format trace messages with {} style
- fix warnings for comments and protected fields, null parameter checks
- replace cert factory calls with new API (obsolete warnings)
- allow to run cert validator tests in parallel using new temp cert validator class
- more test cases for cert validator, e.g wth cert validation callback
- improve cert validator for special cases
2020-12-23 00:17:09 +01:00
ThomasNehring d815cfb972 Improve handling of certificate validation (#1217)
The change ensures that all certificate validation failures (except those related to the hostname of a server) are stacked in the right order into a service result, which -- if not empty -- in the end is raised in a service result exception.
The single point where knowledge about suppressible changes is needed is the place in Validate, where that exception is caught.
2020-12-18 15:29:17 +01:00
dependabot[bot] 52754f4814 Bump System.ServiceModel.Primitives from 4.5.3 to 4.8.0 (#1182)
Bumps [System.ServiceModel.Primitives](https://github.com/dotnet/wcf) from 4.5.3 to 4.8.0.
- [Release notes](https://github.com/dotnet/wcf/releases)
- [Commits](https://github.com/dotnet/wcf/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-16 20:41:04 +01:00
Martin Regen f904139298 Refactor CertificateFactory, remove bouncy castle dependency in Opc.Ua.Core for .NET Core 3.1 (#1209)
- remove use of Bouncy Castle for .NET Core 3
- refactor CreateCertificate class to allow for an easier Create fluent model with respect to future extensions, e.g. ECC
- reimplement X509CRL and a couple of extension relevant for OPC UA based on the new System.Formats.Asn1 library
- use CertificateRequest on .NET Core 3.1
- refactor codebase to allow for a seperate library to handle all the ASN.1 encoding/decoding
- new package Opc.Ua.Security.Certificates with all ASN.1 encode/decode related code
breaking change: many  X509 related util functions were moved to X509Utils class
Note: .NET 4.6.2 and .NET Core 2.1 versions still use BouncyCastle for Cert creation
2020-12-13 18:17:54 +01:00
Alin Moldovean e53d97d9ae Set ParentNodeId of nodes at import from NodeSet2 files. (#1212) 2020-12-10 16:11:54 +02:00
Erich Barnstedt c171b14c7e Fix spelling in cert validation service results. (#1211) 2020-12-09 16:49:21 +01:00
Logan Komanetz 34d0af8dd6 Removes assigning a new instance of CertificateValidator in ApplicationConfiguration (#1161)
* Removes assigning a new instance of CertificateValidator in ApplicationConfiguration.Validate method by assigning it on construction.  
* Refactors the code to use 'using' statements for streams and LINQ expressions.
* Makes the CertificateValidator member readonly
* Removes read-only status of CertificateValidator and adds unit test to ensure it is assignable from outside the class.
2020-11-14 11:15:01 +01:00
Martin Regen 346c4e30c5 Fix codecov upload and Nuget builds (#1175)
- codecov couldn't resolve the source files when deterministic builds are enabled. Run codecoverage with det build option disabled.
- nuget preview build was broken, added ci build for packing libraries.
- add console client to ci build
- fixes #1173, fix dockerfile to use .NET Core 3.1 base image
2020-11-04 09:12:28 +01:00
Alin Moldovean 4be8c87903 Suppress server nonce validation errors in Client Session for encrypted channels (#1165)
* Implement the mitigation against weak nonce for CVE2019-19135.
* Suppress server nonce validation errors for user tokens in Client Session for encrypted channels.
* This change allows client interoperability with some legacy servers that do not comply with the specification for nonce usage of user token encryption. 
* The workaround for servers which can not connect due to a weak nonce is to use an encrypted channel, then the token is protected and the threat is mitigated.
2020-10-23 10:01:12 +02:00
Shailesh Rasane 03eed2d9a5 Added tests for the Sessionlessmessage #1155 (#1159)
fixes #1155
2020-10-21 10:13:25 +02:00
Martin Regen 62eedc19be Reduce core dependencies, move https binding to optional assembly. (#1157)
* implement transport binding factory
* split https transport into seperate nuget package
* new Opc.Ua.Binding.Https assembly
* Https binding is loaded on demand, if available
* reduce core dependencies to kestrel and others
fixes #600
2020-10-21 00:03:37 +02:00
Martin Regen 488bc14caf improve JSON encoder 2020-10-20 10:25:09 +02:00
Martin Regen e1930fb4cd more tests 2020-10-17 12:27:57 +02:00
Alexander Koepke b27751ace8 Merge branch 'master' into koepalex/write-encodeable 2020-10-16 17:14:21 +02:00
Alexander Koepke f3d090aec4 Avoid invalid Json by using JsonEncoder for IEncodeables 2020-10-16 17:01:39 +02:00
Martin Regen d0f5d9e51a Fix confusing async use of Utils.GetHostAddresses (#1148)
- due to the name change of the async version its a breaking change for the 364 release
- fixes #1132
2020-10-14 16:58:18 +02:00
Martin Regen 7f3f0dbbb4 Service update, fix many warnings for Xml comments (#1146)
- no bug fixes, just documentation and formatting
- fix all warnings for xml in core libraries, except
-- protected members
-- suppressed warnings in Opc.Ua.Gds libraries (tbd)
2020-10-14 12:00:01 +02:00
Martin Regen 9b8cf2eaf2 Push nuget as artifacts for release (#1143)
* upload pipelineartifacts for release pipeline and sign the symbol packages
* enable deterministic builds for snupkg source debugging
* allow release builds to be in release/x.y.z
* do not rename assemblies for debug builds, to allow for mixing of release and debug packages. Otherwise build issues may occure when packages are mixed.
2020-10-12 15:48:57 +02:00
dependabot[bot] 7fe666e9bb Bump Portable.BouncyCastle from 1.8.6.7 to 1.8.8 (#1131)
Bumps [Portable.BouncyCastle](https://github.com/novotnyllc/bc-csharp) from 1.8.6.7 to 1.8.8.
- [Release notes](https://github.com/novotnyllc/bc-csharp/releases)
- [Commits](https://github.com/novotnyllc/bc-csharp/compare/pcl-v1.8.6.7...pcl-v1.8.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-09 09:36:43 +02:00
AlinMoldovean 764c481405 Update Copyright year to 2020 2020-10-07 18:04:34 +03:00
AlinMoldovean 7829e34d63 Remove unused NodeSet files 2020-10-07 17:53:19 +03:00
AlinMoldovean 00f718c28f Update NodeSet files and generated code for 1.04.7 Errata. Fixes #1127 2020-10-07 17:52:01 +03:00
Martin Regen 80a422136d Add Versioning and new nuget package structure to preview builds (#1130)
- use nerdbank.gitversioning to determine devops build version
- split nuget packages into new structure, one package per assembly to allow granular use of packages.
- also build .Debug versions
- back compat at least for a while, the old Opc.Ua packages reference also the new packages.
- devops produces preview builds for master
- preview builds are now signed, including nuget packages
- add license files for nuget packages, since licenseUrl is deprecated
2020-10-07 14:50:36 +02:00
Martin Regen 38c37acd8f Add support for netstandard2.1 in core libs and nuget packages (#1110)
- solutions support still VS2017 and VS 2019
- ci now also tests net462 & netcoreapp3.1
- next rev of nuget packages will have netstandard2.1 support
- a few small fixes for netcoreapp3.1
2020-09-04 22:56:20 +02:00
Kevin Jhang c24ef8798c Fix null reference in UaSCUaBinaryClientChannel. (#1105) 2020-09-01 15:32:14 +02:00