How can you access "other" Keychains in MacOS using Java?

Viewed 886

By default, we have the following items as keychains under MacOS's Keychain Access tool.

  • login
  • Local Items
  • System
  • System Roots

And it seems that out of the box, the Mac has problem dealing with smart card... so I had to install a 3rd party tool, Centify, in order to propagate the certificates from a smart card into Apple's KeyChain. However, this 3rd party tool seems to create a brand new keychain on its own for the inserted smart card. The keychain seems to have the following naming format:

  • PIV-< Name of the cert >

I had been using Java's KeyStore to access the Apple Keychain, but I am unable to access any certificates nor keychain installed by the Centify tool.

Currently I'm accessing the Apple Keychain like this:

KeyStore ks = KeyStore.getInstance("KeychainStore", "Apple");
ks.load(null, null);

And I am able to load and access the certificates that are under login keychain but not the ones imported by Centrify.

Does anyone know the proper way to access other keychains?

1 Answers
Related