1029 Commits

Author SHA1 Message Date
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
Alin Moldovean a5702acc61 Dispose failed listeners in TcpListener (#1095)
* Fix log with ChannelId =0 in Channel.Shutdown()

* Fix null reference in TcpListener generated by cleanup timer.

* Dispose listening port in TcpListener if create fails.
2020-08-17 17:08:52 +03:00
Martin Regen 838b99806d Reverse connect improvements for aggregation server (#1073)
- This improvement was tested with an aggregation server update on this branch:

Required for testing: https://github.com/mregen/UA-.NETStandard-Samples/tree/aggregationserver

Main changes: 
- Support holding of reverse connections, then a client can connect faster on a hold connection instead of waiting for the next reverse hello.
- Simplify API to connect with or without reverseconnect manager.
- Reconnect handlers code path added, tested with SessionReconnectHandler
- some locks on lists were not correctly implemented.
2020-08-13 12:50:17 +02:00
Alin Moldovean cf44debd5e ReverseConnectServer improvements (#1083)
* ReverseConnectServer improvements.
2020-08-07 10:48:28 +03:00
AlinMoldovean 390e214b38 Sanity check fix for Matrix - According to specs: "Variant is a union of the built-in types" 2020-07-30 17:34:09 +03:00
Martin Regen 46cd2d990a - Add the reverse connect in the reference server and a few bug fixes (#1071)
- Support the reverse connections in the reference server
- fix an issue when the anonymous token is sent as a null value by the aggregation server
- fix docker build files
2020-07-30 11:48:28 +02:00
Alin Moldovean 3548b9f195 Fix test files location after PR #1069 (#1070)
* Fix test files location after PR #1069
2020-07-29 14:52:50 +03:00
Lauri Saurus d1303d62b5 Index range fixes (#1069)
* Fixed NumericRange ApplyRange method to work also for Matrix objects.

* Fixed NumericRange.UpdateRange to work with multidimensional arrays. Also fixed it to handle Matrix type as destination. Fixed WriteValue validation to also accept Matrix type as value when IndexRange contains SubRanges.

* Fixed WriteValue to validate NumericRange correctly by also accepting string value.

* Fixed typo in NumericRangeTests. Implemented tests for WriteValue Validate method.

* Implemented test case for NumericRange.UpdateRange when using Matrix as destination. Fixed comments.

* Fixed WriteValue.Validate to accept String and ByteString arrays when IndexRange with SubRanges is used. String and ByteString arrays have special handling in this case.

* Added null check.
2020-07-28 09:05:38 +02:00
Martin Regen cd88663b29 Policheck and move new Cert test to the right location (#1057)
- Policheck tool flagged a few words
- the new cert test went in the old location before the split, move and fix it...
- add es/de to localized text data...
- fix exception if client reverse connect is configured
2020-07-15 07:14:50 +02:00
Michael Scovetta 56bf3381c8 Fix argTypes null pointer condition (#1055)
I believe this was a typo:

```
if (argTypes != null || argTypes.Length == 1)
```

(If argTypes was null, then the first part would be false, and the second part of throw an exception. If argsType wasn't null, then the first part would be true and the second part wouldn't be evaluated.) I'm not sure whether the length check should be `== 1` or `>= 1`, nor do I know anything about how this is used, so apologies if I've misunderstood something.
2020-07-10 08:35:41 +02:00
salihgoncu f027bda519 Update Opc.Ua.Core.csproj (#1053)
* Update Opc.Ua.Core.cspro
2020-07-09 17:06:55 +03:00
dependabot[bot] 4492a3520a Bump System.Reflection.Emit from 4.6.0 to 4.7.0 (#1037)
* Bump System.Reflection.Emit from 4.6.0 to 4.7.0

Bumps [System.Reflection.Emit](https://github.com/dotnet/corefx) from 4.6.0 to 4.7.0.
- [Release notes](https://github.com/dotnet/corefx/releases)
- [Commits](https://github.com/dotnet/corefx/commits)

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

* Bump Portable.BouncyCastle from 1.8.4 to 1.8.6.7

Bumps [Portable.BouncyCastle](https://github.com/novotnyllc/bc-csharp) from 1.8.4 to 1.8.6.7.
- [Release notes](https://github.com/novotnyllc/bc-csharp/releases)
- [Commits](https://github.com/novotnyllc/bc-csharp/compare/pcl-v1.8.4...pcl-v1.8.6.7)

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

* Bump Newtonsoft.Json from 10.0.3 to 12.0.3

Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 10.0.3 to 12.0.3.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/10.0.3...12.0.3)

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

* update nuget spec

* address https://www.whitesourcesoftware.com/vulnerability-database/CVE-2019-0548

* add dependency and fix typo

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Regen <mregen@microsoft.com>
2020-07-07 15:59:21 +02:00
Martin Regen e7d8214798 Fix for self signed certs (#1036)
- The self signed certs should have the CA flag set
- small cleanup fixes for cert code
- make sure public key is always disposed
- breaking change: defaults for certs naming convention was not quite right and it should be a readonly, to make sure policy changes are reflected in calling code
- add test cases for validation of extension
2020-07-06 18:40:51 +02:00
AlinMoldovean adffe7b13e Fix in NodeId.ToExpandedNodeId() for NamespaceIndex logic. Fixes #1040 2020-07-01 15:36:53 +03:00
AlinMoldovean 22e8e07cad regression fix for Https client on NET4.6.x 2020-06-24 16:44:04 +03:00
AlinMoldovean e6a22bc8f2 UANodeSet.Export() fix for MethodDeclarationId of method nodes. 2020-06-24 11:23:12 +03:00
AlinMoldovean 44c26c42f2 remove empty lines 2020-06-23 19:08:39 +03:00
AlinMoldovean 5d57ae58f2 Fix for chain status check. #948 Fixes #960 Fixes #996 Fixes #1025 2020-06-23 19:07:58 +03:00
AlinMoldovean c7348b7ba8 Fix for Extensions filed in UANodeSet.Import()/Export() 2020-06-23 15:01:59 +03:00
Martin Regen e2748586ef Test cases for matrix encoding/decoding (#1024)
- Add theory for Matrix encode/decode for all builtintypes.
- Add theory for JSON non reversible
- related bugfixes.
- fix warnings
2020-06-22 21:51:14 +02:00
Alin Moldovean 62a2abfb83 Move Test and GDS Libraries #1002 (#1014)
* Move Core tests

* Move GDS Tests

* Move ComplexTypes Tests

* Move GDS Libraries

* Move GDS libraries
2020-06-11 09:20:08 +03:00
Miloš Konečný c0f68e05bc Support of enum array in BinaryEncoder improved. (#1010) 2020-06-10 09:56:32 +03:00
Martin Regen 2e47eaa44f Support Reverse Connect in the stack with samples (#998)
- Ported from prototyping branch in .Net Legacy stack
- Client and server support
- Aggregation server sample
- .Net Core samples

more info in docs/ReverseConnect.md
2020-06-03 16:48:25 +02:00
Martin Regen 5c2ac912c0 Propose removal of unsupported code in Opc.Ua.Configuration (#985)
- removes the InstalledConfig.xsd 
- remove non functional run as a service other windows specific code
- remove few references to OPC Classic / COM
2020-06-03 08:09:33 +02:00
Martin Regen be65403945 More tests for Extensionobject and fix Opc.Ua.Sample dictionary (#989)
- add more code coverage for ExtensionObject 
- check #984, but it turns out the code is currently not used. 
- With Modelcompiler fix, opc.ua.sample dictionary can be properly validated. see https://github.com/OPCFoundation/UA-ModelCompiler/pull/52
2020-05-25 18:14:54 +02:00
AlinMoldovean 94097b7a79 - Check for aliases in ImportNodeSet() for ExpandedNodeId values. 2020-05-19 17:26:47 +03:00
Martin Regen f53f71f8a4 Complex types fixes (#978)
fix #940 and #975 
- add namespace qualifier to complex type name
- improve handling of known subtypes
- fix Pss detection on .Net 462
- stronger check of valid DataTypeDefinition for servers which expose invalid structure (nodejs)
2020-05-15 12:54:20 +02:00
AlinMoldovean 7278f70025 Revert ExtensionObject changes for TypeId 2020-05-15 12:09:30 +03:00
AlinMoldovean 74247e4e8d Revert TypeId fix for ExtensionObject 2020-05-15 12:01:58 +03:00
Alin Moldovean ed4cc1331f Implement support for AccessRestrictions and RolePermissions attributes (#977)
* Implement Server support for AccessRestrictions and RolePermissions attributes

* Add nodes with AccessRestrictions and RolePermissions in ReferenceServer
Add example for assigning roles to users.
2020-05-14 17:20:40 +03:00
Martin Regen aaf4c9ab87 Opc.Ua.Core/Types content formatting - no bugfixes (#963)
- Simplify future maintenance by formatting all source code in types according to editorconfig style
2020-05-04 13:55:41 +02:00
Alexander Köpke 3e61a85901 Update from .NET 4.6 to .NET 4.6.2 (#959)
Upgraded all project from .NET 4.6 to .NET 4.6.2 that also .NET framework applications can use latest version of Kestrel

* Updated Kestrel to 2.2.0 (for Opc.Ua.Core)
* Simplified csproj (removed ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'") because currently we don't build netstandard1.x anymore
* Removed Kestrel 1.1.3 code from Stack/Opc.Ua.Core/Stack/Https/HttpsListener.cs 
* add conditions to Stack/Opc.Ua.Core/Stack/Https/HttpsTransportChannel.cs 
  * [HttpClientHandler.ServerCertificateCustomValidationCallback](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.servercertificatecustomvalidationcallback?view=netcore-3.1&viewFallbackFrom=netframework-4.6.2) should not be available in .NET 4.6.X
* Updated travis.ci to use latest mono version (original version causes build errors)
* Added nuget reference .NET Standard Library to mono projects to be compatible with latest Kestrel version

Own Travis.ci and Azure Pipeline builds run sucessfully.
2020-05-01 09:57:15 +02:00
Martin Regen 689f4f3068 Unit tests for IEncodeables, badges and fixes for build pipeline (#952)
- add encode/decode tests for all IEncodeables in Opc.Ua.Core. 
- *Breaking change*: ExtensionObject now returns the proper TypeId on decode for known encodeables. 
- remove Nuget.Config, it may have caused some intermittent build problems in Azure pipelines
- Code coverage now 39.5%
- Add a few badges for project info
- fix travis build, it only supports .Net Core 2 projects.
- *Breaking change*: SessionlessMessage uses the same TypeId as SessionlessInvokeRequestType which can cause problems in type factory, demoted the structure as not being IEncodeable as it is only used as a helper class in encoders/decoders.
- restructure AzPipeline builds to avoid imtermittent build issues,
2020-04-24 12:45:58 +02:00
Martin Regen 20aeb22989 Fix bytestring JSON array encoding, add code coverage (#943)
- more random Variant encoding tests, incl. arrays
- fix bytestring JSON array encoding, null or empty bytestring difference is now preserved
- add solution builds to Azure pipeline build, appveyor can be retired after a brief test period
- add code coverage to linux tests, artifact is published in pipeline build results
2020-04-14 15:55:22 +02:00
Alin Moldovean 9af68e0da8 Fix for writing RolePermissions and AccessRestrictions attributes (#939)
* Fix for writing RolePermissions and AccessRestrictions attributes in Server.

* Allow also UInt32 type when writing AccessRestrictions attribute.
2020-04-08 12:36:27 +03:00
AlinMoldovean b74cca1b35 Fixes #929 - duplicate entries in GetEndpoint response. 2020-03-27 17:56:50 +02:00
Martin Regen 8b201f7fb9 Add public key for build (#927)
- signed assemblies need a public key if 'InternalsVisibleTo' is being used. Add a define in such a case to provide a key. .Net Core 3.0 doesn't accept the dummy key, here is the real thing.
2020-03-24 10:00:44 +01:00
AlinMoldovean 971d2c7f53 Add dummy PublicKey in Core.InternalsVisibleTo for Nuget build test 2020-03-20 15:44:01 +02:00
Alin Moldovean 81832f71a3 Update UA-Nodesets and generated code (#925)
* Update generated code and UA-nodeset files for 1.04.5 Errata

* Update UA-Nodeset files and generated code of Sample projects with latest version of ModelCompiler
2020-03-20 14:43:25 +02:00
Martin Regen 1ff1ae7e52 IOP 2020: Workshop fixes (#916)
- fix to validate structuredefinition if servers do not fill out the DataTypeDefinition correctly
- The GDS creates the CRL cert with its own CA serial number, invalidating the CA by default on some stacks
- complex structuretype must be virtual, non reversible union encoding could not be detected 
- fix binary schema validation, allow the \" character in a qualified name
- support use of simple subtypes in a complex type. For custom and standard subtypes.
- only support structure objects with valuerank scalar or onedimension
2020-03-18 18:49:53 +01:00
AlinMoldovean 926b5915da Fix for CertificateUpdate during application runtime. 2020-03-11 17:55:05 +02:00
Martin Regen 0d01fbba64 Fix Variant init with enum array (#912)
* fix variant constructor for enum
* fix behaviour change for guid, can cause cast error
* minor warnings
2020-03-07 06:36:58 -06:00
Alin Moldovean 970593beb0 Compliance fixes for latest CTT (#913) 2020-03-06 16:36:17 +02:00
Martin Regen b6e8aaaedb Fix Test cases with DateTime which fail in US timezone
Implement a common way to convert DateTime to Universaltime and keep boundary values as they are
2020-03-05 10:42:43 -06:00
Martin Regen e908555216 Add schema tests for well known dictionaries (#909)
* add schema validation tests for well known type dictionaries
* comment duplicate test runs
2020-03-04 09:31:41 -06:00
Martin Regen 32e0660a7a Enable Azurepipelines build (#907)
-Starter for Azure pipelin builds, a bunch of tests in appveyor and travis can be disabled once this is working
-fix Opc.Ua.Core rootnamespace
-a few minor changes due to Ctrl-K,D refactoring, removal of dead code
2020-02-28 07:51:48 +01:00