keystore with no password
843811Nov 22 2001 — edited Dec 18 2001I need to write a ssl application which gets authenticated with a server and sends a request to the server. A keystore was given by the server application developers.
The keystore has no password. So when loading the keystore i gave password as null. But when initializing the KeyManagerFactory , it is not accepting null.
I tried the foll. code
SSLContext ctx=SSLContext.getInstace("TLS","SunJSSE");
KeyManagerFactory kmf=KeyManagerFactory.getInstance("SunX509");
Keystore ks=KeyStore.getInstance("JKS");
ks.load(new FileInputStream("keystorefile",null);
kmf.init(ks,null);
ctx.init(kmf,null,null);
.....
....
I am getting an exception when i use null in KeyManagerFactory initialization.
Any body knows what should i do?
Is there any way to set some password to the keystore.
Thanks.
venkat