Files
loongoffice/package
Michael Stahl 6e76e8a210 tdf#162841 package: fix loading AES-GCM encrypted macros from ODF
The problem is that ZipPackageStream::GetEncryptionData() doesn't handle
the checksum correctly; what is required here is *no checksum* but the
check of m_oImportedChecksumAlgorithm results in calling
m_rZipPackage.GetChecksumAlgID() instead, so it ends up in invalid
situation and assert:

  package/source/zippackage/ZipPackageStream.cxx:656: virtual bool ZipPackageStream::saveChild(): Assertion `xEncData->m_nEncAlg != xml::crypto::CipherID::AES_GCM_W3C' failed.

Refactor this so all the imported algorithm identifiers are in a struct
in a std::optional member.

(regression from commit 09f23a3dc5cd571df347cba9b003195de35f3ddd)

Change-Id: I4b705520cd9bc800ce3c8611f8ad01a1e1008929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173342
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-09-16 19:09:44 +02:00
..

ZIP Support

Reading and writing ZIP files.