ios13 tls证书问题-连接错误

时间:2019-10-01 11:31:50

标签: swift amazon-web-services tls1.2 ios13 aws-certificate-manager

自ios13发行以来,由于与后端的tls连接错误,我的iOS应用程序出现了一个奇怪的问题。如果我尝试通过模拟器(iOS 13)连接到后端,则可以正常工作,如果我在物理设备(iOS 13.1)上安装了该应用程序,则由于以下原因我将无法连接:

2019-10-01 13:24:12.862510+0200 CopApp[1830:506662] [] tcp_input [C1.1:3] flags=[R.] seq=2608024828, ack=2612553500, win=28408 state=ESTABLISHED rcv_nxt=2608024828, snd_una=2612553500
2019-10-01 13:24:12.869115+0200 CopApp[1830:506662] Connection 1: received failure notification
2019-10-01 13:24:12.869360+0200 CopApp[1830:506662] Connection 1: received ECONNRESET with incomplete TLS handshake - generating errSSLClosedNoNotify
2019-10-01 13:24:12.869526+0200 CopApp[1830:506662] Connection 1: failed to connect 3:-9816, reason -1
2019-10-01 13:24:12.869684+0200 CopApp[1830:506662] Connection 1: encountered error(3:-9816)
2019-10-01 13:24:28.124012+0200 CopApp[1830:506782] [] tcp_input [C2.1:3] flags=[R.] seq=3652579464, ack=755757394, win=28408 state=ESTABLISHED rcv_nxt=3652579464, snd_una=755757394
2019-10-01 13:24:28.128402+0200 CopApp[1830:506782] Connection 2: received failure notification
2019-10-01 13:24:28.128627+0200 CopApp[1830:506782] Connection 2: received ECONNRESET with incomplete TLS handshake - generating errSSLClosedNoNotify
2019-10-01 13:24:28.128793+0200 CopApp[1830:506782] Connection 2: failed to connect 3:-9816, reason -1
2019-10-01 13:24:28.128949+0200 CopApp[1830:506782] Connection 2: encountered error(3:-9816)
2019-10-01 13:24:43.584026+0200 CopApp[1830:506831] [] tcp_input [C3.1:3] flags=[R.] seq=984907791, ack=487743401, win=28408 state=ESTABLISHED rcv_nxt=984907791, snd_una=487743401
2019-10-01 13:24:43.587452+0200 CopApp[1830:506831] Connection 3: received failure notification
2019-10-01 13:24:43.587674+0200 CopApp[1830:506831] Connection 3: received ECONNRESET with incomplete TLS handshake - generating errSSLClosedNoNotify
2019-10-01 13:24:43.587839+0200 CopApp[1830:506831] Connection 3: failed to connect 3:-9816, reason -1
2019-10-01 13:24:43.588047+0200 CopApp[1830:506831] Connection 3: encountered error(3:-9816)
2019-10-01 13:24:43.594292+0200 CopApp[1830:506831] Task <DAEFF7C7-DF2E-4DCB-9BF9-2A7825D56AF2>.<1> HTTP load failed, 0/0 bytes (error code: -1200 [3:-9816])
Si è verificato un errore SSL ed è impossibile effettuare una connessione sicura con il server.

很显然,后端是相同的,并且由aws证书管理器创建的aws证书覆盖。我认为问题不在于证书,因为我认为它符合新Apple的证书政策,但我不明白问题出在哪里。

能请你帮我吗?

谢谢

1 个答案:

答案 0 :(得分:0)

请记住,自iOS 13起,对受信任证书有新的要求。确保SSL证书符合这些要求,否则将无法建立连接。

您可以在Apple官方说明中找到这些要求-Requirements for trusted certificates in iOS 13 and macOS 10.15

您可以使用例如OpenSSL检查证书:

openssl s_client -showcerts -connect yourServer:serverPort