3

I'd like to tell Macos 10.4 Mail that it can trust a self-signed SSL certificate for an IMAP+SMTP/SSL connection to a mail server I run, so that Mail does not complain each time I fetch mail.

Can this be done?

2 Answers 2

2

So this is how I add a Verisign intermediate cert to my desktops. I think the same would work for your self-signed cert. I put the file in /Library/Management/Certs/ on my target machines and then run the below script on them. That adds the cert to the system keychain.

#!/bin/sh

/usr/bin/security add-certificates -k /Library/Keychains/System.keychain /Library/Management/Certs/VeriSign\ Class\ 3\ Secure\ Server\ CA.cer

exit
3
  • +1 for directing me to security. I haven't got this to work yet: I have, so far, not generated a "DER encoded X509" representation of my certificate. FWIW, Macos 10.4 does not have a /Library/Management directory, but this should not matter. Feb 24, 2010 at 15:17
  • Well, fancy that. I should have said I was prompted twice with Are You Sure messages before downloading mail. openssl x509 -inform PEM -outform DER allows me to add the certificate to System.keychain, and the first of the worried dialogs vanishes. But the second is still there, complaining "The root certificate for this server could not be verified"! Feb 24, 2010 at 17:48
  • Accepted: my problem isn't solved, and I may be asking another, similar question, but this definitely imrpoved matters.... Mar 3, 2010 at 14:01
1

To trust the root certificate, use:

sudo /usr/bin/security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain cacert.cer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .