View Full Version : Exporting a Certificate and Private Key from Keychain
chrisgrange
August 3rd, 2009, 07:24 AM
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
August 3rd, 2009, 09:56 PM
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
August 4th, 2009, 05:42 AM
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
August 14th, 2009, 04:27 PM
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
October 9th, 2011, 01:19 AM
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
June 28th, 2012, 07:56 AM
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.