简体   繁体   中英

Need the default SSL certificate validation in iOS app

The iOS app needs the basic ssl validation to secure the client-server communication. 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.

Is there any way to allow all the valid SSL cert issued by any trusted CA's ?

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

<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 *

Check out this link to understand apple's App Transport Security better. 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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM