Convert .cer to .p12

Michael Schwartz picture Michael Schwartz · Aug 23, 2016 · Viewed 117.6k times · Source

I'm working on a project for a client. I have two .cer files (developer and distribution) both are loaded into Keystore Access on Mac OS X. However I'm unable to export as a .p12 file.

ui

Alternatively I tried OpenSSL but still no luck...

openssl pkcs12 -export -in followMe_ios_development.cer -out followMe_ios_development.p12 -clcerts -nokeys

How can I export this .cer file as a .p12 so I can compile this app for iOS?

Answer

buguibu picture buguibu · Jun 22, 2017

What works for me dealing with Push Notification certifies has been:

  1. Open the certificate: open my_filename.cer and click "View Certificates" to see the certificate's name
  2. Go to Applications -> Utilities -> Keychain Access
  3. Ensure you have selected the "login" keychain, not the "system" one (thanks to @Matt Flettcher )
  4. Go to "Certificates"
  5. Look for the desired certificate
  6. Ensure that you can expand it and see under it the original ".certSigningRequest" used to generate the certificate
  7. At this moment you should be able to export it as ".p12"