Commit Graph
995 Commits
Author SHA1 Message Date
Alin Moldovean 3e640bf702 Update UA NodeSets and generated code (#895)
* Update UA NodeSets and generated code with the latest updates for 1.04.04 Errata Release.

* Revert error in generated code.
1.4.359.31
2020-01-30 16:08:19 +02:00
Alin Moldovean 636f5c03f9 Implement validation for duplicate nonces (#893)
* - Add Server nonce validation for duplicate nonces.
- Add configuration flag to bypass validation exceptions

* Add ITransportChannel.CurrentToken interface for nonce validation.
2020-01-30 15:06:13 +02:00
Martin Regen a1faa0f7a1 Remove netstandard1.3 (#887)
* remove netstandard1.3 and unify csproj settings
* switch tests to silent mode
2020-01-23 07:22:26 +01:00
Karl Deiretsbacher dc880584de Update ClientPage.xaml.cs
Replaced the dual license with MIT to make it consistent with all other sample source files.
2020-01-22 09:53:03 +01:00
Karl Deiretsbacher b19158b260 Update Program.cs
Replaced the dual license with MIT to make it consistent with all other sample source files.
2020-01-22 09:52:22 +01:00
Karl Deiretsbacher 3cc8373900 Update Program.cs
Replaced the dual license with MIT to make it consistent with all other sample source files.
2020-01-22 09:51:32 +01:00
Karl Deiretsbacher d6aa3f6300 Update ServerDiagnosticsCtrl.xaml.cs
Replaced the dual license with MIT to make it consistent with all other sample source files.
2020-01-22 09:49:51 +01:00
Karl Deiretsbacher 1ccd0f2880 Update ServerPage.xaml.cs
Replaced dual license with MIT. Only stack files have dual license.
2020-01-22 09:41:25 +01:00
Karl Deiretsbacher 6a4e3a6154 Update CustomTransportChannel.cs
Replaced dual license with MIT. Only stack files have dual license.
2020-01-22 09:40:36 +01:00
Karl Deiretsbacher ddec44102e Update Program.cs
Replaced the dual license with MIT to make it consistent with all other sample source files.
2020-01-22 09:27:26 +01:00
Alin Moldovean 1b4a7398df Merge pull request #885 from AlinMoldovean/master
Fix for handling of AccessLevel and AccessLevelEx attributes.
2020-01-15 09:39:24 +02:00
AlinMoldovean bcccd718a4 Fix for handling of AccessLevel and AccessLevelEx attributes. 2020-01-14 18:00:23 +02:00
Wadjet-Informatics e9ebd49350 Prevent deep recursion and excessive thread creation in TcpMessageSocket (#845)
- instead of creating task or nested calls to get message packets uses a loop which is more efficent and stack safe.
2020-01-13 13:27:54 +01:00
ondraco 3f0bb8c83c Allow relative URI as module name and fix nested load issue (#884)
* Allow relative URI as module name
* If a complex type contains another complex type which was not loaded yet add it to the 'retry list' instead of not loading it at all.
2020-01-13 13:25:00 +01:00
SebZar ae3234a86d Dependency Problem when using HTTPS (#883) 2020-01-10 12:37:09 +01:00
Martin Regen f7ab80d304 Update kestrel nuget version (#882)
* update kestrel nuget version
* update nuspec
2020-01-10 12:28:23 +01:00
Kurt 300d9ffd62 Minor analyzer (roslynator) fixes (#880)
* Use nameof() where applicable

Category: Maintainability
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1015.md

* Rethrow original exception

Preserves original stack trace of the exception, easier to diagnose
Category: Maintainability
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1044.md
https://stackoverflow.com/a/178464

Remove variable from the catch if not logged (compiler warning).

* Combine Where->FirstOrDefault, use Find if applicable

Category: Performance
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1077.md

In ApplicationConfiguration:
ServerSecurityPolicyCollection inherits from List<T>, so use List.Find (better performance than FirstOrDefault)

* Use List.Count rather than LINQ Any()

Category: Performance
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1080.md
refsToRemove is a List<T>, which we know the count of (no need to iterate).

* Add [Flags] Attribute for OpenFileMode

Each enum is a bitflag here
Just noticed this is in the "Generated" folder... some prior commits had touched other "Generated" files -- see nameof commit.

* Minor performance behavior

- EventArgs.Empty instead of allocating a new blank EventArgs

It only really happens on Connect/Disconnect so it's not like a single allocation really matters

- Use array[0] instead of First()
https://stackoverflow.com/a/25607951
- Use !Any() instead of Count() == 0
If a dependent field is found, it will stop evaluating the rest and Add instead of Insert. Count() == 0 required evaluation of all

- Use All() instead of FirstOrDefault(any) == null
Clearer intent (all are not matching the group BrowseName => clear default)
Slightly faster as the first match found doesn't have to be compared against null

* Revert changes to generated files

* Fix mistake

fixes compile error
2020-01-09 09:28:37 +02:00
Martin Regen 368049d188 Improvements to complex types client (#879)
- allow for loading of single types with dependencies from DataTypeDefinitions only
- introduce a type dictionary to match xml qualified names with type ids.
breaking change (internally):
- simplify JSON encoding by providing a UseReversibleEncoding flag 
- add also JSON and XML encoding ids to type factory if supported
- follow coding conventions for test sample, add single type loading use case (before/after)
- fix a bug when a JSON extension object cannot be decoded when the namespace uri is encoded
2020-01-08 16:29:22 +01:00
Martin Regen 73d91d6e97 Bump up dependencies of UWP apps to use netstandard2.0 (#873)
- this is part of an effort to deprecate netstandard1.3 support (#761)
- as a result Windows 10 minimal version is now >= 16299 (Fall Creators Update 2017)
2020-01-07 17:34:38 +01:00
Martin Regen 0a1f7b71ae add .editorconfig (#872)
Press Ctrl-K, Ctrl-D to format according to specification.
2019-12-20 21:51:36 +01:00
Alin Moldovean 736214de9d Merge pull request #871 from AlinMoldovean/master
Nonce validation update in Client library
2019-12-19 14:34:48 +02:00
AlinMoldovean f87ea2839d Skip server nonce validation in ClientSession if the nonce is not used for encryption. 2019-12-18 17:01:21 +02:00
Alin Moldovean c68b345362 Merge pull request #865 from AlinMoldovean/master
Implement import of DataTypeDefinition attribute from NodeSet files.
2019-12-09 13:43:16 +02:00
AlinMoldovean ba620f2a08 Implement import of DataTypeDefinition attribute from NodeSet files. 2019-12-06 10:24:32 +02:00
Martin Regen d31c8cc6e4 - implement a few TODO (#859)
- bugfixes found in testing
1.4.358.30
2019-12-02 16:29:25 +01:00
Alin Moldovean f1a16df2e2 Merge pull request #860 from AlinMoldovean/master
Nonce validation fix in Client Session
2019-12-02 16:08:34 +02:00
AlinMoldovean 77a183ec6b Nonce validation fix in Client Session. The minimum nonce length should be 32 in CreateSession and ActivateSession responses. 2019-11-28 19:10:07 +02:00
Martin Regen de9872320c Fixtravis & nuget auto dependency (#857)
- urgent commit to test nuget build system
2019-11-21 19:58:05 +01:00
Alin Moldovean c6ee113030 Merge pull request #856 from AlinMoldovean/master
Fixes #847 - Fix in DiscoveryClient.Create()
2019-11-21 17:39:34 +02:00
AlinMoldovean 2d2c108a68 Fixes #847 - Fix in DiscoveryClient.Create() 2019-11-21 15:35:51 +02:00
Alin Moldovean ea1d78a515 Merge pull request #854 from AlinMoldovean/master
ComplexTypes fix for using shared EncodableFactory in UA Sample Client
2019-11-21 14:49:42 +02:00
dependabot[bot] 1b11fb68b0 Bump Microsoft.NETCore.UniversalWindowsPlatform (#853)
Bumps [Microsoft.NETCore.UniversalWindowsPlatform](https://github.com/Microsoft/dotnet) from 5.4.0 to 5.4.2.
- [Release notes](https://github.com/Microsoft/dotnet/releases)
- [Commits](https://github.com/Microsoft/dotnet/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-21 13:18:39 +01:00
AlinMoldovean 095dc40680 ComplexTypes fix for using shared EncodableFactory in UA Sample Client 2019-11-21 13:54:43 +02:00
Alin Moldovean 131f53811f Merge pull request #851 from MilosKonecny/master
Stability in BinaryDecoder improved.
2019-11-21 13:40:42 +02:00
Martin Regen 39dca2c103 Complex Types client library (#849)
Adds a complex type system client library extension for custom enumerations and structure types based on a server dictionary or DataTypeDefinition using emitted classes at runtime. 

- Custom types are added to the session factory, not to the global factory. Types are loaded when the session connects by adding 
`                var complexTypeSystem = new ComplexTypeSystem(session);
                await complexTypeSystem.Load();
`
- Custom type properties can be accessed with an accessor [propertyname] or [index]. Direct access through the properties is possible, but some cases do not update the optional or union flags correctly.
- Support includes V1.03 dictionaries and V1.04 DataTypeDefinitions (--> known issues).
- NetCoreComplexClient can be used for quick testing servers. It prints out all custom types with content and subscribes to all. Also includes sample how to write back complex type variables and how to output JSON.
- The UA Sample Client and the Quickstart Data Type client can be used for testing with UI. Many issues were adressed to be able to read and write complex types, however some support is limited, e.g. only editing simple fields is currently working (help wanted).
- Caveat: The complex type libaries for .Net Core must be built for .netcoreapp, so it needs a seperate nuget package for the complex type client extension.
- Support for a factory type builder class to allow to plugin other type builder methods (e.g. Codedom etc...)
- Added JSON test case and include the complex types client in the testing shell script, so the complex types lib is tested on mac/linux too.
- Few fixes in the JSON encoder.

Finding enough servers with custom types is an issue, so if you find servers with unsupported custom types please provide feedback.

Known limitations:
- Only V1.03 OPC binary dictionaries are supported (no XML Schema dictionaries).
- V1.03 dictionary structure definitions are only supported if they can be mapped to a V1.04 DataTypeDefinition. Nested types and cross dictionary refs should work.
- OptionSet is only partially implemented. Only shows the byte arrays, not the flags.
- Opaque Types in dictionaries are ignored.
2019-11-20 16:05:24 +01:00
Alin Moldovean 49f14cf8ff Merge pull request #852 from AlinMoldovean/master
Length validation in user token decryption.
2019-11-20 11:29:16 +02:00
AlinMoldovean 13cba2baf7 Length validation in user token decryption. 2019-11-19 16:01:28 +02:00
Miloš Konečný 110ab6b5c0 BinaryDecoder: Stability improved, exception ArgumentOutOfRangeException is avoided. 2019-11-18 21:22:09 +01:00
Alin Moldovean dd06f4fe22 Merge pull request #846 from AlinMoldovean/master
Add server nonce validation in Client session.
2019-11-14 13:38:28 +02:00
AlinMoldovean 8504055a83 Add server nonce validation in Client session. 2019-11-12 17:00:07 +02:00
Sebastian Bäumler c9a20988e5 Removed duplicated code. (#844)
Same Code will be called by static function "RequireEncryption()"
2019-11-11 16:44:23 +02:00
Alin Moldovean dc9fa85a38 Fixes #822 - Certificate Validation fix. (#843)
* Remove BadCertificateUriInvalid from list of certificate validation errors that may be suppressed.
2019-11-06 09:49:08 +02:00
Andrew Field d7130a97d4 Spelling (#840) 2019-11-05 10:07:52 +02:00
Alin Moldovean f015ece891 Fixes #832 - Avoid deep recursion in TcpMessageSocket.ReadNextBlock() (#836)
* Fixes #832 - Avoid deep recursion in TcpMessageSocket.ReadNextBlock()
2019-10-30 09:52:46 +02:00
Martin Regen ef06464776 fix schema validator and dictionary loader (only binary) (#833)
* fix schema validator and dictionary loader (only binary scheme)
# include some .bsd files for validation
* add check for some configuration fields, to return a meaningful error.
2019-10-29 18:16:37 +01:00
Alin Moldovean 056dfaa8db Merge pull request #835 from AlinMoldovean/master
Fixes #780. ExpandedNodeId.CompareTo() fix.
2019-10-29 12:16:46 +02:00
AlinMoldovean 089bcd0e6f Fixes #780. ExpandedNodeId.CompareTo() fix. 2019-10-29 10:11:44 +02:00
Martin Regen 6971c76d88 Improve Data Type Quickstart Server (#831)
- add a few more dependent complex types for testing
- fix UI issue which prevents dialogs from showing data
* workaround for dialogs with imagestream, always throwing exceptions
* rebuild with v1.04 modelcompiler
2019-10-25 15:57:34 +02:00
Andrew Field 933244cc15 Add quote marks to workdir in test shell script. (#819)
* Update testclientserver.sh
* Update testmonoclientserver.sh

Add quote marks. "cd" will fail without quote marks if the workdir has any blank spaces.
2019-10-10 11:51:58 +02:00
Alin Moldovean 28614a037c Merge pull request #817 from AlinMoldovean/master
Client keep-alive fix
1.4.357.28
2019-10-03 16:57:44 +03:00