OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.97k stars 950 forks source link

Receiving BadIdentityTokenInvalid when upgrading 1.5.374.126 from 1.5.374.36 #2851

Closed sushi1992 closed 1 day ago

sushi1992 commented 3 days ago

Type of issue

Current Behavior

Using anonymous certificate with public key in sign and encrypt mode. Throws an exception of “BadIdentityTokenInvalid”.

Expected Behavior

Work as previously so in the older version.

Steps To Reproduce

No response

Environment

- OS: Windows 11
- Environment:
- Runtime:
- Nuget Version: 1.5.374.126
- Component:Opc.Ua.Server
- Server:
- Client:

Anything else?

The failure seems to occur between 1.5.374.78 and 1.5.374.118. It is located potentially around the certificate area of the code but I am unaware why validating fails in the new version.

romanett commented 1 day ago

@sushi1992 since this PR already at Startup it is verified the specified user certificate has an accessible private Key: https://github.com/OPCFoundation/UA-.NETStandard/commit/8a1df6d3dc8f2bb195946944b91d17ff0dd94ada