mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-28 22:55:49 +08:00
Use application certificate validation during WSS discovery (#4136)
ConfiguredEndpoint refreshed endpoint descriptions with a DiscoveryClient created only from EndpointConfiguration. That path did not receive the application certificate manager, so WSS discovery could not validate a server certificate trusted by the application before opening a session. Add an ApplicationConfiguration-aware endpoint refresh overload and use it from the default and channel-manager session paths. Preserve the existing overloads for compatibility. The application-aware DiscoveryClient now supplies the configured certificate validation for secure discovery transports while TCP and legacy callers retain their existing behavior. Specification: https://reference.opcfoundation.org/Core/Part6/v105/docs/7.5.3 Tests: UpdateFromServerWithNullApplicationConfigurationThrowsArgumentNullException (1 passed, net10.0) Tests: UpdateBeforeConnectUsesApplicationCertificateValidationAsync (1 passed, net10.0) # Description _Describe the changes here to communicate to the maintainers why they should accept this pull request. By default - this will become the Commit message after merging and thus define history._ ## Related Issues _Reference all GitHub issues this PR addresses. If there is no issue yet, open one and link it here._ _If this is a relatively large or complex change, a design must have been discussed in the related tracking issue and signed off (which becomes the Architectural Decision Record (ADR))._ - Fixes #github-issue-number, ... ## Checklist _Put an `x` in the boxes that apply. You can complete these step by step after opening the PR._ - [x] I have signed the [CLA](https://opcfoundation.org/license/cla/ContributorLicenseAgreementv1.0.pdf) and read the [CONTRIBUTING](https://github.com/OPCFoundation/UA-.NETStandard/blob/master/CONTRIBUTING.md) doc. - [x] I have added tests that prove my fix is effective or that my feature works and increased code coverage. - [x] I have added all necessary documentation. - [x] I have verified that my changes do not introduce (new) build or analyzer warnings. - [x] I ran **all** tests locally using the **UA.slnx** solution against at least .net **framework** and .net **10**, and all passed. - [ ] I fixed **all** failing and flaky tests in the CI pipelines and **all** CodeQL warnings. - [ ] I have addressed **all** PR feedback received. Co-authored-by: Julius Pfrommer <julius.pfrommer@o6-automation.com>
This commit is contained in:
co-authored by
Julius Pfrommer
parent
da3358d371
commit
74e272ee8d