]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Update RAR5 code to report encryption (#2096)
authorDuncan Horn <40036384+dunhor@users.noreply.github.com>
Fri, 11 Oct 2024 06:25:47 +0000 (23:25 -0700)
committerGitHub <noreply@github.com>
Fri, 11 Oct 2024 06:25:47 +0000 (08:25 +0200)
commit6177e4d0c0886010538bf91eea9bff2d0677baa7
tree9c2a1f591545d39be12f07a9d5cc0074204df994
parente4068fb87cb9cc2f557f65081f505a805fdcdcda
Update RAR5 code to report encryption (#2096)

Currently, the RAR5 code always reports
`ARCHIVE_READ_FORMAT_ENCRYPTION_UNSUPPORTED` for
`archive_read_has_encrypted_entries`, nor does it set any of the
entry-specific properties, even though it has enough information to
properly report this information. Accurate reporting of encryption is
super useful for applications because reporting an error message such as
"the archive is encrypted, but we don't currently support encryption" is
a lot better than a not generally useful `errno` value and a
non-localizable error string with a confusing and unpredictable error
message.

Fixes #1661
13 files changed:
Makefile.am
libarchive/archive_read_support_format_rar5.c
libarchive/test/CMakeLists.txt
libarchive/test/test_read_format_rar4_encrypted.rar.uu [new file with mode: 0644]
libarchive/test/test_read_format_rar4_encrypted_filenames.rar.uu [new file with mode: 0644]
libarchive/test/test_read_format_rar4_solid_encrypted.rar.uu [new file with mode: 0644]
libarchive/test/test_read_format_rar4_solid_encrypted_filenames.rar.uu [new file with mode: 0644]
libarchive/test/test_read_format_rar5_encrypted.rar.uu [new file with mode: 0644]
libarchive/test/test_read_format_rar5_encrypted_filenames.rar.uu [new file with mode: 0644]
libarchive/test/test_read_format_rar5_solid_encrypted.rar.uu [new file with mode: 0644]
libarchive/test/test_read_format_rar5_solid_encrypted_filenames.rar.uu [new file with mode: 0644]
libarchive/test/test_read_format_rar_encryption.c [new file with mode: 0644]
libarchive/test/test_write_format_zip_stream.c