Commit 2d011c2a authored by Yuki Awano's avatar Yuki Awano Committed by Commit Bot

zip_archiver: enable decryption of password protected zip

- Note that AES is still NOT supported.

      password protected zip.

Bug: 359837
Test: Enable --enable-zip-archiver-on-file-manager flag. Try to open a
Change-Id: I52435d7cf027a14a0c95b84a6f3f81116d528f85
Reviewed-on: https://chromium-review.googlesource.com/569321Reviewed-by: default avatarTomasz Mikolajewski <mtomasz@chromium.org>
Commit-Queue: Yuki Awano <yawano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486233}
parent 3b3cf0c8
......@@ -329,12 +329,8 @@ bool VolumeArchiveMinizip::SeekHeader(const std::string& path_name) {
// If the archive is encrypted, the lowest bit of raw_file_info.flag is set.
// Directories cannot be encrypted with the basic zip encrytion algorithm.
if (((raw_file_info.flag & 1) != 0) && !is_directory) {
// Currently minizip in third_party doesn't support decryption, so we just
// take encrypted zip files as unsupported.
set_error_message(volume_archive_constants::kArchiveNextHeaderError);
return false;
// const char* password = volume_archive_functions::GetPassphrase(this);
// open_result = unzOpenCurrentFilePassword(zip_file_, password);
const char* password = volume_archive_functions::GetPassphrase(this);
open_result = unzOpenCurrentFilePassword(zip_file_, password);
} else {
open_result = unzOpenCurrentFile(zip_file_);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment