You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by mtim <mt...@gmail.com> on 2005/09/20 19:41:53 UTC

JVM 1.4 - 1.5 interop problem

Hello, 

I just downloaded WSS4J (1.1.0), tried the sample and I could encrypt
and sing the request on both sides (client and service). But when  I
use JVM 1.4 (1.4.2_05-b04) on the client side and JVM 1.5 (1.5.0-b64)
on the service side I'm getting the following exception:

java.io.IOException: exception unwrapping private key -
java.security.InvalidKeyException: Illegal key size
        at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.unwrapKey(JDKPKCS12KeyStore.java:567)
        at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(JDKPKCS12KeyStore.java:824)
        at java.security.KeyStore.load(KeyStore.java:1150)
        at org.apache.ws.security.components.crypto.Merlin.load(Merlin.java:527)
        at org.apache.ws.security.components.crypto.Merlin.<init>(Merlin.java:119)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:117)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:101)
        at org.apache.ws.security.handler.WSHandler.loadSignatureCrypto(WSHandler.java:400)
        at org.apache.ws.security.handler.WSHandler.decodeSignatureParameter2(WSHandler.java:845)
        at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:147)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)


On the service side I use Bouncy Castle 1.29 for 1.5 -
bcprov-jdk15-129.jar, which I put in <java-_home15>/jre/lib/endorsed.

Any ideas ?

Best regards,
Timour

---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: JVM 1.4 - 1.5 interop problem

Posted by Werner Dittmann <We...@t-online.de>.
Timour,

could it be that 1.5 does not have the unlimited security policy file
jar installed? Just an idea - AFAIK we've never tested with 1.5

Regards,
Werner

mtim wrote:
> Hello, 
> 
> I just downloaded WSS4J (1.1.0), tried the sample and I could encrypt
> and sing the request on both sides (client and service). But when  I
> use JVM 1.4 (1.4.2_05-b04) on the client side and JVM 1.5 (1.5.0-b64)
> on the service side I'm getting the following exception:
> 
> java.io.IOException: exception unwrapping private key -
> java.security.InvalidKeyException: Illegal key size
>         at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.unwrapKey(JDKPKCS12KeyStore.java:567)
>         at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(JDKPKCS12KeyStore.java:824)
>         at java.security.KeyStore.load(KeyStore.java:1150)
>         at org.apache.ws.security.components.crypto.Merlin.load(Merlin.java:527)
>         at org.apache.ws.security.components.crypto.Merlin.<init>(Merlin.java:119)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:117)
>         at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:101)
>         at org.apache.ws.security.handler.WSHandler.loadSignatureCrypto(WSHandler.java:400)
>         at org.apache.ws.security.handler.WSHandler.decodeSignatureParameter2(WSHandler.java:845)
>         at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:147)
>         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>         at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
>         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
>         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
> 
> 
> On the service side I use Bouncy Castle 1.29 for 1.5 -
> bcprov-jdk15-129.jar, which I put in <java-_home15>/jre/lib/endorsed.
> 
> Any ideas ?
> 
> Best regards,
> Timour
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: JVM 1.4 - 1.5 interop problem

Posted by Werner Dittmann <We...@t-online.de>.
Timour,

could it be that 1.5 does not have the unlimited security policy file
jar installed? Just an idea - AFAIK we've never tested with 1.5

Regards,
Werner

mtim wrote:
> Hello, 
> 
> I just downloaded WSS4J (1.1.0), tried the sample and I could encrypt
> and sing the request on both sides (client and service). But when  I
> use JVM 1.4 (1.4.2_05-b04) on the client side and JVM 1.5 (1.5.0-b64)
> on the service side I'm getting the following exception:
> 
> java.io.IOException: exception unwrapping private key -
> java.security.InvalidKeyException: Illegal key size
>         at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.unwrapKey(JDKPKCS12KeyStore.java:567)
>         at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad(JDKPKCS12KeyStore.java:824)
>         at java.security.KeyStore.load(KeyStore.java:1150)
>         at org.apache.ws.security.components.crypto.Merlin.load(Merlin.java:527)
>         at org.apache.ws.security.components.crypto.Merlin.<init>(Merlin.java:119)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:117)
>         at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:101)
>         at org.apache.ws.security.handler.WSHandler.loadSignatureCrypto(WSHandler.java:400)
>         at org.apache.ws.security.handler.WSHandler.decodeSignatureParameter2(WSHandler.java:845)
>         at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.java:147)
>         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>         at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
>         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
>         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
> 
> 
> On the service side I use Bouncy Castle 1.29 for 1.5 -
> bcprov-jdk15-129.jar, which I put in <java-_home15>/jre/lib/endorsed.
> 
> Any ideas ?
> 
> Best regards,
> Timour
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org