一、企业证书签名:
1.钥匙串导出证书cer.p12和私钥vendor.p12
2.证书转pem、私钥转key
openssl pkcs12 -clcerts -nokeys -out cer.pem -in cer.p12
openssl pkcs12 -in vendor.p12 -nocerts -out vendor.key
会要求你输入3次密码:vendor.p12 的密码、vendor.key 的密码、vendor.key 的密码。
3.下载苹果 WWDR 证书和苹果根证书:http://www.apple.com/certificateauthority/
转换 WWCR 证书和苹果根证书为 pem 格式:
openssl x509 -inform der -in AppleWWDRCA.cer -out intermediate.pem
openssl x509 -inform der -in AppleIncRootCertificate.cer -out root.pem
在文本编辑器中打开两个解压出来的文件复制并且粘贴Intermediate.pem 到 root.pem的开始位置,保存,然后你的root.crt.pem文件就是两个证书合并的结果
4.openssl smime -sign -in getudid.mobileconfig -out getudid_signedm.mobileconfig -signer cer.pem -inkey vendor.key -certfile root.pem -outform der -nodetach
二、SSL网站证书签名:
1.后台提供SSL网站的证书(weian.com.pem)和私钥(weian.com.key)
2.准备信任根证书ca-bundle.pem
3.在文本编辑器中打开两个解压出来的文件复制并且粘贴haimawan.com.pem到 ca-bundle.pem的开始位置,保存
4.openssl smime -sign -in getudid.mobileconfig -out getudid_signedm.mobileconfig -signer weian.com.pem -inkey weian.com.key -certfile ca-bundle.pem -outform der -nodetach
借鉴:
网友评论