Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Load MSCAPI Java Keystore without loading private keys (hard token)

I would like to load a MSCAPI keystore within Java and examine available certificates in the MY store. However some keys for those certificates reside on hardware tokens and a popup asks for the token during load.

Is there a way to defer loading the private keys when loading the Windows keystore?

keyStore = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
keystore.load(null,null);
like image 794
emsworth Avatar asked Oct 17 '12 15:10

emsworth


1 Answers

This issue has been solved in JDK 9.

https://bugs.openjdk.java.net/browse/JDK-8153438

http://hg.openjdk.java.net/jdk9/dev/jdk/rev/e7f78523d41d

like image 142
Andre Conde Avatar answered Oct 14 '22 17:10

Andre Conde