Closed philipp-H closed 2 years ago
Hi,
Thanks for this, and for submitting replicable tests :)
I'll have a look into this when I get a chance but it's probably a bug with how I'm verifying files rather than your implementation.
I've just pushed out v5.4.0 which should hopefully fix this.
Hello mattosaurus,
Sorry for the delayed response. I have been busy with unrelated things the past week. I still have the problem with the corrupted files, even after I updated the NuGet package to 5.4.0.
Maybe I am missing something, but I didn't find any commits/changes regarding the VerifyAsync method https://github.com/mattosaurus/PgpCore/blob/314d47b9d3f610e060b465234b5fa822a7585f90/PgpCore/PGP.cs#L4727.
I created a repo for the unit test that you can checkout: https://github.com/philipp-H/PgpCore.VerifyFile
Best regards.
Looks like I overwote these changes with the other PR. They should be fixed in 5.5 now.
Versions: PgpCore: 5.3.2 Portable.BouncyCastle : 1.9.0 .Net Framework 4.8
I just started using this library. Maybe I'm doing something wrong. I want to do the following:
I created the following UnitTest to verify my use case. The problem occurs in the method VerifyFile_BadContent. In this method I'm changing the content of the signed file and run the VerifyFile method which still returns true. The same happens with VerifyFile_BadHeader and VerifyFile_BadTrailing.
As far as I can tell, this should not happen. I used cyberchef and gpg on linux to test my findings and both return errors.
To verify, just run the tests in the order listed.
Unit Test: