开发者

Convert Keystore - Windows-my to jks

开发者 https://www.devze.com 2023-02-08 10:44 出处:网络
We are using SunMSCAPI to retrieve the current user keyst开发者_运维问答ore as below.. keystore = KeyStore.getInstance(\"Windows-MY\", \"SunMSCAPI\");

We are using SunMSCAPI to retrieve the current user keyst开发者_运维问答ore as below..

keystore = KeyStore.getInstance("Windows-MY", "SunMSCAPI");

We will need to build a JSSE keystore of type JKS/PKCS12 and pass it to an app..

Sort of beginning to understand how this works.. Any help would be appreciated.


Did you try something like

keystore.load(inputStreamFromOriginalFile, password);
KeyStore keystore2 = KeyStore.getInstance("JKS");
for (String name : toIterable(keystore.aliases())) {
    Entry entry = keystore.getEntry(name, protParam);
    keystore2.setEntry(name, entry, protParam);
}
keystore2,store(outputStream, password);

I mean a dump copy of all entries into a new keystore2.

0

精彩评论

暂无评论...
验证码 换一张
取 消