aspose file tools
The moose likes Security and the fly likes Unable to use JKS type - Please help Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » Security
Reply Bookmark "Unable to use JKS type - Please help" Watch "Unable to use JKS type - Please help" New topic
Author

Unable to use JKS type - Please help

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi All,

Below are the entries %JAVA_HOME%\jre\lib\security\java.security file and I am using java
version 1.4.2_04

security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider
security.provider.2=sun.security.provider.Sun
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
security.provider.4=com.sun.rsajca.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider

When I run the commands "keytool -list" or "keytool -list -storetype JKS" on my dos prompt I am getting below error :
keytool error: java.io.IOException: Invalid keystore format

And when I the command "keytool -list -storetype JCEKS" I am getting below output :
Keystore type: JCEKS
Keystore provider: SunJCE
Your keystore contains 0 entries


There is some java file given by some third party (actually it is dsig.SampleSign2 that comes bundled with IBM XML Security Suite) that uses the below line in its code :
KeyStore keystore = KeyStore.getInstance("JKS");


And so in accordance with the above JKS keystore type used I want to update the default .keystore with my newly generated certificate and so when I apply the command

keytool -genkey -dname "CN=Doug Tidwell, OU=developerWorks, O=IBM, L=Research Triangle Park, S=North Carolina, C=US" -keypass changeit -storepass changeit -alias xss4j1

I am getting below error message :

keytool error: java.io.IOException: Invalid keystore format



Can anyone please help me. What am I doing wrong here ...



Thanks & Regards,
Kumar.


RR Kumaran
SCJP 1.4
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Unable to use JKS type - Please help
 
Similar Threads
Keystore and Encryption
SSLHandshakeException
PFX file not getting imported into keystore
Connecting to LDAP server using SSL
Invalid keystore format error