users@glassfish.java.net

Creating a keystore and truststore for a web service

From: <glassfish_at_javadesktop.org>
Date: Tue, 10 Mar 2009 06:59:24 PDT

Hi all

I have found plenty information regarding configuring webservices to use keystores but not much on creating your own. I have used the following commands to create my keystore truststore pair.

keytool -genkeypair -alias xws-security-server -keysize 1024 -keyalg RSA -keystore server.jks
keytool -genkeypair -alias xws-security-client -keysize 1024 -keyalg RSA -keystore clientstore.jks
keytool -exportcert -alias xws-security-server -keystore server.jks -file server.crt
keytool -importcert -alias xws-security-server -file server.crt -keystore clientstore.jks

When I implement it I get the following error.

Added addressing feature "javax.xml.ws.soap.AddressingFeature_at_72fc1f0e" to port "com.sun.xml.ws.model.wsdl.WSDLPortImpl_at_19f8b008"
JMAC: In PrivateKeyCallback Processor
WSS1913: Key used to decrypt EncryptedKey cannot be null
WSS1927: Error occured while decrypting EncryptedKey
WSITPVD0035: Error in Verifying Security in Inbound Message.
com.sun.xml.wss.impl.WssSoapFaultException: WSS1927: Error occured while decrypting EncryptedKey

Any ideas what I'm doing wrong?
[Message sent by forum member 'waynetg' (waynetg)]

http://forums.java.net/jive/thread.jspa?messageID=336084