简体   繁体   English

需要iOS应用中的默认SSL证书验证

[英]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.

相关问题 在OSX上使用透明的mitmproxy测试iOS应用的SSL / TLS证书验证 - Testing an iOS app's SSL/TLS certificate validation using a transparent mitmproxy on OSX 在 iOS 中,如果固定的 SSL 证书过期,我是否需要重新提交应用程序? - In iOS, if pinned SSL certificate expires, do I need to re-submit the app? 我需要通过heroku服务器和iOS应用程序购买SSL证书。 我究竟需要什么? - I need to purchase an SSL certificate to use through a heroku server and iOS app. What exactly do I need? NSURLSession中的SSL证书验证 - SSL certificate validation in NSURLSession 使用AFNetworking进行SSL证书验证 - SSL Certificate validation with AFNetworking 是否需要为每个iOS应用创建预配证书? - Is need to create a provisioning certificate for each iOS app? SSL证书在iOS上无效 - SSL certificate is not valid on iOS iOS App 不喜欢自签名 SSL 证书 - iOS App does not like self-signed SSL certificate 在企业 iOS 应用程序中使用来自 .mobileconfig 的客户端 SSL 证书 - Using Client SSL Certificate from .mobileconfig within Enterprise iOS app 使用AFNetwork在iOS应用中更新SSL证书后,NSURLErrorDomain - NSURLErrorDomain after SSL certificate renewal in iOS app using AFNetwork
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM