My question is identical to Import certificates into the System Keychain via the command line except I need a way to get an existing certificate in the form of a crt file via terminal.
Asked
Active
Viewed 15 times
1 Answers
1
You can search for certificates in pem format (which is the same thing as what's in the crt file) using the security module:
% security find-certificate -c RCA -p
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
In this example I'm searching for a certificate that matches the pattern "RCA".
Once you have this stdout you can use it as you wish.
notacorn
- 121