Commit Graph

439 Commits

Author SHA1 Message Date
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
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