create p12 certificate in windows for apple push notification

心不动则不痛 提交于 2019-12-12 18:28:09

问题


I'm doing push notification (server side) for iPhone in c#. I have "developer_Push_SSL_certi.cer" file.

  1. How can i create .p12 certificate from .cer file? or i have to install the above .cer file in my PC?
  2. what is the required file to send push notifications in server side(c#).

Please guide me guys, what is the certification process required for APN (server side) in windows.


回答1:


First install this new certificate (developer_Push_SSL_certi.cer) to your Mac.

Then open KeyChain Access and navigate to Keys from left menu. Find your development certificate.

Expand your certificate you will see both Private and Public lines and right click "Private" one, export this certificate with a password.

Thats enough for sending notifications from windows.




回答2:


You dont need a mac to convert the certificate just use OpenSSL (http://www.openssl.org)

here are the commands

$ openssl x509 -in cert.cer -inform DER -outform PEM -out cert.pem
$ openssl pkcs12 -in key.p12 -out key.pem -nodes
$ openssl pkcs12 -export -inkey key.pem -in cert.pem -out certName.p12


来源:https://stackoverflow.com/questions/14557028/create-p12-certificate-in-windows-for-apple-push-notification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!