苹果消息推送服务器 php 证书生成

1.准备好

aps_developer_identity.cer

, push.p12这两个证书文件

2. 生成证书如下:

openssl x509 -in aps_developer_identity.cer -inform der -out PushChatCert.pem

openssl pkcs12 -nocerts -out PushChatKey.pem -in Push.p12

Enter Import Password:

MAC verified OK

Enter PEM pass phrase:

Verifying – Enter PEM pass phrase:

把私钥和证书整合到一个.pem文件里:

$ cat PushChatCert.pem PushChatKey.pem > apns.pem

验证证书:

openssl s_client -connect gateway.sandbox.push.apple.com:2195

-cert PushChatCert.pem -key PushChatKey.pem

 

转自:http://blog.csdn.net/czh1986/article/details/8362434

你可能感兴趣的:(消息推送)