IOS 14 - 自签名证书 - 不可信 [英] IOS 14 - Self signed certificate - not trustable

查看:453
本文介绍了IOS 14 - 自签名证书 - 不可信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用这个创建了一个自签名证书

I create a self signed certificate by using this

openssl req \
    -newkey rsa:2048 \
    -x509 \
    -nodes \
    -keyout myKey.key \
    -new \
    -out myCert.crt \
    -subj /CN=my.domaine.any \
    -config ./myConfig.cnf \
    -reqexts SAN \
    -extensions SAN \
    -sha256 \
    -days 365

myConfig 的内容是

the content of myConfig is

[ req ]
default_bits        = 2048
distinguished_name  = req_distinguished_name
req_extensions      = SAN
extensions          = SAN
[ req_distinguished_name ]
countryName         = myCountry
stateOrProvinceName = myProvince
localityName        = myCity
organizationName    = myOrgan
[SAN]
subjectAltName      = DNS:my.domaine.any
extendedKeyUsage    = serverAuth

我检查了我在此处找到的 IOS 证书要求 https://support.apple.com/en-us/HT210176(我希望,我拥有一切).

I check the IOS certificate requirement that I find here https://support.apple.com/en-us/HT210176 (I hope, I have everything).

我可以将证书安装到设置中 >一般>个人资料.

I ame able to install the certificate into Setting > General > Profile.

但是我不能信任我的证书,因为当我要设置时>一般>关于 >证书信任设置,我没有看到任何证书.

But I can't trust my certificate because when I'm going to Setting > General > About > Certificate Trust Settings, I didn't see any certificate.

有什么线索吗?

推荐答案

我发现我的配置中缺少什么.

I found what's was missing into my configuration.

应该在[SAN]部分添加

should add in [SAN] part

basicConstraints=CA:TRUE,pathlen:0

它起作用了!

这篇关于IOS 14 - 自签名证书 - 不可信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆