C# - "The Authentication or Decryption Has Failed." Error While Using Twitterizer in Mono

Mono Service Exception - The authentication or decryption has failed

Try to replace this line:

 var ssl_stream = new SslStream(csGlobal.m_tcp_client.GetStream(), false, (sender, certificate, chain, ssl_policy_errors) => ssl_policy_errors == SslPolicyErrors.None);

with this:

 var ssl_stream = new SslStream(csGlobal.m_tcp_client.GetStream());

WebClient.DownloadString with HTTPS The authentication or decryption has failed

After some rigorous research it turns out that the version of Mono that Unity(2017.2.0f3) currently uses does not support TLS 1.2, as explained by a developer here. Also, a careful examination of the exception log shows that internally, the legacy backend is being used: Mono.Net.Security.Private.LegacySslStream as opposed to Mono.Net.Security.Private.SslStream. As of right now, the only solution would involve third-party libraries, or workarounds.

Thanks to @Evk for pointing me in the right direction.



Related Topics



Leave a reply



Submit