【问题标题】:moving from HTTP to HTTPS errors: -9801 and -1200从 HTTP 迁移到 HTTPS 错误:-9801 和 -1200
【发布时间】:2017-04-06 13:19:42
【问题描述】:

我有一个应用程序可以处理 http 请求,完全没问题。现在服务器已移至https,因此我需要对 ATS 设置进行一些更改。

它给出了以下错误:

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9801)

Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and 
a secure connection to the server cannot be made." 
UserInfo={NSLocalizedDescription=An SSL error has occurred and 
a secure connection to the server cannot be made.,
 NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, 
_kCFStreamErrorCodeKey=-9801, 
NSErrorFailingURLStringKey=https://domain.com, 
_kCFStreamErrorDomainKey=3, NSUnderlyingError=0x79094840

我尝试将Allow Arbitrary Loads 设置为YES。但它没有用。 请告知我需要设置什么设置才能正常工作。

【问题讨论】:

  • 伙计们,如果您对我的问题投反对票,请至少指出原因。谢谢

标签: ios objective-c swift https app-transport-security


【解决方案1】:

通过从例外域列表中删除服务器的域来修复。因为它在使用 http 的例外列表中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-13
    • 2022-01-01
    • 1970-01-01
    • 2016-07-28
    • 2015-02-16
    相关资源
    最近更新 更多