This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Ora 10gAS: java.io.IOException: Keystore was tampered with, or password was incorrect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Ora 10gAS: java.io.IOException: Keystore was tampered with, or password was incorrect" Watch "Ora 10gAS: java.io.IOException: Keystore was tampered with, or password was incorrect" New topic
Author

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

sam naqvi
Greenhorn

Joined: Nov 25, 2008
Posts: 1
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

Joined: Nov 20, 2008
Posts: 254
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.


“Everything should be as simple as it is, but not simpler.” Albert Einstein
 
Don't get me started about those stupid light bulbs.
 
subject: Ora 10gAS: java.io.IOException: Keystore was tampered with, or password was incorrect
 
Similar Threads
No trusted certificate found : when opeing a ssl connection from behind the proxy.
Error when signing applet
problem calling a remote webservice [ Algo Error]
How to make JDK trust a Certificate
cacerts password missing