Hi There has been some improvements to this component recently I think.
Is the code your patched from what Camel version? On Thu, Jan 16, 2014 at 8:19 PM, hshicx <hs-...@hicxsolutions.com> wrote: > Hi, > > I have identified two possible issues with the decryption using PGPFormat > or with the way I have been using it. > > *Issue 1:* > PGPFormat unmarshalling seems to not work when the body is of type > *org.apache.camel.component.file.GenericFile* which is what the camel-file > producer is providing. The converted input stream which is in turn wrapped > by BCPGInputStream is returning the wrong packet tag. I had to convert the > body to File for the unmarshalling to work > *eg: > "from('file://.....').convertBodyTo(java.io.File.class).unmarshal(pgpFmt)"* > > *Issue 2:* > The PGPFormat unmarshalling seems to look for the master private key only, > when looking for a valid keyId. The certificate I am using has a > PGPSecretKeyRing with multiple keys. I think a better approach would be to > use PGPSecretKeyRingCollection.getSecretKey(keyid). > > After modifying PGPDataFormatUtil.java accordingly (attached), decryption > worked as expected. > > PGPDataFormatUtil.java > <http://camel.465427.n5.nabble.com/file/n5746098/PGPDataFormatUtil.java> > > I'd appreciate any feedback in case if I missing something. > > Thanks, > Hs > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/PGP-decryption-from-File-route-tp5746035p5746098.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io