Commit Graph

57 Commits

Author SHA1 Message Date
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
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
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
AlinMoldovean 8b374a7448 Copyright year set to 2019 in license notices. 2019-02-14 12:34:33 +02:00
Martin Regen d007a41d15 Add Aes profile support (#574)
* add the Aes128 and Aes256 profiles
* Aes profies were tested on IoP workshop against Ascolab, Softing, Matrikon, Milo, ProSys and others
* Pss padding is not supported on all platforms, so autodetect if it is supported and filter out Aes256 if not
* not a breaking change: not specifying the SecurityProfileUri in the config xml will automatically add all supported profiles but not deprecated profiles (e.g. Basic256Sha256, Aes128, Aes256). Aes256 is only added if the platform supports Pss padding. This will simplify the maintenance of config xml, since automatically all supported and secure profiles are exposed.
2018-10-29 09:58:45 +01:00
AlinMoldovean 9ff7f61fa1 Certificate stores renamed according to Part 12 specification recommendation. #383 2018-08-07 17:54:14 +03:00
Martin Regen 5063ac0907 Console client improvements (#343)
* use config file for console sample
* filter unsupported security policies
* add reconnect handler
2018-02-06 14:15:16 +01:00
Martin Regen 150e0e417e fix typo, add one more mono build project 2018-01-12 17:33:59 +01:00
Martin Regen 714924856d fix mono test scrip and client 2018-01-12 16:06:48 +01:00
Martin Regen 2acfcc0a30 add mono client test 2018-01-12 15:09:00 +01:00
Martin Regen 915ad5b87c - add cert configuration nodes
- Update cert and sign request is still missing
- no security!
2017-11-07 16:33:15 +01:00
Martin Regen d2566c60bd X509store mac fix and travis improvements (#264)
* X509store mac os (#31)

* Fix problem when X509Store CurrentUser\\UA_MachineDefault cannot be created on macOS with .NetStandard2.0
Fix: Use CurrentUser\My instead for all machine certs to make console apps portable.

* prep console sample apps for smoke test
* update travis image
* run sample server and client as smoke test


* ignore travis osx build failure until travis is fixed
2017-10-12 11:16:09 +02:00
Martin Regen d850f64f81 Support .netstandard2.0 (#237)
* add missing ref for build in VSO hosted VS 2017 build

* project to just build Dlls

* target multiple frameworks

* switch to net46/netstandard1.3

* fix projects to allow for netcoreapp 2.0 build

* fix networking for .Net Core 2.0:
SendAsync and ReceiveAsync now frequently return synchronously even if successful. These cases had not been properly handled yet, previous versions never hit these codepaths.

* fix travis build / nugets

* change travis build target

* fix Kestrel https option for netstandard 2.0
tested with Ua Expert against standard and ref server

* Handle special case correctly, when zero bytes are received its ok, or BadTimeout will occur

* simplify connect, reduce DiscoverEndpoint calls
2017-09-15 09:37:32 +02:00
Martin Regen 26881aab7a Client discovery and cert check improvements (#213)
Client discovery and cert check improvements
2017-08-01 17:04:35 +02:00
Erich Barnstedt deb3f120ca Small cleanup of cert factory I/F, removing implicit default parameters. 2017-06-23 15:52:41 +02:00
Erich Barnstedt e6f0ca9420 Upgrade to VS2017/.Net1.1 2017-06-09 17:50:23 +02:00
Marc Schier 2af2a4dd75 Add visual studio 2017 solution file to allow building .net Standard … (#150)
* Add visual studio 2017 solution file to allow building .net Standard stack and console samples

* Enable VS 2015 when VS 2017 is installed

* Update readme
2017-03-23 11:17:39 +01:00
Erich Barnstedt a332f659e5 Adressed code review feedback. 2017-02-16 15:41:26 +01:00
Erich Barnstedt ad21a1b17a Merge pull request #125 from mregen/iot-proxy
Iot proxy
2017-01-24 12:35:03 +01:00
Erich Barnstedt 33d95cbe06 Merge pull request #119 from mregen/cert_fixes
Cert fixes
2017-01-24 09:16:25 +01:00
Martin Regen d450ef96a8 make TransportChannel generic 2017-01-23 13:19:12 +01:00
Erich Barnstedt 37cb8e221e Some servers don't accept a null user identity. 2017-01-23 08:42:37 +01:00
Martin Regen dcb49fd39b helper launchSettings.json for .NetCore.App platform 1.1 issue.
Workaround for Exception SystemExecutionEngine in various certificate functions:

Workaround:
set environment variable:
set COMPlus_ReadyToRunExcludeList=System.Security.Cryptography.X509Certificates

(see https://github.com/dotnet/corefx/issues/12412)
2017-01-21 18:44:19 +01:00
Martin Regen 5c370bd742 cert creation fixes
- certs were not created on Linux w. Openssl if a passcode was missing from the pkcs12 store
- stabilize the creation on windows where UWP is picky about the storage keys to use
- CR feedback
2016-12-08 18:35:31 +01:00
Martin Regen 2148d65084 improve cert handling of sample apps
- create self signed cert on first start (kudos to bouncy castle)
- fix path handling in many areas,
- ./ or ../ is treated as rooted dir
- special %LocalFolder% for UWP apps to allow to write certs in app temp storage
- all batch helpers to create certs removed
2016-12-07 18:29:24 +01:00
Martin Regen 07b70aeae0 fix console client applicationuri to match cert uri. 2016-12-06 10:11:14 +01:00
Martin Regen 8b8c2f034f URI should contain hostname not localhost 2016-11-11 10:02:07 +01:00
Martin Regen b8b818e1ef fix the cr feedback
- missing " in CreateCert batches
- NET46 dependency removed
- all TODO removed
2016-11-09 11:51:14 +01:00
Martin Regen 44b8fa50e9 default to 2048bit public keys in certs 2016-11-03 10:53:13 +01:00
Martin Regen 509d48d2c8 Implement CRL support with Bouncy Castle. Tested with issuer certs from OPC.Ua.CertificateGenerator. Also port latest security updates from UA.Net project. 2016-09-13 17:29:16 +02:00
Martin Regen 86d6f2ef76 Merge pull request #4 from mregen/ipv6_fix
support [IPv6] addresses in URLs.
2016-09-02 12:23:15 +02:00
Martin Regen 291ab27d95 support [IPv6] addresses in URLs.
Let console server auto accept client certs to simplify testing
2016-09-02 12:18:26 +02:00
Martin Regen f78dde41c3 Merge pull request #3 from mregen/ubuntu_certfixes
Merge Ubuntu certfixes and Readme update
2016-09-01 20:02:52 +02:00
Martin Regen 118937831a do not ask for cert export password 2016-09-01 09:53:07 +02:00
Martin Regen ede936d590 windows helper batch CreateAllCerts.cmd to create all certs in one shot. 2016-08-30 19:23:11 +02:00
Erich Barnstedt 70137cd963 Added CertificateGenerator.exe for creating certs with scripts for all samples. 2016-07-31 11:14:32 +02:00
Martin Regen 19e9018031 fix typo in createcert script 2016-07-27 07:38:28 +02:00
Martin Regen cf8084fe3a Parse HOSTNAME for . on Linux platforms returning a FQDN (MacOS) 2016-07-27 07:27:24 +02:00
Martin Regen a26291663f OpenSSL scripts to create certs for client and server samples. 2016-07-26 00:18:50 +02:00
Martin Regen b749ef2530 Console client cert fixes: remove default certs, add windows batch to create app certs 2016-07-25 22:13:19 +02:00
Martin Regen b181ac103c clean up project.json ref 2016-07-20 07:15:51 +02:00
Martin Regen 555a982c06 Linux fixes: console apps are portable, dir separators in xml should always be / 2016-07-20 07:15:08 +02:00
Erich Barnstedt b854dfc064 Removed invalid runtimes from .NetCore apps projects.
Rolled back to 1.18 of AMQP.NetLite assembly due to an incompatibility with UWP.
2016-07-01 23:36:18 +02:00
Erich Barnstedt ce9b34bea7 Fixed 2 path seperators.
Added missing runtimes definitions.
Removed unneeded platform definitions.
Removed unneeded dependent assemblies.
Re-enabled cert chain checks.
Got the HTTPS client working.
2016-07-01 17:44:06 +02:00
Erich Barnstedt 133264e075 Second half on check-in. 2016-06-29 12:50:05 +02:00
Erich Barnstedt 36377d038d 1. Removed dependency on Microsoft.Extensions.PlatformAbstractions (not supported on UWP).
2. Added certs to source control for .Net Core apps.
3. Added default constructors now required for deserialization.
2016-06-29 12:49:25 +02:00
Erich Barnstedt 1ac35fdec0 .Net Core 1.0 Release Upgrade (VS2015 Update3 is now required!):
1. Upgraded from UWP 5.1.0 to 5.2.0
2. Upgraded all assemblies from RC to RTM bits
3. Renamed Common directory to Opc.Ua.Sample
4. Reimplemented HTTP transport due to removed classes in .Net Standard
5. Small UWP XML class cleanup due to changes in UWP 5.2.0
2016-06-29 10:09:34 +02:00
Erich Barnstedt e11385723f * Removed empty project stubs.
* Removed HTTPS validation for WCF hosts (no longer needed)
* Simplified subscription creation in Publisher.
* Added headless .Net Standard publisher (a console app)
2016-06-27 16:33:02 +02:00
Erich Barnstedt 26e323d1de Fixed hard-coded path seperators.
More TODO cleanup.
2016-06-21 16:57:11 +02:00
Erich Barnstedt cffa84e289 Fixed project.json files. 2016-06-21 15:21:59 +02:00