nauful / LibUA

Open-source OPC UA client and server library
Apache License 2.0
262 stars 94 forks source link

UserCertificate client implementation missing #36

Closed mnurmi1 closed 4 years ago

mnurmi1 commented 4 years ago

Hello,

What I would need in my company's industrial application is a possibility to use user authentication by certificate in .NET application and what I saw in your code there are only anonymous or username connection available:

Client.cs - row 1665: else { throw new Exception(string.Format("Identity token of type {0} is not supported", identityToken.GetType().ToString())); }

Could it be possible for you to implement this feature?

nauful commented 4 years ago

Will investigate this in the future the next time I look at user authentication methods.

This is relatively uncommon, although if you have a server to test with and the UA protocol specification, you might try to add it. Off the top of my head, it's just encoding the certificate as a byte array and changing the byte that indicates user authentication type.