For Camel 2.10.3 it's the right dependency.

Sent from a mobile device
Am 29.01.2013 03:27 schrieb "Willem jiang" <willem.ji...@gmail.com>:

> I just checked the dependency of camel-crypto, it just use bcprov-jdk15on
> jar,
>
> <dependency>
> <groupId>org.bouncycastle</groupId>
> <artifactId>bcpg-jdk15on</artifactId>
> <version>${bouncycastle-version}</version>
> </dependency>
> <dependency>
> <groupId>org.bouncycastle</groupId>
> <artifactId>bcprov-jdk15on</artifactId>
> <version>${bouncycastle-version}</version>
> </dependency>
>
>
>
> The version is 1.47.
> I also checked the website[1], it doesn't has the release of
> bcprov-jdk16-xxx.jar.
>
> Can you try to put that on in your lib/ext directly.
>
> [1]http://www.bouncycastle.org/latest_releases.html
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
> (English)
>           http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>
>
> On Friday, January 25, 2013 at 2:04 AM, Patel, Gaurav wrote:
>
> > I have camel 2.10.3 installed and am using the example
> pubring-ElGamal.gpg from
> 'components\camel-crypto\src\test\resources\org\apache\camel\component\crypto'
> in camel-crypto and user 'sd...@nowhere.net (mailto:sd...@nowhere.net)'.
> >
> > When I run the camel route with mvn camel:run, the RSA encryption works
> perfectly as well as the DSA + ElGamal encryption. When I move this exact
> route to Karaf, the RSA encryption continues to work but the DSA + ElGamal
> gives the following stack trace:
> >
> > org.bouncycastle.openpgp.PGPException: exception encrypting session key
> at org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown Source)
> at org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown Source)
> at
> org.apache.camel.converter.crypto.PGPDataFormat.marshal(PGPDataFormat.java:86)
> at
> org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:59)
> at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)
> at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
> at
> org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> at
> org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:117) at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80) at
> org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> at
> org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
> at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
> at
> org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)
> at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:104)
> at
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
> at
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
> at
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
> at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
> at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662) Caused by:
> org.bouncycastle.openpgp.PGPException: exception constructing public key at
> org.bouncycastle.openpgp.PGPPublicKey.getKey(Unknown Source) at
> org.bouncycastle.openpgp.PGPEncryptedDataGenerator$PubMethod.addSessionInfo(Unknown
> Source) ... 46 more Caused by: java.security.spec.InvalidKeySpecException:
> key spec not recognised at
> org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.engineGeneratePublic(Unknown
> Source) at
> org.bouncycastle.jcajce.provider.asymmetric.elgamal.KeyFactorySpi.engineGeneratePublic(Unknown
> Source) at java.security.KeyFactory.generatePublic(KeyFactory.java:298) ...
> 48 more
> >
> > I'm using the jre.properties.cxf (moved to jre.properties) and have this
> in my config.properties:
> > # configure karaf security providers
> > org.apache.karaf.security.providers =
> org.bouncycastle.jce.provider.BouncyCastleProvider
> >
> > # javax.transaction is needed to avoid class loader constraint violation
> when using javax.sql
> >
> org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*,org.bouncycastle*
> >
> > I've also loaded bcprov-jdk16-1.46.jar into lib/ext since I'm using Java
> SDK 1.6.
> >
> > Any suggestions/ideas on what could be wrong?
> >
> > Gaurav
>
>
>

Reply via email to