Still on my to do list...

Sent from a mobile device
Am 05.02.2013 00:07 schrieb "Patel, Gaurav" <gaurav.pa...@amd.com>:

> Was anyone able to reproduce?
>
> I've run the scenario on ServiceMix, Karaf + Camel and FuseESB (linux and
> windows) all to the same effect: no key spec.  I've even tried installing
> Bouncy Castle and the unlimited security policy against my JDK/JRE and not
> putting anything into Karaf/lib/ext and nothing changes.  Should I ask this
> question to the Karaf DL instead of the Camel one?
>
> Gaurav
>
>
> -----Original Message-----
> From: Christian Müller [mailto:christian.muel...@gmail.com]
> Sent: Monday, January 28, 2013 5:30 PM
> To: users@camel.apache.org
> Subject: Re: Camel-Crypto ElGamal encryption works in mvn camel:run but
> not in Karaf/OSGi
>
> I'm trying to reproduce the issue...
>
> Best,
> Christian
>
> On Mon, Jan 28, 2013 at 5:38 PM, Patel, Gaurav <gaurav.pa...@amd.com>
> wrote:
>
> > Karaf version 2.2.10
> > Camel 2.10.3
> >
> > What's odd to me is that a certain types of keys work in Karaf but the
> > other ones do not.  It's not a complete failure where I can't get
> > camel-crypto working on Karaf, just ElGamal keys.
> >
> > Is there a way I can setup debug logging to see what the error is
> > beyond the stack trace?
> >
> > Gaurav
> >
> >
> > -----Original Message-----
> > From: Claus Ibsen [mailto:claus.ib...@gmail.com]
> > Sent: Saturday, January 26, 2013 4:26 AM
> > To: users@camel.apache.org
> > Subject: Re: Camel-Crypto ElGamal encryption works in mvn camel:run
> > but not in Karaf/OSGi
> >
> > Hi
> >
> > You should tell which Karaf version you use.
> > But OSGi can be tricky to get working.
> >
> >
> > On Thu, Jan 24, 2013 at 7:04 PM, Patel, Gaurav <gaurav.pa...@amd.com>
> > 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'.
> > >
> > > 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.j
> > ava:59)
> > at
> > org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncPr
> > ocessorBridge.process(AsyncProcessorConverterHelper.java:61)
> > at
> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe
> > r.java:73)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegate
> > AsyncProcessor.java:99)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn
> > cProcessor.java:90)
> > at
> > org.apache.camel.management.InstrumentationProcessor.process(Instrumen
> > tationProcessor.java:73)
> > at
> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe
> > r.java:73)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegate
> > AsyncProcessor.java:99)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn
> > cProcessor.java:90)
> > at
> > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceI
> > nterceptor.java:91)
> > at
> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe
> > r.java:73)
> > at
> > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(
> > RedeliveryErrorHandler.java:334)
> > at
> > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryEr
> > rorHandler.java:220)
> > at
> > org.apache.camel.processor.RouteContextProcessor.processNext(RouteCont
> > extProcessor.java:45)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn
> > cProcessor.java:90)
> > at
> > org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultC
> > hannel.java:303)
> > at
> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe
> > r.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(RouteCont
> > extProcessor.java:45)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn
> > cProcessor.java:90)
> > at
> > org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWork
> > Processor.java:150)
> > at
> > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProce
> > ssor.java:117)
> > at
> > org.apache.camel.processor.RouteInflightRepositoryProcessor.processNex
> > t(RouteInflightRepositoryProcessor.java:48)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn
> > cProcessor.java:90)
> > at
> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe
> > r.java:73)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegate
> > AsyncProcessor.java:99)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn
> > cProcessor.java:90)
> > at
> > org.apache.camel.management.InstrumentationProcessor.process(Instrumen
> > tationProcessor.java:73)
> > at
> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe
> > r.java:99)
> > at
> > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn
> > cProcessor.java:86)
> > at
> > org.apache.camel.component.jms.EndpointMessageListener.onMessage(Endpo
> > intMessageListener.java:104)
> > at
> > org.springframework.jms.listener.AbstractMessageListenerContainer.doIn
> > vokeListener(AbstractMessageListenerContainer.java:560)
> > at
> > org.springframework.jms.listener.AbstractMessageListenerContainer.invo
> > keListener(AbstractMessageListenerContainer.java:498)
> > at
> > org.springframework.jms.listener.AbstractMessageListenerContainer.doEx
> > ecuteListener(AbstractMessageListenerContainer.java:467)
> > at
> > org.springframework.jms.listener.AbstractPollingMessageListenerContain
> > er.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:32
> > 5)
> > at
> > org.springframework.jms.listener.AbstractPollingMessageListenerContain
> > er.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
> > at
> > org.springframework.jms.listener.DefaultMessageListenerContainer$Async
> > MessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.
> > java:1058)
> > at
> > org.springframework.jms.listener.DefaultMessageListenerContainer$Async
> > MessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContai
> > ner.java:1050)
> > at
> > org.springframework.jms.listener.DefaultMessageListenerContainer$Async
> > MessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
> > tor.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.addSessio
> > nInfo(Unknown
> > Source) ... 46 more Caused by:
> java.security.spec.InvalidKeySpecException:
> > key spec not recognised at
> > org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.eng
> > ineGeneratePublic(Unknown
> > Source) at
> > org.bouncycastle.jcajce.provider.asymmetric.elgamal.KeyFactorySpi.engi
> > neGeneratePublic(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
> > >
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Email: cib...@redhat.com
> > Web: http://fusesource.com
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
> >
> >
> >
>
>
> --
>
>

Reply via email to