How to install Apple Push certificate on Windows server

≯℡__Kan透↙ 提交于 2020-01-11 03:15:08

问题


I need to install the certificate I've downloaded from apple dev portal in order to test the push notification on my Windows server. I searched online a solution but everyone says different things about it, Does anyone has a step by step guide on how to do this?


回答1:


I have also been researching this subject. The following links may be useful to you:

http://loudsoftware.com/?p=186

https://arashnorouzi.wordpress.com/2011/04/01/sending-apple-push-notifications-in-asp-net-%e2%80%93-part-2-generating-apns-certificates/

I finally got this working by following these key points that I managed to get out of those links above. It assumes that you have already created the Apple Push certificates and private keys following "standard apple push" instructions.

On your Mac machine, generate your certificates as follows (credit to arashnorouzi):

Create a PKCS12 format file using open ssl, you will need your developer private key (which can be exported from the keychain) and the CertificateSigningRequest??.certSigningRequest

  1. Convert apn_developer_identity.cer (der format) to pem:

openssl x509 -in apn_developer_identity.cer -inform DER -out apn_developer_identity.pem -outform PEM}

  1. Next, Convert p12 private key to pem (requires the input of a minimum 4 char password):

openssl pkcs12 -nocerts -out private_dev_key.pem -in private_dev_key.p12

  1. (Optional): If you want to remove password from the private key:

openssl rsa -out private_key_noenc.pem -in private_key.pem

  1. Take the certificate and the key (with or without password) and create a PKCS#12 format file:

openssl pkcs12 -export -in apn_developer_identity.pem -inkey private_key_noenc.pem -certfile CertificateSigningRequest??.certSigningRequest -name “apn_developer_identity” -out apn_developer_identity.p12

Now, on your Windows Server do the following (credit to bill at loudsoftware):

  • Copy the above.p12 file to windows server
  • Open mmc.exe and import .p12 file into the “console root -> Certificates(Local Machine)” certificates, and file under “Personal
  • Add permissions to the certificate

In detail:

  • Go to Start > Run
  • Type mmc and press Enter
  • Click on File > Add/Remove Snap-in
  • Select the Certificates snap-in and click Add
  • Select the Computer account option and click Next
  • Select the Local Computer option and click Finish
  • Click OK
  • Expand Certificates > Personal and select the Certificates folder
  • Right-click on Apple Push Notification Service – Client Certificate and select All Tasks > Manage Private Keys
  • On the Security tab for the properties of the certificate, click Add
  • Type Authenticated Users and click Check Name then “OK”
  • Select the Read check box under the Allow column
  • Click Apply then OK


来源:https://stackoverflow.com/questions/29744310/how-to-install-apple-push-certificate-on-windows-server

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