iPhone: install certificate for SSL connection

孤者浪人 提交于 2019-12-18 13:31:49

问题


I would like my app to install an SSL certificate on the device, giving it access to my https site. Any advice would be greatly appreciated.

Thanks!!


回答1:


I've found the best way is to do the following: 1) Use your desktop browser to save the certificate locally. 2) Write an email to yourself and include the cert as an attachment 3) Read the email on your iOS device 4) Open the cert using the iOS mail app. This will install it on your device.




回答2:


First, take into account you will not be able to access certificates installed via attachments on emails or via safari, you will be able to handle certificates that you install in your application keychain. Since installing a certificate and the access it is a bit of a tedious process I would recommend that you check this sample code provided by apple, http://developer.apple.com/iphone/library/samplecode/AdvancedURLConnections/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009558

I hope this helps.



来源:https://stackoverflow.com/questions/2313987/iphone-install-certificate-for-ssl-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!