Importing a Self Signed SSL-Certificate into your Mac OS X Keychain
So here's how to import a self signed ssl-certificate into your System's Keychain on OSX in order to not have Safari complain.
Save your certificate (ours is named Certificate.cer) to your Desktop, then in terminal type:
sudo certtool i ~/Desktop/Certificate.cer k=/System/Library/Keychains/X509Anchors d
Here's what the flags mean:
i = import
k=xxx sets the target Keychain to import to
The "d" sets the cert-type to DER - if you have a PEM certificate, just leave the trailing "d" out.
Restart Safari and you're all set.
See "man certtool" for more info.