Hi

Maybe you are hit by FAQ #1
http://www.bouncycastle.org/wiki/display/JA1/Frequently+Asked+Questions

I am not sure though. If you are hit by the key length export
restrictions on the JDK.
Also have you googled that exception and found some answers on that.

And what JDK and OS are  you using? And are you outside US?


On Fri, Oct 26, 2012 at 3:42 AM, Chandra Kalirasa
<ckalir...@seatoncorp.com> wrote:
> Hi:
>
> I am able to encrypt a file with a public key, but when I try to decrypt I am 
> getting the following errors; Is there any additional jars needed?
>
>
>
>
>
> public static void main(String args[]) throws Exception {
>
>         // create CamelContext
>
>         CamelContext context = new DefaultCamelContext();
>
>
>
>         // add our route to the CamelContext
>
>         context.addRoutes(new RouteBuilder() {
>
>             public void configure() {
>
>
>
>           from("file:data/encrypted")
>
>               .unmarshal().pgp("PK2.gpg", "chandra 
> <ckalir...@seatoncorp.com>", "xyz1222")
>
>              .to("file:data/decrypted");
>
>
>
>
>
>             }
>
>         });
>
>
>
>
>
>
>
> ead #1 - file://data/encrypted] DefaultErrorHandler            ERROR Failed 
> delivery for (MessageId: ID-EVG60LT-3-CKALI-56767-1351214887398-0-25 on 
> ExchangeId: ID-EVG60LT-3-CKALI-56767-1351214887398-0-26). Exhausted after 
> delivery attempt: 1 caught: org.bouncycastle.openpgp.PGPException: error 
> setting asymmetric cipher
>
> org.bouncycastle.openpgp.PGPException: error setting asymmetric cipher
>
>       at 
> org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.fetchSymmetricKeyData(Unknown
>  Source)[bcpg-jdk16-1.46.jar:1.46.0]
>
>       at 
> org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.getDataStream(Unknown 
> Source)[bcpg-jdk16-1.46.jar:1.46.0]
>
>       at 
> org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.getDataStream(Unknown 
> Source)[bcpg-jdk16-1.46.jar:1.46.0]
>
>       at 
> org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.getDataStream(Unknown 
> Source)[bcpg-jdk16-1.46.jar:1.46.0]
>
>       at 
> org.apache.camel.converter.crypto.PGPDataFormat.unmarshal(PGPDataFormat.java:114)[camel-crypto-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:57)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)[camel-core-2.10.0.jar:2.10.0]
>
>       at 
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.0.jar:2.10.0]
>
>       at org.apache.camel.processo
>
>
>



-- 
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