So I've run into an issue that is driving me batty... I run the standard terminal command:
security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain /path/to/cert.cer
and I get:
SecTrustSettingsSetTrustSettings: One or more parameters passed to a function were not valid.
If I go to keychain access, it added the cert... but not as "Always Trust". Which is essential for this cert. It's set to use system defaults and just says "This root certificate is not trusted."
I have re-exported the cert from the windows server and I get the same thing every time. No matter what, it won't import as Always Trust.
Any ideas folks?
Additional note... when I go to delete the imported cert from keychain manager it throws up an error that says:
"An invalid record was encountered."
I have to restart Keychain Access 1 or 2 more time for it to allow me to delete it.