OGeek|极客世界-中国程序员成长平台

标题: ios - 使用服务器证书签署 iPhone 配置文件 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 14:21
标题: ios - 使用服务器证书签署 iPhone 配置文件

我已经找到了一个类似主题的帖子,但我无法通过这种方式解决我的问题,所以我希望在这里得到帮助。

我正在尝试使用我在 Mac OS X 上的服务器 SSL 证书签署 iPhone 配置文件:

openssl smime -sign -in company.mobileconfig -out signed.mobileconfig -signer server.crt -inkey server.key -certfile ca.crt -outform der -nodetach

不幸的是,我收到以下错误

unable to load certificate

我不知道我做错了什么 - 我使用以下证书:

server.crt:

-----BEGIN CERTIFICATE-----
MIIHV.....
-----END CERTIFICATE-----

server.key:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC, .....

sHK1......
-----END RSA PRIVATE KEY-----

ca.crt: 来自 http://www.startssl.com/certs/

所有证书都在我更改为的同一文件夹“iphone”中

ch /Volumes/Daten/.../iphone

所以现在我开始了

localhost:iphone Stefan$

非常感谢您提前提供的帮助!

问候 斯蒂芬



Best Answer-推荐答案


答案是:

openssl smime -sign -signer cert.pem -inkey key.pem -certfile ca-bundle.pem -nodetach -outform der -in profile-uns.mobileconfig -out profile-sig.mobileconfig

其中 ca-bundle.pem 是 CA 的证书链。

关于ios - 使用服务器证书签署 iPhone 配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28645002/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4