java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:632)
at java.security.KeyStore.load(KeyStore.java:1150)
Hi all,
My app used to work perfectly connecting via ssl, using certificates. Recently, I updated my computer to jdk1.5.0_06. I then decided to create a new pair of certificates to replace the old ones. And here is where the problems lie. For some reason, java does not like the format!
Here is what I did using keytool:
>keytool -genkey -keystore serverks -keyalg rsa -keysize 2048 -alias server -storepass password -keypass keypasswd
What is your first and last name?
[Server]:
What is the name of your organizational unit?
[Software Development]:
What is the name of your organization?
[www.mysite.com]: www.mysite.com
What is the name of your City or Locality?
[Arizona]:
What is the name of your State or Province?
[CA]:
What is the two-letter country code for this unit?
[AU]:
Is CN=Server, OU=EbayHelper, O=www.mysite.com, L=Arizona, ST=CA, C=AU correct?
[no]: y
keytool -export -alias server -file servercert -keystore serverks
Enter keystore password: password
Certificate stored in file <servercert>
In java, where the program hangs is here:
KeyStore keystore = KeyStore.getInstance("JKS");
keystore.load(new FileInputStream(KEYSTORE), KEYSTOREPW)
It hangs on keystore.load. Anyone know what has happened? What did I miss? Has anything changed since jdk1.4.08?? I've been trying to research with not much luck.
Any assistance is appreciated.