gpt4 book ai didi

swift - ios13 tls证书问题-连接错误

转载 作者:行者123 更新时间:2023-12-03 09:16:15 24 4
gpt4 key购买 nike

自从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的证书政策,但我不知道问题出在哪里。

请你帮助我好吗?

谢谢

最佳答案

请记住,自iOS 13起,对受信任的证书有了新的要求。确保SSL证书符合这些要求,否则将无法建立连接。
您可以在Apple官方说明中找到这些要求-Requirements for trusted certificates in iOS 13 and macOS 10.15
您可以使用例如OpenSSL检查证书:

openssl s_client -showcerts -connect yourServer:serverPort

关于swift - ios13 tls证书问题-连接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58183930/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com