背景
我有一个第三方框架,它对我提供给它的 URL 进行一些网络请求。 请求的格式为: https://10.0.2.2:8000/api/ ....
由于架构是 https,我不断收到来自第三方库的错误消息:
The certificate for this server is invalid. You might be connecting to a server that is pretending to be “10.0.2.2” which could put your confidential information at risk.
服务器是一个以
启动的 Django 应用程序python3 manage.py runserver_plus 10.0.2.2:8000 --cert-file _my_cert.crt
我尝试了很多方法来生成自签名证书并将其安装到模拟器并运行服务器,但是,它们都无法帮助避免第三方库中的错误。
问题
所以我想知道这是否有意义。
是否可以生成自签名证书并将其安装到 iOS 模拟器中,这将避免解决此处描述的挑战: https://developer.apple.com/documentation/foundation/url_loading_system/handling_an_authentication_challenge/performing_manual_server_trust_authentication?language=objc
请提供任何类型答案的证据,无论是是还是否。
最佳答案
您可以从https://letsencrypt.org获取免费的SSL证书
尝试一次就可以了。
关于ios - 是否可以创建自签名 ssl 证书来避免应用程序代码中的 "challenge"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59953321/