Unity - TlsException: аутентификация или дешифрование не удалось - PullRequest
0 голосов
/ 10 декабря 2018

Этот фрагмент кода вызывает исключение TlsException в Unity 2017.4.15f1, я рассмотрел другие вопросы, но, похоже, решение больше не работает.Я смутно понимаю, что это проблема сертификатов (?)

    private void Start()
{
    var client = new WebClient();
    var text = client.DownloadString("https://jsonplaceholder.typicode.com/posts/1");
    Debug.Log(text);
}


// --- ERROR THROWN

TlsException: The authentication or decryption has failed.
Mono.Security.Protocol.Tls.RecordProtocol.ProcessAlert (AlertLevel 
alertLevel, AlertDescription alertDesc)
Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback 
(IAsyncResult asyncResult)
Rethrow as IOException: The authentication or decryption has failed.
Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback 
(IAsyncResult asyncResult)
Rethrow as WebException: Error getting response stream (Write: The 
authentication or decryption has failed.): SendFailure
System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
System.Net.HttpWebRequest.GetResponse ()
System.Net.WebClient.GetWebResponse (System.Net.WebRequest request)
System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken)
...