赞
踩
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文件
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。