首页 > 解决方案 > IOS 14 - Self signed certificate - not trustable

问题描述

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

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

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.

Any clue ?

标签: iosopensslself-signed-certificate

解决方案


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

应添加 [SAN] 部分

basicConstraints=CA:TRUE,pathlen:0

它工作!


推荐阅读