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



Reply via email to