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
* 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.
* Implement the mitigation against weak nonce for CVE2019-19135.
* Suppress server nonce validation errors for user tokens in Client Session for encrypted channels.
* This change allows client interoperability with some legacy servers that do not comply with the specification for nonce usage of user token encryption.
* The workaround for servers which can not connect due to a weak nonce is to use an encrypted channel, then the token is protected and the threat is mitigated.
- 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)
- 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.
- 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
- 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
- Ported from prototyping branch in .Net Legacy stack
- Client and server support
- Aggregation server sample
- .Net Core samples
more info in docs/ReverseConnect.md
* - Add Server nonce validation for duplicate nonces.
- Add configuration flag to bypass validation exceptions
* Add ITransportChannel.CurrentToken interface for nonce validation.
* 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.mdhttps://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
* 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.
* 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
- 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
2. Added missing default constructors now required.
3. trace and endpoint file now written to temp directory as application directory not accessible from UWP apps.