axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tonkikh Maxim" <Maxim.Tonk...@comverse.com>
Subject [Axis2] hmac-sha1 Signature problem
Date Wed, 07 Feb 2007 15:20:35 GMT
> Hello Axis2 Team
> 
> We are tiring to build and use generated by AXIS2 code, for HOTMAIL
> MSP 3.0 wsdl
> 
> When I try to configure axis2.xml to use hmac-sha1 signature algorithm
> 
> 
> 	<parameter name="OutflowSecurity">
> 		<action>
> 			<items>Signature</items>
> 			<user>gene</user>
> 	
> <passwordCallbackClass>com.comverse.msp30client.PWCallback</passwordCa
> llbackClass>
> 	
> <signaturePropFile>security.properties</signaturePropFile>
> 	
> <signatureAlgorithm>http://www.w3.org/2000/09/xmldsig#hmac-sha1</signa
> tureAlgorithm>
> 		</action>
> 	</parameter>
> 
> security.properties file is:
> org.apache.ws.security.crypto.provider=org.apache.ws.security.componen
> ts.crypto.Merlin
> org.apache.ws.security.crypto.merlin.keystore.type=jks
> org.apache.ws.security.crypto.merlin.keystore.password=mykeystorepassw
> ord
> org.apache.ws.security.crypto.merlin.file=mykeys.jks
> 
> Key is
> keytool -genkey -alias gene -keyalg DSA  -keysize 512 -keystore
> mykeys.jks
> 
> I got the following Exception
> 
> Thanx
> Maxim
> 
> WSDL file:   <<mailservice.wsdl>> 
> 
> org.apache.axis2.AxisFault: WSHandler: Signature: error during message
> procesingorg.apache.ws.security.WSSecurityException: Signature
> creation failed; nested exception is: 
> 	org.apache.xml.security.signature.XMLSignatureException: Sorry,
> you supplied the wrong key type for this operation! You supplied a
> sun.security.provider.DSAPrivateKey but a javax.crypto.SecretKey is
> needed.
> Original Exception was
> org.apache.xml.security.signature.XMLSignatureException: Sorry, you
> supplied the wrong key type for this operation! You supplied a
> sun.security.provider.DSAPrivateKey but a javax.crypto.SecretKey is
> needed.; nested exception is: 
> 	org.apache.ws.security.WSSecurityException: WSHandler:
> Signature: error during message
> procesingorg.apache.ws.security.WSSecurityException: Signature
> creation failed; nested exception is: 
> 	org.apache.xml.security.signature.XMLSignatureException: Sorry,
> you supplied the wrong key type for this operation! You supplied a
> sun.security.provider.DSAPrivateKey but a javax.crypto.SecretKey is
> needed.
> Original Exception was
> org.apache.xml.security.signature.XMLSignatureException: Sorry, you
> supplied the wrong key type for this operation! You supplied a
> sun.security.provider.DSAPrivateKey but a javax.crypto.SecretKey is
> needed.
> 	at
> org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.
> java:92)
> 	at
> org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:7
> 4)
> 	at org.apache.axis2.engine.Phase.invoke(Phase.java:382)
> 	at
> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655)
> 	at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOp
> eration.java:237)
> 	at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxi
> sOperation.java:202)
> 	at
> com.comverse.msp30client.MailServiceStub.Sync(MailServiceStub.java:248
> )
> 	at
> com.comverse.msp30client.MailServiceTest.testSync(MailServiceTest.java
> :177)
> 	at
> com.comverse.msp30client.MailServiceTest.main(MailServiceTest.java:359
> )
> Caused by: org.apache.ws.security.WSSecurityException: WSHandler:
> Signature: error during message
> procesingorg.apache.ws.security.WSSecurityException: Signature
> creation failed; nested exception is: 
> 	org.apache.xml.security.signature.XMLSignatureException: Sorry,
> you supplied the wrong key type for this operation! You supplied a
> sun.security.provider.DSAPrivateKey but a javax.crypto.SecretKey is
> needed.
> Original Exception was
> org.apache.xml.security.signature.XMLSignatureException: Sorry, you
> supplied the wrong key type for this operation! You supplied a
> sun.security.provider.DSAPrivateKey but a javax.crypto.SecretKey is
> needed.
> 	at
> org.apache.ws.security.action.SignatureAction.execute(SignatureAction.
> java:57)
> 	at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java
> :192)
> 	at
> org.apache.rampart.handler.WSDoAllSender.processBasic(WSDoAllSender.ja
> va:254)
> 	at
> org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.
> java:86)
> 	... 9 more
> 

Mime
View raw message