Home Forums OS X Server and Client Discussion Questions and Answers Root cert import & trust in Leopard

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #370353
    gilburns
    Participant

    Does anyone know if there is a way to specify the trust of a certificate in Leopard through the command line?

    Perviously under Tiger you could use certtool to import the root cert into the X509Anchors, Under Leopard Apple says they should go into the System.keychain. If I import the cert into the SystemRootCertificates.keychain or the System.keychain with certtool, it remains untrusted. I need to be able to change the trust in addition to importing it.

    Thanks!

    #370933
    gilburns
    Participant

    Answering my own question.

    The security command-line tool has additional options on Leopard.

    To add an additional root cert do this:

    /usr/bin/security add-trusted-cert -d -r trustRoot -k “/Library/Keychains/System.keychain” “/path/to/your/rootcert.pem”

    To add an intermediate/issuing cert do this:

    /usr/bin/security add-trusted-cert -d -r trustAsRoot -k “/Library/Keychains/System.keychain” “/path/to/your/issuingcert.pem”

    #370941
    khiltd
    Participant

    I’ve found the security tool to be broken to the point of nigh-uselessness on Leopard. It almost seems as though it was not updated to support any of the new features of Security.framework and is still heavily reliant upon now deprecated functions.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Comments are closed