serenity/Tests/LibPDF
Nico Weber 323d76fbb9 LibPDF: Make encrypted object streams work
There were two problems:
1. parse_compressed_object_with_index() parses indirect objects
   without going through Parser::parse_indirect_value(), so
   push_reference() / pop_reference() weren't called.
   Manually call them, both for the indirect object containing
   the object stream and for the indirect object within the
   object stream.
2. The indirect object within the object stream got decrypted
   twice: Once when the object stream data itself got decrypted,
   and then incorrectly a second time when the object data within
   the stream was read. To fix, disable encryption while parsing
   object stream data (since it's already decrypted).

The test is from http://opf-labs.org/format-corpus/pdfCabinetOfHorrors/
which according to readme.md at the same location is CC0.
2023-07-12 17:16:25 +02:00
..
CMakeLists.txt LibPDF: Make encrypted object streams work 2023-07-12 17:16:25 +02:00
complex.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
encryption_nocopy.pdf LibPDF: Make encrypted object streams work 2023-07-12 17:16:25 +02:00
linearized.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
non-linearized.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00
password-is-sup.pdf Tests/LibPDF: Add test for AES-encrypted PDF 2023-07-12 06:28:15 +02:00
TestPDF.cpp LibPDF: Make encrypted object streams work 2023-07-12 17:16:25 +02:00
type1.pdf Tests: Move test PDF files into Tests/LibPDF 2023-01-19 11:50:10 +00:00