2015年11月19日 星期四

Create iOS Apple Push Services Handshake P12

Reference :
http://stackoverflow.com/questions/12585858/cannot-send-push-notifications-using-javapns-javaapns-ssl-handshake-failure

https://www.sslshopper.com/article-most-common-openssl-commands.html


1. Create Push Certificates in Apple Developer


2.  Download the private key P12 file which use to create APNs certificate from the keychain in mac
     ( mykey.p12 )

3.  Download the certificate from Apple Developer


( developer_identify.cer )


4.  use openSSL to generate the correct p12 file

Convert a DER file (.crt .cer .der) to PEM
openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM


Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM
openssl pkcs12 -nocerts -in mykey.p12 -out mykey.pem


Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)
openssl pkcs12 -export -inkey mykey.pem -in developer_identity.pem -out iphone_dev.p12

沒有留言:

張貼留言