yubico-dotnet-client icon indicating copy to clipboard operation
yubico-dotnet-client copied to clipboard

Sample test app no longer works due to Yubico API servers now using TLS 1.2

Open olehfb opened this issue 6 years ago • 1 comments

The sample test app no longer works as-is because it targets .NET Framework 4.5.1, which in its default configuration has issues talking with TLS 1.2 servers. See the following StackOverflow question, but ignore the selected correct answer and look at some of the other ones: https://stackoverflow.com/questions/2582036/an-existing-connection-was-forcibly-closed-by-the-remote-host

It's possible to get it to work with .NET 4.5.1 by running the following code: ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; However, this changes the behavior for the whole application. Therefore its not something you want to add to the library itself, but its fine to add to the YubicoDotNetTest project.

Or the simpler solution would be to just make that project target .NET version >= 4.6

olehfb avatar Jun 20 '19 05:06 olehfb

thank you for posting this olehfb -

for a .net webform app resolved following your suggestion to target >= 4.6

roblatour avatar Nov 20 '20 23:11 roblatour