Closed jni- closed 4 years ago
Oh, I have more info.
I've traced the code using both files. The difference is that my PGPCompressedData
contains a PGPOnePassSignatureList
next (that works). The buggy file is not signed, it does not contain this packet. Instead, it jumps straight the literal data, which returns the stream itself.
Not sure I understand all of it so far, but it seems that having no signature list packets break it. Not sure how to create a file to isolate this either.
Hope this helps!
I also encountered this issue. Like @jni-, I experienced it with one particular file, but not with others. The file I saw it for was a fairly small (12K) encrypted and signed CSV file. Both the encrypted file and the signer's public key were created using a very old PGP toolkit (v2 I think), which might be relevant. The files that worked were encrypted and signed by me using BouncyGPG.
Describe the bug An error occurs when decrypting some files. It seems caused by a stream closed too early (see additional information)
To Reproduce
Expected behavior File gets decrypted
System (please complete the following information):
Additional context Stacktrace :
I've isolated the breaking commit : https://github.com/neuhalje/bouncy-gpg/commit/012c3f9a14c062de60bb10bfe52c1f01264de899 (reverting to 2.1.2 works)
It seems the stream closes too soon, but I have no idea why it works with some files and not with some others.
It works well with a file I encrypted myself. However, it does not work with the file the provider creates. I have no idea why. I also have no idea how they encrypt it to be honest. I cannot share the file for privacy reasons, however if some info on it can help, let me know.
I'm sorry I can't provide more information! Let me know how I can help more