Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.21.1
-
None
-
This was tested on Windows 10, Java 1.8.191. Using camel core and camel crypto both at 2.21.1.
-
Unknown
Description
I'm trying to use camel-crypto to crypt and decrypt files with PGP.
Right now, I have the following in my XML DSL:
<dataFormats> <pgp id="encrypt" keyFileName="party2public.pgp" keyUserid="party2"/> <pgp id="decrypt" keyFileName="party2private.pgp"/> </dataFormats> <route id="encrypter"> <from uri="file:ToEncrypt"/> <marshal ref="encrypt"/> <to uri="file:Encrypted"/> </route> <route id="decrypter"> <from uri="file:ToDecrypt"/> <unmarshal ref="decrypt"/> <to uri="file:Decrypted"/> </route>
The encryption does work, while the decryption throws an error:
org.bouncycastle.openpgp.PGPException: PGP message is encrypted with a key which could not be found in the Secret Keyring.
I created a repo with the files being used (camel context, PGP private and public keys), that can be viewed here: https://github.com/apoguy/Camel-PGP-Test