Kaydet (Commit) d34a8993 authored tarafından Miklos Vajna's avatar Miklos Vajna

xmlsecurity PDF sign: append reference to the Page's Annots key

Previously we assumed that the Page object's dictionary has no Annots
key. Now detect if that's not true, and in that case don't just copy of
the whole dictionary (as part of the incremental update), instead copy
it in two steps, so we can insert our reference in the middle.

This is needed (but not enough alone) to be able to sign a PDF document
multiple times.

Change-Id: Ia5bf993320428eef80551e7e9cc7bfb2b858db7f
Reviewed-on: https://gerrit.libreoffice.org/30257Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 9b09a217
......@@ -37,7 +37,13 @@ public:
virtual ~PDFElement() { }
};
/// In-memory representation of an on-disk PDF document.
/**
* In-memory representation of an on-disk PDF document.
*
* The PDF element list is not meant to be saved back to disk, but some
* elements remember their source offset / length, and based on that it's
* possible to modify the input file.
*/
class XMLSECURITY_DLLPUBLIC PDFDocument
{
/// This vector owns all elements.
......
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