You don't need a Mac to do this :-)
For generating PKPass files, you'll need 4 things after this tutorial:
- Certificate Identifier (pass.com.example.www)
- Team Identified (Organizational Unit (OU) in the cert generated by Apple)
- The .p12 file
- The password for the .p12 file
- Login on https://developer.apple.com/account/
- Click Certificates, Identifiers & Profiles
- Click on Identifiers
- On the right, filter to Pass Type IDs
- Register a New Identifier, choose Pass Type IDs
- Enter Description and Identifier
- Finalize by clicking Register
- Go to terminal and generate a private key (.key)
openssl genrsa -out pkpass.key 2048
- Generate a certificate singing request (.csr)
openssl req -new -key pkpass.key -out pkpass.csr
Fill in the fields with your own data but leave Challenge password empty (press Enter).
- On the Developer Portal choose the newly created identifier from the list and click Create Certificate.
- Leave the Certificate name empty and upload the .csr file
- On the next page click Download and save the downloaded
pass.cer
to the folder with the .key and .csr files - Download Apple's root certificate (Apple Worldwide Developer Relations Certification Authority)
wget http://developer.apple.com/certificationauthority/AppleWWDRCA.cer
- Convert .cer files to .pem format
openssl x509 -inform der -in AppleWWDRCA.cer -out AppleWWDRCA.pem
openssl x509 -inform der -in pass.cer -out pass.pem
- Generate the .p12 certificate by using the private key, your certificate and Apple's certificate
openssl pkcs12 -export -clcerts -inkey pkpass.key -in pass.pem -certfile AppleWWDRCA.pem -name "Company Name" -out pkpass.p12
You'll be requested to enter a password. Choose a strong password here. You'll use this password with the .p12 certificate when generating PKPass files.
Please note that the .p12 contains both certificates and a private key as well. Make sure that you distribute it securely to the server that will generate PKPass files and that it is only readable by the PKPass generator application.
- You can check the contents of your newly created .p12 certificate
openssl pkcs12 -in pkpass.p12 -nodes
Please note the OU
field of the first certificate in the output. This is your Team Identifier.
- Create a reminder in your calendar with the expiration date of your certificate.
openssl x509 -in pass.pem -noout -enddate
I just got the Email from Apple about new Certificates:
"... As a reminder, the intermediate certificate updates are now available for the Apple Push Notification service (APNs) and Developer ID.
Apple Worldwide Developer Relations Intermediate Certificate (G4)
APNs SSL certificates are now issued from a new intermediate certificate (Worldwide Developer Relations G4 sub CA) exclusively focused on APNs. Use this certificate to send push notifications to apps (including VoIP), complications, websites on Safari, and Apple Wallet passes. ..."
https://www.apple.com/certificateauthority/
So is your instruction
wget http://developer.apple.com/certificationauthority/AppleWWDRCA.cer
still valid or should I choose a different .cer ?