简体   繁体   中英

iOS to Node.js Backend SSL handshake failing

I have created a REST API with node.js and express. I am now trying to connect to the backend with a secure connection using 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. The error the server returns in xcode is below: 1

When I evaluate my SSLLabs it says certificate signed and TLS 1.2 / 1.1 all available etc as seen below. 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.

TLS connection completed successfully 2

iOS 9 simulated request fails [3]

When I use the command:

nscurl --ats-diagnostics --verbose

Everything passes except the Default ATS Secure Connection and all three TLS exceptions as seen below:

ATS Default Secure Connection Failing[4]

3 TLS exceptions failing[5]

I am not sure what else to try as far as I understand I meet the requirements for ATS :

  • TLS v1.2
  • Forward Secrey (I am not sure how to test this)
  • At least a 2048 bit key
  • -

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.'

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.

Answer - I had an old version of Node.JS installed on ther server 0.12. updated to v6 and now handshake words great

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM