我想使用SSL 证书 实现移动应用程序。 我知道我们可以将 SSL 证书保存在应用程序中。 我需要澄清以下问题。
- 如果移动应用程序中有 SSL 证书。如何更新功能中的证书?
- 有什么方法可以将证书保存在服务器中。并调用移动应用网络服务?
- Keep 在应用程序内部如何我相信它是安全的。 (逆向工程原因)
最佳答案
你必须在服务器中实现 ssl 证书,你可以在你的 info.plist 中添加
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>testdomain.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
<key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
<false/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<true/>
<key>NSThirdPartyExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
<key>NSRequiresCertificateTransparency</key>
<false/>
</dict>
</dict>
这是您可以添加到您的代码中以确保安全的选项
关于ios - 在移动应用程序中保留 SSL 证书的最佳方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44651075/