0

I'm trying to export the keychains in Terminal. This is the code I used

security> export -k SystemCACertificates.keychain -t all -f openssl -o goodone.txt

And this is the error I got security: illegal option -- k. Can anyone fix it? :)

0

1 Answer 1

1

You probably copied/pasted the example listed in the man page, which actually is supposed to show how security can be run interactively. To fix, you can do one of the following:

  • Run in interactive mode by executing security -i in Terminal and then just entering export -k SystemCACertificates.keychain -t all -f openssl -o goodone.txt when you get the security> prompt
  • Run security export -k SystemCACertificates.keychain -t all -f openssl -o goodone.txt from the shell
4
  • Now that error went away but a new one came :( This is the new error. security: SecKeychainItemExport: One or more parameters passed to a function were not valid. export: returned 1 Dec 4, 2015 at 19:13
  • Try without some of the parameters to find the one leading to the problem then :-)
    – nohillside
    Dec 4, 2015 at 19:16
  • OK. Now I tried security> export -k SystemCACertificates.keychain And got this error security: SecKeychainItemExport: One or more parameters passed to a function were not valid. export: returned 1 Dec 4, 2015 at 19:35
  • This just leaves the name of the keychain. It might be easier to export directly from Keychain Utility.
    – nohillside
    Dec 4, 2015 at 20:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .