开发者

Convert Keystore - Windows-my to jks

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜