Ok, I've tested this....
1.) Zip the files, Then encrypt the Zip file - this does not work for me.
example:
zip cfi.zip J101_Air_Compressor_2017-01-25-14-01-00.csv
gpg --recipient XXXXXXXXX --encrypt cfi.zip
from(fileEntranceEndpoint).id("cfi.decryption.endpointListenerRoute")
.log("Message received ${file:name}")
.unmarshal(pgpVerifyAndDecrypt).split(new ZipSplitter())
.streaming().convertBodyTo(String.class)
.log("CFI file name: ${file:name}")
.to("file://" + outDirectory);
2.) encrypt a file by itself, - this works
example:
gpg --recipient XXXXXXXXX --encrypt J402_Motor_2017-01-25-14-01-00.csv
J402_Motor_2017-01-25-14-01-00.csv.gpg
from(fileEntranceEndpoint).id("cfi.decryption.endpointListenerRoute")
.log("Encrypted Message received ${file:name}")
.unmarshal(pgpVerifyAndDecrypt)
.convertBodyTo(String.class)
.log("Decrypted file name: ${file:name}")
.to("file://" + outDirectory);
3.) encrypt files, then Zip, - this works
gpg --recipient XXXXXXXXX --encrypt J402_Motor_2017-01-25-14-01-00.csv
J402_Motor_2017-01-25-14-01-00.csv.gpg
zip cfi.zip J402_Motor_2017-01-25-14-01-00.csv.gpg
I run it through two separate routes
1.
from(fileEntranceEndpoint).id("cfi.zipfile.endpointListenerRoute")
.log("Message received zip file: ${file:name}")
.unmarshal(zipFile).split(body(Iterator.class)).streaming()
.log("file names from ZipFile: ${file:name}").to("file://" + outDirectory);
2.
from(fileEntranceEndpoint).id("cfi.decryption.endpointListenerRoute")
.log("Encrypted Message received ${file:name}")
.unmarshal(pgpVerifyAndDecrypt)
.convertBodyTo(String.class)
.log("Decrypted file name: ${file:name}")
.to("file://" + outDirectory);
I am trying to decrypt an encrypted zip file. I can't get this to work with
camel-crypto component
I can't seem to get this to work - decrypting the zip file
from(fileEntranceEndpoint).id("cfi.decryption.endpointListenerRoute")
.log("Message received ${file:name}")
.unmarshal(pgpVerifyAndDecrypt).split(new ZipSplitter())
.streaming().convertBodyTo(String.class)
.log("file name: ${file:name}")
.to("file://" + outDirectory);
undoubtably it is something I am doing, I hope, is it the way I am packaging
the file, is it an incorrect interpretation of how to use it, .. ?
thank you!
--
View this message in context:
http://camel.465427.n5.nabble.com/decrypting-with-PGPDataFormat-tp5793436p5793451.html
Sent from the Camel - Users mailing list archive at Nabble.com.