Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ora 10gAS: java.io.IOException: Keystore was tampered with, or password was incorrect

 
sam naqvi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a newbie for security certificates and their application.

I am using Oracle 10gAS and trying on configure SSL on one of its instances. The configuration guide asks to add the required certificate to the trust store.

# Create a backup of the truststore file cacerts, for example, cacerts.bak.
# Execute the following command to add the required certificate to the trust store:

$ORACLE_HOME/jdk/bin/keytool -import -alias <aliasName> -file <root_certificate_file_name> -trustcacerts -v -keystore $ORACLE_HOME/javavm/lib/security/cacerts

when i run this command, i continue to get the following:

Enter keystore password: xxxxxx
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect

I also tried the following and received the same error:

D:\Oracle\Infra1012\jdk\bin>keytool -list -v -keystore %ORACLE_HOME%\javavm\lib\security\cacerts
Enter keystore password: xxxxxx
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect

Can someone help me see where is the problem and how to fix it please?

thank you very much!
 
Duc Vo
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam,

Normally you don't tamper with the existing JRE keystore. What you should do is to
(1) create a new keystore
(2) import the certificate to the new keystore
(3) configure your application to trust the new keystore by setting the system properties "javax.net.ssl.keyStore" and "javax.net.ssl.trustStore" to the location of the new keystore.

Check out the keytool reference here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic