How to use OpenSSL to create an Apple Pass Type Certificate

You will need an Apple Developer Account to successfully make an Apple Pass Type Certificate.


To use your own certificate for sending Apple Passes using Urban Airship, you will need to first create and upload your own Apple Pass Type certificate to the Urban Airship Reach dashboard.

  1.     Install OpenSSL on your Windows computer. (Go to https://www.openssl.org/source/.)
  2.     Open a Windows command session, and CD to the OpenSSL bin directory (such as c:\OpenSSL\bin).
  3.     Create the private key by entering the following in the command line:
    openssl genrsa -out mykey.key 2048
  4.     Create the CSR file by entering the following in the command line:
    openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj "/emailAddress=yourAddress@example.com, CN=John Doe, C=US"
      Replace the e-mail address, CN (certificate name), and C (country) values with your own.
  5.   Log into your Apple Developer Account and Select Certificates, IDs & Profiles:

    w1.png

  6. Select Pass Type IDs then add a new Pass Type ID by selecting the + in the upper right hand corner:

    w2.png


  7. Enter in your Identifier and select Continue:

    w3.png

  8. Select Done after Registering your new Pass Type ID:

    w4.png

  9. Select your new Pass Type ID from the Pass Type IDs tab to Edit: w5.png


  10. Create a new Production Certificate:

    w6.png

  11. Upload the CSR file from c:\OpenSSL\bin that you created in Step 4:

    w7.png

  12. Download your new certificate and place the .cer file in your c:\OpenSSL\bin folder:

    w8.png
  13. Create a .pem file from your new downloaded certificate by entering the following in the command line in your Windows command session:
    openssl x509 -in pass.cer -inform DER -out pass.pem -outform PEM
  14. Export a .p12 file from the newly created .pem file by using the following command line:
    openssl pkcs12 -export -inkey mykey.key -in pass.pem -out pass.p12
  15. Upload your new .p12 Apple Pass Type Certificate to your Urban Airship Reach Account.

 

Related Content: