Exporting a Certificate and Private Key from Keychain

chrisgrange

Registered
I've recently upgraded our web server and wanted to export the SSL certs from our old one to our new one. When I tried to export the certs and keys (as .p12 files) from our old server it kept asking me for a password. No matter which password I put in (including no password) it said that I had entered it incorrectly. The strange thing is that when I created the certificate requests and submitted them to our Cert provider (IPSCA) I did not create a private key password. I can't find any good documentation for certs in Leopard Server. Any ideas?
 

Scoops98

Registered
I've had the same issue with exporting the root certificate. No help from me I'm afraid. Apple's support documents for sever leave much to be desired.
 

chrisgrange

Registered
Solved! Although not the most intuitive solution. You have to run Keychain Access as root. Open up a Terminal window and type:-

sudo /Applications/Utilities/Keychain\ Access.app/Contents/MacOS/Keychain\ Access

Enter your password and keychain will launch. You can now export Certs and private keys. It will still ask you for a password but you can leave it blank.

Hope this helps someone.
 

ajpro

Registered
Thank you! That helped me, after about an hour of staring at my screen and trying all the passwords I could think of.

"Not the most intuitive solution". Hehe. And not explained in the online help either, so thanks again!
 

jim2011

Registered
Thanks for the tip, because I was struggling with this. Launching Keychain Access your way got the job done, and I just dragged the file over to Lion Server's Server.app with the "Edit..." dialog open on the Hardware for my server, Settings pane.
 

Minia

Registered
Hi There

I have try your advise to solve the same issue we are having

but I get this message in Terminal when copy/paste the code you gave us
2012-06-28 14:32:47.488 Keychain Access[226:507] Could not find image named 'ToolbarArrangeByTemplate'.

Then when we tried to export our key, it still does not work

Any idea ? Please help we are struggling with that

Solved! Although not the most intuitive solution. You have to run Keychain Access as root. Open up a Terminal window and type:-

sudo /Applications/Utilities/Keychain\ Access.app/Contents/MacOS/Keychain\ Access

Enter your password and keychain will launch. You can now export Certs and private keys. It will still ask you for a password but you can leave it blank.

Hope this helps someone.
 
Top