diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-26 17:52:28 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-26 20:09:38 +0200 |
commit | f45ace2897dca1dd8f3553e46415df4fe7ad62d8 (patch) | |
tree | fa011862ea3759867b117fdd17615510753a2b41 /xmlsecurity/inc | |
parent | 0b7bc00ae30473a26a5812798a7854511a460310 (diff) |
xmlsecurity PDF signing: fix byte range check for multiple signatures
We can mandate that the byte range end is the end of the file for the
last signature only.
With this, signing a previously unsigned file multiple times works, so
add a matching testcase for that as well.
Change-Id: I8fe5482890fca4dab8da6305aa7fc7f60df612d8
Diffstat (limited to 'xmlsecurity/inc')
-rw-r--r-- | xmlsecurity/inc/pdfio/pdfdocument.hxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx b/xmlsecurity/inc/pdfio/pdfdocument.hxx index 59c7f5dd6079..f42350ac5a20 100644 --- a/xmlsecurity/inc/pdfio/pdfdocument.hxx +++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx @@ -88,8 +88,12 @@ public: /// Serializes the contents of the edit buffer. bool Write(SvStream& rStream); std::vector<PDFObjectElement*> GetSignatureWidgets(); - /// Return value is about if we can determine a result, rInformation is about the actual result. - static bool ValidateSignature(SvStream& rStream, PDFObjectElement* pSignature, SignatureInformation& rInformation); + /** + * @param rInformation The actual result. + * @param bLast If this is the last signature in the file, so it covers the whole file physically. + * @return If we can determinate a result. + */ + static bool ValidateSignature(SvStream& rStream, PDFObjectElement* pSignature, SignatureInformation& rInformation, bool bLast); /// Remove the nth signature from read document in the edit buffer. bool RemoveSignature(size_t nPosition); }; |