mz-automation / lib60870.NET

Official repository for lib60870.NET an implementation of the IEC 60870-5-101/104 protocols in C#
https://www.mz-automation.de/communication-protocols/iec-60870-5-101-104-c-net-source-code-library/
GNU General Public License v3.0
123 stars 75 forks source link

Tls 1.0 is forced by the Iec-104 server. #33

Open arifmjcet opened 3 weeks ago

arifmjcet commented 3 weeks ago

Hi, While testing Tls implementation of iec-104 server, it is observed that the server is selecting TLS 1.0 even when the client supports higher versions. Upon inspecting the code it is found that in lib60870/CS104/ClientConnection.cs file line 1235, "sslStream.AuthenticateAsServer(tlsSecInfo.OwnCertificate, true, System.Security.Authentication.SslProtocols.Tls, false);" here tls version 1.0 is explicitly specified causing server to choose the old tls 1.0 version. If we replace the above line with "sslStream.AuthenticateAsServer(tlsSecInfo.OwnCertificate, true, System.Security.Authentication.SslProtocols.Tls12 | System.Security.Authentication.SslProtocols.Tls13, false);" The above issue is resolved.

psnx commented 6 days ago

This is addressed in pull request 28. I am waiting for this to baccepted.