因此Apple要求TLS 1.2具有针对iOS 9开始的URL的前向保密性.独立于应用程序,验证服务器是否满足所有要求的最佳方法是什么?
nscurl直接不起作用 - 或者我不知道如何使用它.我的输出只是反复说CFNetwork SSLHandshake失败了,即使我知道服务器是合规的.
TLSTool在某种程度上起作用,但我不能强制使用前向保密(FS)密码.
openssl可以为客户端模式指定特定的密码,但我的版本没有FS密码.如何升级openssl?
什么是最好的方式?到目前为止,我不得不使用ssllabs.com的analyze.html.有什么建议?
我正在使用2016年I/O中引入的新FireBase SDK,并且在与我的应用程序集成后出现此错误.这在应用程序启动时发生.
2016-08-06 06:28:06.237 MyApp[49084:2511094] CFNetwork SSLHandshake failed (-9806)
2016-08-06 06:28:06.238 MyApp[49084:2511094] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)
2016-08-06 06:28:06.453 MyApp[49084:2511094] CFNetwork SSLHandshake failed (-9806)
2016-08-06 06:28:06.454 MyApp[49084:2511094] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)
2016-08-06 06:28:06.854 MyApp[49084:2510825] <Firebase/Network/ERROR> Encounter network error. Error: 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 …Run Code Online (Sandbox Code Playgroud) 嗨,我有一个在ios 9和10.0中运行良好的应用程序(我已将"允许任意加载= YES"的App Transport Security阻止添加到我的info.plist.但升级到10.1和Xcode 8.1后似乎有问题使用App Transport Security.我无法连接到服务器.我的服务器仅支持TLS 1.1
显示此错误
Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
Run Code Online (Sandbox Code Playgroud)
可能是IOS 10.1忽略.plist信息.有谁有这个问题?任何帮助都非常感激.谢谢(注意.在9.3到10.0仍然正常工作)
我的.plist文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>SingPost</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.8.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb1540614276180366</string>
</array>
<key>Item 0</key>
<string>fb1540614276180366</string>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.8.7</string> …Run Code Online (Sandbox Code Playgroud) 我的iOS应用程序向后端发出HTTPS请求几个月以来,出现间歇性SSL错误。
错误说明:
An SSL error has occurred and a secure connection to the server cannot be made.
Run Code Online (Sandbox Code Playgroud)
控制台在调试模式下记录:
2019-07-06 15:12:37.012198+0100 MyApp[37255:12499941] [BoringSSL] nw_protocol_boringssl_input_finished(1543) [C2.1:2][0x159e8e4a0] Peer disconnected during the middle of a handshake. Sending errSSLClosedNoNotify(-9816) alert
2019-07-06 15:12:37.026641+0100 MyApp[37255:12499941] TIC TCP Conn Failed [2:0x280486d00]: 3:-9816 Err(-9816)
2019-07-06 15:12:37.027759+0100 MyApp[37255:12499941] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9816)
2019-07-06 15:12:37.027839+0100 MyApp[37255:12499941] Task <D5AF17C0-C202-4229-BD52-690EFDB10379>.<1> HTTP load failed (error code: -1200 [3:-9816])
2019-07-06 15:12:37.028016+0100 MyApp[37255:12499941] Task <D5AF17C0-C202-4229-BD52-690EFDB10379>.<1> finished with error - code: -1200
2019-07-06 15:12:37.032759+0100 MyApp[37255:12500041] …Run Code Online (Sandbox Code Playgroud) ssl amazon-web-services ios amazon-elastic-beanstalk app-transport-security
我已将Xcode升级到Xcode 7并包含了App Transport Security(ATS)功能pList.目前我通过分配YES来禁用此功能NSAllowsArbitraryLoads.现在app在模拟器上正常运行.但是,当我发布Adhoc开发版本并将其安装在设备上时.无论何时API调用它都会崩溃.
我无法在Xcode 9.2中禁用App Transport Security(ATS).我(多年来)在针对我的本地服务器环境运行构建时禁用ATS,如下所示:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Run Code Online (Sandbox Code Playgroud)
在Xcode 9.2中,一个简单的请求(在http模式下针对本地Rails应用程序运行):
let session = URLSession(configuration: .default)
let url = URL(string: "http://store.dev/api/products.json")!
let task = session.dataTask(with: url) { data, response, error in
print(data)
print(response)
print(error)
}
task.resume()
Run Code Online (Sandbox Code Playgroud)
失败并显示错误消息
错误域= NSURLErrorDomain代码= -1200"发生SSL错误,无法与服务器建立安全连接." UserInfo = {_ kCFStreamErrorCodeKey = -9802,NSLocalizedRecoverySuggestion =您是否还要连接到服务器?,NSUnderlyingError = 0x60c00024afb0 {错误域= kCFErrorDomainCFNetwork代码= -1200"(null)"UserInfo = {_ kCFStreamPropertySSLClientCertificateState = 0,_kCFNetworkCFStreamSSLErrorOriginalValue = -9802, _kCFStreamErrorDomainKey = 3,_kCFStreamErrorCodeKey = -9802}},NSLocalizedDescription =发生了SSL错误,无法建立与服务器的安全连接.,NSErrorFailingURLKey = https://store.dev/api/products.json,NSErrorFailingURLStringKey = https: //store.dev/api/products.json,_kCFStreamErrorDomainKey = 3}
这个完全相同的请求(同样的项目)在Xcode 9.1上取得了成功.
在这两种情况下,我都是针对iOS 11.1部署目标而构建的.您可以看到Xcode正在将URL从http更改为https,这是我不想要的.
以下是在Xcode 9.1中工作的超级基础项目的链接,但在9.2( …
我的问题与Apple Transport Security(ATS)有关,我感到非常困惑。
我想在我的Swift应用程序中支持所有协议(TLS和SSL的所有版本)。如果我将NSAllowsArbitraryLoads更改为false,则默认情况下,app是否可以在所有协议上运行?还是我必须在配置中指定域并添加NSExceptionMinimumTLSVersion?
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSExceptionDomains</key>
<dict>
<key>your.servers.domain.here</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
</dict>
</dict>
Run Code Online (Sandbox Code Playgroud)
我如何检查我的应用程序正在与服务器进行哪种协议的通信?
我有一个应用程序,它将捆绑的m4a音频文件作为本地资源加载,并且它已经运行了很多年了.我正在将应用程序更新到iOS 11.3/XCode 9.3,当我按下我的播放按钮时,它现在在iPad上失败(适用于iPhone):
2018-05-13 20:45:24.437626-0700 my app[6175:218735] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
2018-05-13 20:45:24.437791-0700 my app[6175:218735] Cannot start load of Task <117E064E-ABB3-45F2-8D64-76397B140092>.<0> since it does not conform to ATS policy
2018-05-13 20:45:24.437948-0700 my app[6175:218732] NSURLConnection finished with error - code -1022
Run Code Online (Sandbox Code Playgroud)
我的代码:
NSURL *medURL = [[NSBundle mainBundle] URLForResource: @"MyFile"
withExtension: @"m4a"];
NSError *playerError = nil;
AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] …Run Code Online (Sandbox Code Playgroud) objective-c avaudioplayer app-transport-security xcode9.3 ios11.3
我开发了一个连接到内部Web服务器的iOS应用程序.当我使用模拟器时,它工作正常,但是当我在iPhone上构建相同的应用程序时,它给出了一条错误消息"发生了ssl错误,无法与服务器建立安全连接."为什么错误只发生在iPhone而不是模拟器中?
这是我的环境Xcode 8.2 iOS 10.3目标C - 我的客户端代码默认使用ATS AFNetworking Framework 3.1 Web服务器 - 仅支持TLS 1.2 Web服务器证书尚不支持前向保密.
可能是因为我的证书不符合ATS标准吗?