简体   繁体   English

iOS自签名证书

[英]ios self signed certificates

有没有办法从您自己的ios应用程序创建自签名证书?

Certificate configuration: 证书配置:

You have to install the Self Signed Certificate or CA on the device in order for the device to trust it then only device trusts the SSL connection. 您必须在设备上安装自签名证书CA ,设备才能信任它,然后只有设备信任SSL连接。

In the case of installing self signed certificate make sure domain name of the URL is same as Common name of certificate. 如果安装自签名证书,请确保URL的 域名 与证书的 通用名称相同。

If there is no domain name then IP address is fine. 如果没有域名,则可以使用IP地址。

Certificate installation: 证书安装:

You can just host it on the web server and try to access it from safari then iOS will prompt for the certificate installation in the iOS Device 您可以将其托管在Web服务器上,然后尝试从Safari浏览器访问它,然后iOS会提示在iOS设备中安装证书

Certificate Creation: 证书创建:

Here is the way to create self signed certificate so that you can fill all the details and host in web server. 这是创建自签名证书的方法,因此您可以填写所有详细信息并托管在Web服务器中。

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 1001 -nodes

(Pay attention while entering the value for Common Name) (输入“通用名称”的值时请注意)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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