You can use the standard Java keystore API, Bouncy Castle . You can download the Windows-MY keystore, which contains all the certificates stored in the Windows keystore.
KeyStore.getInstance("Windows-MY");
The Windows Key Store reference provides a method for extracting certificates using the KeyStore.getCertificate(String alias) method.
After receiving the certificate, export it to the PKCS12 file.
Vivien barousse
source share