未知的安全传输错误

未知的安全传输错误

本文介绍了TLS 异常.未知的安全传输错误“Closed Graceful"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不断收到此错误 Unknown Secure Transport error 'ClosedGraceful' 即使我的 ServicePointManager.ServerCertificateValidationCallback 返回 true.

I keep getting this error Unknown Secure Transport error 'ClosedGraceful' even though my ServicePointManager.ServerCertificateValidationCallback is returning true.

完整的堆栈跟踪是...

The full stacktrace is ...

     at Security.Tls.AppleTlsContext.CheckStatusAndThrow (SslStatus status, Security.SslStatus[] acceptable) [0x000b1] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/src/Security/Tls/AppleTlsContext.cs:170
  at Security.Tls.AppleTlsContext.Write (System.Byte[] buffer, Int32 offset, Int32 count, System.Boolean& wantMore) [0x0003f] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/src/Security/Tls/AppleTlsContext.cs:883
  at Security.Tls.MobileAuthenticatedStream.ProcessWrite (Security.Tls.AsyncProtocolRequest asyncRequest, AsyncOperationStatus status) [0x0002f] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/src/Security/Tls/MobileAuthenticatedStream.cs:637
  at Security.Tls.AsyncProtocolRequest.ProcessOperation (AsyncOperationStatus status) [0x00086] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/src/Security/Tls/AsyncProtocolRequest.cs:199
  at Security.Tls.AsyncProtocolRequest.ProcessOperation () [0x0000d] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/src/Security/Tls/AsyncProtocolRequest.cs:159
  at Security.Tls.AsyncProtocolRequest.StartOperation () [0x00000] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/src/Security/Tls/AsyncProtocolRequest.cs:140

我什至尝试添加

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>

info.plist 但仍然没有运气

To info.plist but still no luck

目前使用 RestSharp

Currently using RestSharp

推荐答案

将属性 iOS Build > Advanced > SSL/TLS implementation 从 Apple 更改为 Mono.

Change the property iOS Build > Advanced > SSL/TLS implementation from Apple to Mono.

这篇关于TLS 异常.未知的安全传输错误“Closed Graceful"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 00:34