-
Notifications
You must be signed in to change notification settings - Fork 997
Closed
Description
Steps to reproduce
call
var zipFile = new ZipFile(@"AES.zip")
{
Password = password
};
Assert.That(zipFile.TestArchive(false), Is.True, "Zip file should be valid");
On an AES encrypted zip file (happens with files generated with both SharpZipLib and 7-Zip).
Expected behavior
I assume that the test should pass for a valid AES archive?
Actual behavior
TestArchive returns false.
Looks like it fails @ https://github.com/icsharpcode/SharpZipLib/blob/master/src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs#L1207 because the flags are different (localFlags just has the encrypted bit set, whereas entry.Flags has the StrongEncryption bit set I think).
If it gets past that, it will also fail on the compression method comparison, as entry.CompressionMethod is the compression format (Deflate), but compressionMethod is 99 (WinZipAES).
Version of SharpZipLib
1.1.0
Obtained from (only keep the relevant lines)
- Compiled from source, commit: 25ee644