Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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
share|improve this answer
    
+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. –  Charles Stewart Feb 24 '10 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"! –  Charles Stewart Feb 24 '10 at 17:48
    
Accepted: my problem isn't solved, and I may be asking another, similar question, but this definitely imrpoved matters.... –  Charles Stewart Mar 3 '10 at 14:01

To trust the root certificate, use:

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.