Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I wrote a Ruby Gem to accomplish interfacing with the Keychain Access App. It gives examples on how to use the command line program <code>security</code> which is what you can use to script the Keychain.</p> <p>Here is the blogpost describing the gem: <a href="http://procbits.com/2011/10/07/automating-the-mac-os-x-keychain-app-with-ruby/" rel="nofollow">Automating Mac OS X Keychain App</a>.</p> <p>You can browse the source here: <a href="https://github.com/jprichardson/keychain_manager/blob/master/lib/keychain_manager.rb" rel="nofollow">Keychain Manager source code</a>. It'll give you examples on how to use the <code>security</code> command line application.</p> <p>So, to list the keychains, you just do this:</p> <pre><code>security list-keychains </code></pre> <p>Which will output something like this:</p> <pre><code>"/Users/jprichardson/Library/Keychains/login.keychain" "/Users/jprichardson/Library/Keychains/Microsoft_Intermediate_Certificates" "/Library/Keychains/System.keychain" </code></pre> <p>Then you could do something like this:</p> <pre><code>security find-certificate "/Users/jprichardson/Library/Keychains/login.keychain" -c Apple </code></pre> <p>For more help, run:</p> <pre><code>security -? security list-keychains -? security find-certificate -? </code></pre> <p>Read this too: <a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/security.1.html" rel="nofollow">Apple's Man page on Security</a> </p> <p>Hope that helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload