• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

IOException: Keystore was tampered with, or password was incorrect

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have created a key pair each for the client and the server side. I then imported the client's public key into the server's keystore. Now, my client-deploy.wsdd looks like this

<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<transport name="http" pivot="java rg.apache.axis.transport.http.HTTPSender"/>
<globalConfiguration >
<requestFlow >
<handler type="java rg.apache.ws.axis.security.WSDoAllSender" >
<parameter name="action" value="UsernameToken Encrypt"/>
<parameter name="user" value="wss4j"/>
<parameter name="passwordCallbackClass" value="com.comp.webservice.PWCallback"/>
<parameter name="passwordType" value="PasswordDigest"/>
<parameter name="addUTElement" value="Nonce Created" />
<parameter name="encryptionPropFile" value="client_crypto.properties" />
<parameter name="encryptionKeyIdentifier" value="X509KeyIdentifier" />
<parameter name="encryptionUser" value="privkey" />
<parameter name="encryptionParts"
value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken" />
</handler>
</requestFlow >
</globalConfiguration >
</deployment>

and my server-deploy.wsdd looks like this

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<service name="SayHelloService" provider="java:RPC">
<requestFlow>
<handler type="java rg.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="action" value="UsernameToken Encrypt"/>
<parameter name="decryptionPropFile" value="server_crypto.properties" />
</handler>
</requestFlow>
<parameter name="className" value="com.comp.webservice.SayHelloService"/>
<parameter name="allowedMethods" value="*"/>
</service>

</deployment>


Everything seems to be right, yet when I run the client, it says

IOException: Keystore was tampered with, or password was incorrect

What am I doing wrong... I'm guessing its a very fundamental mistake that I'm not able to notice. Please help me if you have any clues of how to go about solving this one.

Thanks in advance.
- Neha.
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's either you provided the wrong keystore password or you didn't provide any password at all and your keystore requires a password.

You can try to go to the path where that keystore is located and issue this command.


Hope this helps.
 
Neha Gap
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply.

I generated the keystores and then used them in the crypto.properties file. I'm sure the password is correct, I even checked using the method you just mentioned. Yet i continue to get the same exception.

- Neha.
 
Neha Gap
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anybody seen a similar error? Please let me know.

Thanks
- Neha.
 
Neha Gap
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok the deal is that the keystore is not created correctly. I'm surprised this is so because I created the keys using the keytool as explained in the keytool manual. Even checked using keytool -list on the console, it gave me the expected results.

Anyway, if anyone is facing a similar problem while running a sample app using wss4j, you can try using the .keystore file provided in wss4j/keys

Also, if someone is aware of why I the keys I created using keytool are not being read, please let me know.

Thank you
- Neha.
 
This tiny ad is guaranteed to be gluten free.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic