I have on Mac 10.10.1 created certificate and I have in keychain access certificate with private key. On Windows I have to use this and I need .cert and .key file. How to export this certificate to get those two files ? I can export as .pb12 or .cert but cannot export as pair .cert and .key (private key )
Asked
Active
Viewed 1.6k times
2 Answers
9
What kind of certificate do you want to export? You could try to save the certificate as *.p12 file and try one of these solutions: https://www.icts.uiowa.edu/confluence/pages/viewpage.action?pageId=32735365
e.g.
openssl pkcs12 -nocerts -in yourcert.p12 -out yourkey.key

Rene Kann
- 319
- 1
- 5
-
I need certificate which I have created on developer account ( one dev and adhoc ) and I need to get .cer and .key from .p12 file and the copy on windows. – PaolaJ. Dec 01 '14 at 23:07
-
If you did not create the certificate for the signing request on the mac where you want to export it, then there is now private key available. you have to ask the person, who created the developer / distribution cert, to export it for you. if you have the public and private key in your keychain you can easily export it via keychain > file > export objects. then you should be able to extract .key and .cer from the p12 file with the link above. – Rene Kann Dec 01 '14 at 23:14
2
Try using Keychain Access
.
(Finder
> Applications
> Utilities
> Keychain Access
)
Then search for the certification you have created, right click on it and export it:

Nima
- 1,470
- 2
- 17
- 25
-
1that I done but I have problem how to export private key, file with .key extension – PaolaJ. Dec 01 '14 at 22:47
-
Without knowing more details about your particular use case it is difficult to help you. I see an iOS tag but no mention of that in the question. – Nima Dec 01 '14 at 23:07
-
1@Kash; do you know how this can be done via the terminal, and/or via `security`? – cLupus Feb 12 '18 at 15:31