iOS应用创建APNS和p12证书导出pem证书流程


从钥匙串导出cer.p12和key.p12

mac openssl command not found

brew install openssl

brew info openssl

https://blog.csdn.net/u011619283/article/details/89003866


https://juejin.cn/post/7259584603178336316

报错的加-legacy 
digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:342:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()


openssl pkcs12 -clcerts -nokeys -out cer.pem -in cer.p12 -legacy 
//  openssl pkcs12 -clcerts -nokeys -out cer.pem -in cer.p12

openssl pkcs12 -nocerts -out key.pem -in key.p12 -legacy
// openssl pkcs12 -nocerts -out key.pem -in key.p12



openssl rsa -in key.pem -out apns_amac_key_nopwd.pem


cat cer.pem apns_amac_key_nopwd.pem > apns_amac.pem


openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert cer.pem -key key.pem

openssl s_client -connect gateway.push.apple.com:2195 -cert cer.pem -key key.pem









Loading Disqus comments...
Table of Contents