Now I got
java.lang.ExceptionInInitializerError
at javax.crypto.Mac.getInstance(DashoA6275)
at
org.apache.xml.security.algorithms.implementations.IntegrityHmac.<init>(
IntegrityHmac.java:77)
at
org.apache.xml.security.algorithms.implementations.IntegrityHmac$Integri
tyHmacSHA1.<init>(IntegrityHmac.java:407)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at
org.apache.xml.security.algorithms.SignatureAlgorithm.<init>(SignatureAl
gorithm.java:73)
at
org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.jav
a:331)
at
org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:
703)
at
org.apache.ws.security.action.SignatureAction.execute(SignatureAction.ja
va:54)
at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:1
92)
at
org.apache.rampart.handler.WSDoAllSender.processBasic(WSDoAllSender.java
:254)
at
org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.ja
va:86)
at
org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:74)
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(OutInAxisOper
ation.java:237)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:202)
at
com.comverse.msp30client.MailServiceStub.Sync(MailServiceStub.java:248)
at
com.comverse.msp30client.MailServiceTest.testSync(MailServiceTest.java:1
87)
at
com.comverse.msp30client.MailServiceTest.main(MailServiceTest.java:369)
Caused by: java.lang.SecurityException: Cannot set up certs for trusted
CAs
at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
... 25 more
Caused by: java.security.PrivilegedActionException:
java.security.InvalidKeyException: Public key presented not for
certificate signature
at java.security.AccessController.doPrivileged(Native Method)
... 26 more
Caused by: java.security.InvalidKeyException: Public key presented not
for certificate signature
at
org.bouncycastle.jce.provider.X509CertificateObject.verify(Unknown
Source)
at javax.crypto.SunJCE_b.c(DashoA6275)
at javax.crypto.SunJCE_b.b(DashoA6275)
at javax.crypto.SunJCE_s.run(DashoA6275)
... 27 more
Exception in thread "main"
Thanx
-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 07 February, 2007 17:38
To: [email protected]
Subject: Re: [Axis2] hmac-sha1 Signature problem
Did you add bouncycastle as a provider in your jre?
(http://www.bouncycastle.org/wiki/display/JA1/Provider+Installation)
On 2/7/07, Tonkikh Maxim <[EMAIL PROTECTED]> wrote:
>
>
>
> 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</signatu
reAlgorithm>
> </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.ja
va:92)
> at
>
org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:74)
> 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(OutInAxisOper
ation.java:237)
> at
>
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:202)
> at
>
com.comverse.msp30client.MailServiceStub.Sync(MailServiceStub.java:248)
> at
>
com.comverse.msp30client.MailServiceTest.testSync(MailServiceTest.java:1
77)
> 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.ja
va:57)
> at
>
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:1
92)
> at
>
org.apache.rampart.handler.WSDoAllSender.processBasic(WSDoAllSender.java
:254)
> at
>
org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.ja
va:86)
> ... 9 more
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services
Developers
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]