Starting fresh install of OS X Server on myserver.example.com running Mountain Lion after having saved the private key, intermediate and public certificates on another computer.
Now I want to replace the key and certs generated by Server app setup for new incarnation of myserver.example.com with the CA-signed ones I backed up previously.
Using Keychain Access app - started from command line sudo when both exporting and importing - imports cert but not key. I don't really want to spend another £35 on a new CA-signed cert relating to new private key.
Key and certs all show in own keychain on backup machine.
- Exported them as .crt file(should have exported as .p12 perhaps?);
- sent .crt file to freshly setup server;
- imported into system keychain before Server app setup to test process / avoid clash with generated key and self-signed cert;
- opening .crt file imports signed cert but not key.
Answer: will create answer when allowed by stackexchange in a few hours
It worked after:
- exporting key and certificate in .p12 file from the backup m/c's keychain - instead of .crt file
- importing the .p12 file from the server's Keychain Access app (started from sudo command line
sudo /Applications/Utilities/Keychain\ Access.app/Contents/MacOS/Keychain\ Access- instead of opening / double-clicking file in Finder (of administrator but not root)
Whether both or one of the above is required I don't know. However we now have original server's private key and related signed certificate.
Next question ... how to avoid this being overridden by Server app setup ... but that's another question!