views:

92

answers:

1

Hello.

It is possible to write a Java program to read one certificate (getting private and public key) stored in windows certificate store ?

Thanks

+1  A: 

If you are on Java 6, you can use the MSCAPI keystore to read it. Just open your keystore like this,

      KeyStore msCertStore = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
ZZ Coder
Thanks. "Windows-MY" refers to ROOT\Personal. And what if i need to look for certificates in other location, for exemple ROOT\MyOwnFolder ?
Zé Carlos
No. You can't read arbitrary store with MSCAPI keystore. The only other store you can read is "WINDOWS-ROOT".
ZZ Coder