iOS HTTPS 可能存在通信问题
我的服务器证书几天前过期了,我的应用程序(通过 HTTPS 与服务器通信)现在崩溃了(无法连接)。这是一个简单的同步 post https 调用。该程序永远不会在服务器上运行。该访问永远不会记录在 Apache 日志中。这让我相信过期的证书就是问题所在。三周内,服务器或应用程序上的代码没有任何变化。
有没有办法设置一个标志,表明证书不必有效即可建立连接?
My server certificate expired a couple of days ago and my app (which communicates with the server over HTTPS) crashes now (unable to connect). It is a simple synchronous post https call. The program is never run on the server. The access is never logged in the Apache log. This leads me to believe that the expired certificate is the problem. Nothing in the code on the server or the app has changed in 3 weeks.
Is there a way to set a flag that says that the certificate doesn't have to valid in order to make the connection?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 ASIHTTPRequest,则可以以非私有 API 方式执行此操作。
或者查看这个答案(使用 NSURLConnection 委托)
HTTPS with NSURLConnection - NSURLErrorServerCertificateUntrusted
You can do it in a non-private API manner if you're using ASIHTTPRequest.
Or see this answer (using NSURLConnection delegate)
HTTPS with NSURLConnection - NSURLErrorServerCertificateUntrusted