[英]iOS to Node.js Backend SSL handshake failing
I have created a REST API with node.js and express. 我已经使用node.js创建了一个REST API并进行了表达。 I am now trying to connect to the backend with a secure connection using Alamofire 3/https/SSL/TLS.
我现在正在尝试使用Alamofire 3 / https / SSL / TLS通过安全连接连接到后端。 I have a CA signed certificate, with a 2048 bit key installed on the server with the 'https' npm module.
我有一个CA签名证书,在服务器上安装了一个2048位密钥,并带有'https'npm模块。 The error the server returns in xcode is below: 1
服务器在xcode中返回的错误如下: 1
When I evaluate my SSLLabs it says certificate signed and TLS 1.2 / 1.1 all available etc as seen below. 当我评估我的SSLLabs时,它说证书签名和TLS 1.2 / 1.1都可用,等等,如下所示。 However interestingly under where it simulates requests the request record for iOS 9 (ATS) - Fails with 'Sever closed connection' as seen in the image below.
但是有趣的是,在它模拟请求的地方,iOS 9(ATS)的请求记录-出现“服务器关闭连接”失败,如下图所示。
TLS connection completed successfully 2 TLS连接成功完成2
iOS 9 simulated request fails [3] iOS 9模拟请求失败[3]
When I use the command: 当我使用命令时:
nscurl --ats-diagnostics --verbose nscurl --ats-diagnostics --verbose
Everything passes except the Default ATS Secure Connection and all three TLS exceptions as seen below: 除了默认的ATS安全连接和所有三个TLS例外,一切都通过了,如下所示:
ATS Default Secure Connection Failing[4] ATS默认安全连接失败[4]
3 TLS exceptions failing[5] 3 TLS异常失败[5]
I am not sure what else to try as far as I understand I meet the requirements for ATS : 据我所知,我是否满足ATS的要求还不确定可以尝试什么:
When I turn on CFNetworking logging in the logfile it points to Error code -1200 in CFNetwork/CFNetworkErrors.h which has the error reason 'The secure connection failed for an unknown reason.' 当我在日志文件中打开CFNetworking日志记录时,它指向CFNetwork / CFNetworkErrors.h中的错误代码-1200,其错误原因为“安全连接由于未知原因而失败”。
I am at a lost as to what to try next, thanks. 谢谢,我不知道该怎么做。 Sorry it will only let me post 2 links so I had to remove some images.
抱歉,它只允许我发布2个链接,所以我不得不删除一些图像。
Answer - I had an old version of Node.JS installed on ther server 0.12. 答案-我在服务器0.12上安装了旧版本的Node.JS。 updated to v6 and now handshake words great
更新到v6,现在握手的话很棒
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.