Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export development certificate as p12

I downloaded a personal development certificate from the Apple Developer center and imported it to my keychain. Now, I want to export it as a .p12 file and encrypt it with a password. When I right click the certificate in the Keychain tab Certificates, and press the Export button, the .p12 option is not highlighted/available. Instead of the other 3 options (.cer, .pem, .p7b), which are available.

I tried a couple of things yet, like adding the Apple ID, which was used to create the certificate, to System preferences->Users and Groups->My account, but that didn't solve it. The certificate was created on a different Macbook than I'm using now.

Is it possible to export it as a .p12 in any way?

like image 746
Tomzie Avatar asked Feb 19 '13 09:02

Tomzie


People also ask

How do I export my p12 certificate?

In the File Name to Backup window, go to where you want to save your code signing certificate (w/private key) . p12 file, provide a file name (i.e. myCodeSigningCertificate), and then click Save. Make sure to save the . p12 file in a location that you will remember and to which you have permissions.


2 Answers

One point of interest: the Keychain Assistant window has a "Category" list in the lower part of the left panel. You can only export a p12 from the "Certificates" view.

In the "All" view, you can see the certificates and the keys alongside, so that they're distinct items with no possibility of multiple selection; in the Certificates view, there's a tree structure with keys as child items of certificates, so that selecting a certificate implicitly selects the corresponding private key too.

like image 150
Seva Alekseyev Avatar answered Oct 23 '22 23:10

Seva Alekseyev


The missing .p12 option means that you only have either the private key or the certificate on your machine. You need both of these to generate a .p12 (and incidentally, you'll need both the private key and certificate to sign your apps).

So, find out which of these you're missing, add the missing piece to Keychain, and the .p12 option will be available.

like image 26
tom Avatar answered Oct 23 '22 23:10

tom