How can we add imported Developer certificates in Mac can be added to key chain

2

1

I googled a lot for this solution, but couldn't find a proper one. when i try to add imported certificate in key chain by using following

sudo security add-trusted-cert -d -r trustRoot -k “/Library/Keychains/System.keychain” “/private/tmp/certs/certname.cer”

I get an error saying

SecCertificateAddToKeychain: Unknown format in import

In some of my searches i found that certificate may be corrupted while importing from one machine to another. So i used different protocols for file transfer. But that doesn't affected my error. Please some one look in to it and give me a clue to proceed

MacDeveloper

Posted 2014-11-06T13:26:58.037

Reputation: 180

Answers

1

Today i had the same issue, I solved as reported here: link to macrumors

The issue is: The certificate has a key length of 8192 bits, signature algorithm of SHA256RSA. Mac OS won't import CA certs with this lenght, so:

sudo defaults write /Library/Preferences/com.apple.security RSAMaxKeySize -int 8192

and after a reboot I was able to import it.

MiPnamic

Posted 2014-11-06T13:26:58.037

Reputation: 148