security - Java Applet Windows-MY keystore PrivateKey getEncoded is null -
according understanding of documentation there should possbile access microsoft windows keystore service "windows-my"
.
when load privatekey keystore null
privatekey.getencoded().
how can access privatekey windows keystore?
trying access with:
keystore ks = keystore.getinstance("windows-my"); ks.load(null); privatekey privatekey = (privatekey) ks.getkey("mykeyalias", null); system.out.println("privatekey:" + privatekey)); system.out.println("getencoded:" + privatekey.getencoded());
output i'm getting:
privatekey:rsaprivatekey [size=2048 bits, type=exchange, container=mykeyalias] getencoded:null
using jre 1.8 , tested win7 , 8.1
the mscapi not seem support private key export.
first of key.getencoded()
javadoc specifies:
returns key in primary encoding format, or null if key not support encoding.
and if @ source code of java crypto provider mscapi, getencoded()
method returns null
in cases.
Comments
Post a Comment