Commit Graph
69 Commits
Author SHA1 Message Date
Alin Moldovean 923597eac2 improve encode/decode for array/matrix of Iencodeable (#1398)
Add tests for encode/decode of array/matrix of all IEncodeable
2021-05-12 15:10:11 +03:00
Martin Regen ab05d09d66 Tag PubSub lib as beta in release builds (#1396)
- in release builds tag PubSub lib as beta until MQTT API surface is finalized
- tag as 'beta' to avoid nuget collision with preview builds from master
- Move PubSub samples to seperate Solution
2021-05-11 14:45:03 +02:00
Alin Moldovean 323c8c9010 Minor fixes in PubSub tests (#1393) 2021-05-04 15:52:07 +03:00
Martin Regen 7e736d22fc Improve auto accept in cert validation handler, add tests (#1386)
- if a cert validator is enabled, use it and ignore auto accept flag.
- trace auto accept message, if used
- make all config flags public, otherwise they can only be configured using a SecurityConfiguration. Once a config flag is set using a property, it is protected from modification by a SecurityConfiguration. This way apps can consistently override.
- add tests for the SHA1 and AutoAccept configuration flags
- add a method to reset the validated list of certificates. The list of certs should be revalidated from time to time to catch expired or revoked certificates. Applications can call `ResetValidatedCertificates` to clear the list with a daily timer.
2021-04-30 10:27:02 +02:00
dependabot[bot] aba60b953e Bump System.ServiceProcess.ServiceController from 4.3.0 to 5.0.0 (#1388)
Bumps [System.ServiceProcess.ServiceController](https://github.com/dotnet/runtime) from 4.3.0 to 5.0.0.
2021-04-29 14:47:31 +03:00
Martin Regen 631e729787 Fix warnings, improve complex type exception handler (#1384)
- catch exception in complex type system not only for ServiceResultException
- add fast path for single type loader if type already exists
- fix many warnings, no function change
- fix template for legacy nuget packages to include cert lib
2021-04-28 18:34:43 +02:00
dependabot[bot] e15605c8f8 Bump NUnit from 3.13.1 to 3.13.2 (#1381)
Bumps [NUnit](https://github.com/nunit/nunit) from 3.13.1 to 3.13.2.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/v3.13.2/CHANGES.md)
- [Commits](https://github.com/nunit/nunit/compare/v3.13.1...v3.13.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-28 15:10:40 +02:00
Alin Moldovean 7a4a22201b MQTT support in PubSub library (#1376)
Implementation of MQTT support in PubSub library
2021-04-28 15:31:06 +03:00
Martin Regen e34eb9b512 Fix Perf warnings (#1372)
- use Array.Empty
- improve StringBuilder, Where
- use .Equals instead Compare
- use ConfigureAwait
2021-04-21 09:28:25 +02:00
Martin Regen 77a3da8ecd Prohibit Xml Dtd processing (#1370)
- enable CA3075 as warning (on windows)
- Dtd processing is by default not prohibited, only limited to 10000000 chars.
- ensure to only use safe defaults for all xml processing
2021-04-20 10:45:50 +02:00
Martin Regen c996e7933d Add ifdef to support Net5.0 build with ECC support (#1367)
- for dev only ifdefs,  but not added to target props
2021-04-19 10:42:26 +02:00
dependabot[bot] 59cef07bf3 Bump Microsoft.NET.Test.Sdk from 16.9.1 to 16.9.4 (#1365)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.9.1 to 16.9.4.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.9.1...v16.9.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-16 08:54:05 +02:00
Martin Regen 558c395b71 Codecov update (#1359)
- switch to the codecov collector
- add codecoverage batch command for local execution
2021-04-15 09:24:52 +02:00
dependabot[bot] 7b20fcbdf2 Bump Microsoft.NET.Test.Sdk from 16.9.1 to 16.9.4 (#1349)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.9.1 to 16.9.4.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.9.1...v16.9.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 09:55:04 +02:00
Alin Moldovean cb1abb1ec3 Implement encoders support for Arrays and multi-dimensional Arrays. (#1350)
* Implement encoders support Arrays and multi-dimensional Arrays.
* JsonEncoder/Decoder fix for non reversible encoding of NodeId, ExpandedNodeId and QualifiedName
2021-04-07 14:40:40 +03:00
opcfoundation-org 0f97945858 Modelcompiler updates, errata 1.04.9 nodeset (#1284)
- Use updated Modelcompiler code generator to produce code which has no dependency on System.Servicemodel
- breaking change, .NET stack which used the NET_STANDARD version have to fix dependencies on System.Servicemodel
- new codegenerator also provides stubs for async client API (NET_STANDARD_ASYNC), currently disabled
- latest V1.04.9 Nodeset
2021-03-29 17:19:49 +02:00
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
dependabot[bot] 4f36fca7a9 Bump NunitXml.TestLogger from 3.0.91 to 3.0.97 (#1316)
Bumps [NunitXml.TestLogger](https://github.com/spekt/nunit.testlogger) from 3.0.91 to 3.0.97.
- [Release notes](https://github.com/spekt/nunit.testlogger/releases)
- [Changelog](https://github.com/spekt/nunit.testlogger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spekt/nunit.testlogger/compare/v3.0.91...v3.0.97)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-11 13:45:17 +02:00
dependabot[bot] 426dcba055 Bump Microsoft.NET.Test.Sdk from 16.8.3 to 16.9.1 (#1297)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.8.3 to 16.9.1.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.8.3...v16.9.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-26 09:05:20 +02:00
dependabot[bot] dbb5927881 Bump Moq from 4.16.0 to 4.16.1 (#1296)
Bumps [Moq](https://github.com/moq/moq4) from 4.16.0 to 4.16.1.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/main/CHANGELOG.md)
- [Commits](https://github.com/moq/moq4/compare/v4.16.0...v4.16.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-25 09:26:23 +02:00
dependabot[bot] c382922b3b Bump coverlet.msbuild from 3.0.2 to 3.0.3 (#1293)
Bumps [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) from 3.0.2 to 3.0.3.
2021-02-23 11:38:33 +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
Randy Armstrong e016a9bb29 Fix unit tests errors. 2021-02-05 23:53:30 +09:00
dependabot[bot] 6694edec19 Bump NUnit from 3.13.0 to 3.13.1 (#1267)
Bumps [NUnit](https://github.com/nunit/nunit) from 3.13.0 to 3.13.1.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/master/CHANGES.md)
- [Commits](https://github.com/nunit/nunit/compare/v3.13...v3.13.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-02 07:35:38 +01:00
dependabot[bot] 2392e40234 Bump NunitXml.TestLogger from 2.1.36 to 3.0.91 (#1266)
Bumps [NunitXml.TestLogger](https://github.com/spekt/nunit.testlogger) from 2.1.36 to 3.0.91.
- [Release notes](https://github.com/spekt/nunit.testlogger/releases)
- [Changelog](https://github.com/spekt/nunit.testlogger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spekt/nunit.testlogger/commits/v3.0.91)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-01 15:45:37 +02:00
dependabot[bot] af6a933312 Bump coverlet.msbuild from 3.0.1 to 3.0.2 (#1259)
Bumps [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-28 13:30:42 +01:00
Martin Regen 29fc3f2bfc fix decoding of ecdsa signature (#1257)
- incorrect decoding caused flaky builds, verification error only if keys have trailing zeros
2021-01-27 08:48:29 +01: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
dependabot[bot] c4988f5dc2 Bump coverlet.msbuild from 2.9.0 to 3.0.1 (#1248)
Bumps [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) from 2.9.0 to 3.0.1.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/commits)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-18 22:13:12 +01:00
dependabot[bot] e7e5834ca4 Bump NUnit.Console from 3.11.1 to 3.12.0 (#1250)
Bumps [NUnit.Console](https://github.com/nunit/nunit-console) from 3.11.1 to 3.12.0.
- [Release notes](https://github.com/nunit/nunit-console/releases)
- [Changelog](https://github.com/nunit/nunit-console/blob/master/CHANGES.txt)
- [Commits](https://github.com/nunit/nunit-console/compare/v3.11.1...v3.12)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-18 19:13:45 +01:00
dependabot[bot] 532ef934b9 Bump Moq from 4.10.1 to 4.16.0 (#1249)
Bumps [Moq](https://github.com/moq/moq4) from 4.10.1 to 4.16.0.
2021-01-18 16:46:18 +02:00
dependabot[bot] a7b7aea2f8 Bump NUnit from 3.12.0 to 3.13.0 (#1231)
Bumps [NUnit](https://github.com/nunit/nunit) from 3.12.0 to 3.13.0.
- [Release notes](https://github.com/nunit/nunit/releases)
- [Changelog](https://github.com/nunit/nunit/blob/master/CHANGES.md)
- [Commits](https://github.com/nunit/nunit/compare/v3.12...v3.13)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-15 07:45:11 +01: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 6a95638d15 Disable PubSub tests from build. (#1235)
* Disable PubSub tests from build.
* rename PubSub test project to .disabled
2021-01-12 16:13:36 +01: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 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 2c1532edcb Tests for ECDsa certs (#1225)
* finalizing some work on API surface for ECDsa certs
* yet only nist/brainpool certs are supported specifically for OPC UA ECC errata 
* split tests for ECDsa and RSA certs
* skip brainpool tests on macos, no OS support on macos 10.15
2021-01-04 16:16:42 +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
dependabot[bot]andMartin Regen 521d182d63 Bump Portable.BouncyCastle from 1.8.8 to 1.8.9 (#1222)
* Bump Portable.BouncyCastle from 1.8.8 to 1.8.9

Bumps [Portable.BouncyCastle](https://github.com/novotnyllc/bc-csharp) from 1.8.8 to 1.8.9.
- [Release notes](https://github.com/novotnyllc/bc-csharp/releases)
- [Commits](https://github.com/novotnyllc/bc-csharp/compare/pcl-v1.8.8...pcl-v1.8.9)

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

* Update Opc.Ua.Core.Tests.csproj

remove unnecessary dependency

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Regen <mregen@microsoft.com>
2020-12-23 19:02:03 +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
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
dependabot[bot] 264cb2f08d Bump Microsoft.NET.Test.Sdk from 16.8.0 to 16.8.3 (#1203)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.8.0 to 16.8.3.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.8.0...v16.8.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-04 12:52:33 +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
dependabot[bot] e1e4f607e7 Bump Microsoft.NET.Test.Sdk from 16.7.1 to 16.8.0 (#1179)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.7.1 to 16.8.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.7.1...v16.8.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-14 11:10:56 +01: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
Alexander Koepke 1c2d79d1fb fixed new LGTM issues - part 2 2020-10-20 11:48:12 +02:00