[英]Need the default SSL certificate validation in iOS app
The iOS app needs the basic ssl validation to secure the client-server communication. iOS应用需要基本的ssl验证,以确保客户端与服务器之间的通信安全。 I need a way to avoid SSL pinning which may have the client-server dependencies and need to update the app if the SSL cert changed.
我需要一种避免SSL固定的方法,该方法可能具有客户端-服务器依赖性,并且如果SSL证书已更改,则需要更新应用程序。
Is there any way to allow all the valid SSL cert issued by any trusted CA's ? 有没有办法允许任何受信任的CA颁发的所有有效SSL证书?
If you are looking for a way to bypass the transport security layer imposed by apple, you can do this. 如果您正在寻找一种绕过苹果施加的传输安全层的方法,则可以这样做。
Put the below code in your plist file 将以下代码放入您的plist文件中
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
* This would disable the transport security layer and allow you to connect to insecure sources. *这将禁用传输安全层,并允许您连接到不安全的源。 Please beware that this is not recommended by apple and you should always use the TLS *
请注意,苹果不建议您这样做,您应该始终使用TLS *
Check out this link to understand apple's App Transport Security better. 请查看此链接,以更好地了解Apple的App Transport Security。 There might be some keys in this link that you can configure to achieve what you are looking for
您可以配置此链接中的一些键,以实现所需的功能
http://www.neglectedpotential.com/2015/06/working-with-apples-application-transport-security/ http://www.neglectedpotential.com/2015/06/working-with-apples-application-transport-security/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.