生成服务器端推送p12文件

 

   所需文件:A、开发证书  aps_production.cer

                 B、本地导出的私钥   : aps_production.p12

                 C、生成证书时用到的请求文件:Push.certSigningRequest                

1、将aps_production.cer转换成aps_production_identity.pem格式
 
openssl x509 -in aps_production.cer -inform DER -out aps_production_identity.pem -outform PEM 

 

2、将本地私有p12格式的私钥转换成pem

openssl pkcs12 -nocerts -out apple_push_notification_production.pem -in aps_production.p12  

 

3、创建服务器p12文件(aps_production_identity.p12) 

openssl pkcs12 -export -in aps_production_identity.pem -inkey apple_push_notification_production.pem -certfile Push.certSigningRequest -name "aps_production_identity" -out aps_production_identity.p12