当前位置:   article > 正文

iOS描述文件mobileconfig文件的签名认证_mobileconfig文件签名

mobileconfig文件签名

1、确保有如下文件:

(1)mbaike.crt(https服务器端使用证书文件)
(2)mbaike.key(https服务器端使用证书对应的密钥其实就是一个txt文件)
(3)ca-bundle.pem(startssl官网下载的跟证书文件,具体的在哪里下载,请在startssl控制面板中查找)
(4)unsigned.mobilecofig文件(IOS端生成的未签名的配置描述文件) 

2、在mac上通过openssl命令生成签名后的signed.mobileconfig文件:
openssl smime -sign -in unsigned.mobileconfig -out signed.mobileconfig -signer mbaike.crt -inkey mbaike.key -certfile ca-bundle.pem -outform der -nodetach

也可以把key文件的密码写入到key文件中

openssl rsa -in mbaike.key -out mbaikenopass.key

第二步的命令就应该是

openssl smime -sign -in unsigned.mobileconfig -out signed.mobileconfig -signer mbaike.crt -inkey mbaikenopass.key -certfile ca-bundle.pem -outform der -nodetach

这样就完成了对mobileconfig的签名工作了



pfx生成pem

openssl pkcs12 -in test.pfx -clcerts -nokeys -out cert.pem  可能需要密码

pfx生成key

openssl pkcs12 -in test.pfx -nocerts -out cert.key

ca文件就是crt文件

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/码创造者/article/detail/983058
推荐阅读
相关标签
  

闽ICP备14008679号