“发生了ssl错误,无法与服务器建立安全连接”仅在手机上连接到Internal Development Server [英] “an ssl error has occurred and a secure connection to the server cannot be made” connecting to Internal Development Server on phone only

查看:1109
本文介绍了“发生了ssl错误,无法与服务器建立安全连接”仅在手机上连接到Internal Development Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个连接到内部Web服务器的iOS应用程序。当我使用模拟器时,它工作正常,但是当我在iPhone上构建相同的应用程序时,它给出了一条错误消息发生了ssl错误,无法建立与服务器的安全连接。 为什么错误只发生在iPhone而不是模拟器中?

I developed a iOS app that connects to a internal web server. When I used the simulator, it works fine, but when I build the same app on a iPhone, it gives me a error message "an ssl error has occurred and a secure connection to the server cannot be made. " Why the error only occurs on iPhone not in simulator?

这是我的环境
Xcode 8.2
iOS 10.3
目标C - - 我的客户端代码默认使用ATS
AFNetworking Framework 3.1
Web服务器 - 支持TLS 1.2仅
Web服务器证书尚不支持前向保密。

Here is my environment Xcode 8.2 iOS 10.3 Objective C -- My client code is using ATS by default AFNetworking Framework 3.1 Web Server -- Support TLS 1.2 only Web Server Cert is not supporting forward secrecy yet.

可能是因为我的证书不符合ATS吗?

Could it be because that my Cert is not ATS compliant?

推荐答案

我读完这篇文档

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>Your Domain</key>   
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>                
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
    </dict>
</dict>

我的应用程序正在使用设备。我在服务器上的证书尚未准备好Forward Secrecy。

My app is now working on devices. My cert on the server is not Forward Secrecy ready yet.

这篇关于“发生了ssl错误,无法与服务器建立安全连接”仅在手机上连接到Internal Development Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆