前提:
必需要有苹果开发者账号,并且加入了 “iOS Developer Program” 费用699
访问:http://slproweb.com/products/Win32OpenSSL.html

下载Win64 OpenSSL v3.0.2 EXE别下lite版本
1、设置环境
E:\OpenSSL-Win64\bin 安装目录bin文件内shift+右击打开命令窗口
set RANDFILE=E:\OpenSSL-Win64\.rnd
set OPENSSL_CONF=E:\OpenSSL-Win64\bin\openssl.cfg
2、生成key (替换成你名字)
openssl genrsa -out .key 2048
3、生成certSigningRequest文件(替换成你名字)
openssl req -new -key .key -out .certSigningRequest -subj "/emailAddress=@qq.com,CN=Common Name,C=CN"
4、苹果网站上传certSigningRequest文件到development 下载开发证书ios_development.cer
5、开发证书ios_development.cer本地生成PEM
openssl x509 -in ios_development.cer -inform DER -out ios_development.pem -outform PEM
6、PEM和第2步的key生成P12证书
openssl pkcs12 -export -inkey .key -in ios_development.pem -out ios_developmentp12.p12 -password pass:
密码
结束了
(TYPE:Development 为开发证书,Distribution为发布证书)
发布证书前3步一样
第4步上传certSigningRequest文件到Distribution 下载发布证书ios_distribution.cer
5、本地生成PEM
openssl x509 -in ios_distribution.cer -inform DER -out cer_distribution.cer.pem -outform PEM
6、PEM和第2步的key生成P12证书
openssl pkcs12 -export -inkey.key -in cer_distribution.cer.pem -out iphone_distribution.p12 -password pass: