summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/pdfio/pdfdocument.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-12-01 14:26:55 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-12-01 19:34:14 +0000
commite84993486b46ed86a8540b985355e82db5559720 (patch)
tree9228b7c0e64fa21f5de8383b73d0ae23e3e92e37 /xmlsecurity/source/pdfio/pdfdocument.cxx
parentdacd0e94199f154cac5875ec06430df6947e251b (diff)
xmlsecurity PDF verify: don't abort read on partial sign
Map it to the partially signed (not all streams) ODF concept instead. Change-Id: I7fc931e622b9f10a1261cd475b01a2f038e37ece Reviewed-on: https://gerrit.libreoffice.org/31497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'xmlsecurity/source/pdfio/pdfdocument.cxx')
-rw-r--r--xmlsecurity/source/pdfio/pdfdocument.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx
index b19a043e9d05..81f8caae8655 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -2212,10 +2212,8 @@ bool PDFDocument::ValidateSignature(SvStream& rStream, PDFObjectElement* pSignat
rStream.Seek(STREAM_SEEK_TO_END);
size_t nFileEnd = rStream.Tell();
if (bLast && (aByteRanges[1].first + aByteRanges[1].second) != nFileEnd)
- {
- SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: second range end is not the end of the file");
- return false;
- }
+ // Second range end is not the end of the file.
+ rInformation.bPartialDocumentSignature = true;
// At this point there is no obviously missing info to validate the
// signature.