It's not exactly clear how one should guess what was file end before signing, for now assume the followings:
- the file ended with a %%EOF, an optional \r, and a \n- the number of incremental updates is the same as the number of signatures
When the later is not the case, don't attempt to remove the signature.
Change-Id: I203a7b0605fc061ec6aacfde3a8eedc4736379f2 Reviewed-on: https://gerrit.libreoffice.org/30140
5819448 xmlsecurity: implement removal of a signature in pdfverify
xmlsecurity/inc/pdfio/pdfdocument.hxx | 6 +++++
xmlsecurity/source/pdfio/pdfdocument.cxx | 42 +++++++++++++++++++++++++++++-
xmlsecurity/source/pdfio/pdfverify.cxx | 35 +++++++++++++++++++++++--
3 files changed, 80 insertions(+), 3 deletions(-)
Upstream: cgit.freedesktop.org