diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-19 12:36:37 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-19 16:46:20 +0200 |
commit | e9834a3eaf35a2c7b61cf45c2d64e9f3bbe89982 (patch) | |
tree | d4980546bff3d3d81924fe6848c5e4dc71b68e46 /xmlsecurity/source | |
parent | f7397024fef154f7bedcb844678e1cabba1e5cd8 (diff) |
xmlsecurity: fix the PDF incremental update's cross-references table
The VCL pdf export writes a space after the in-use entry, and turns out
Adobe Acrobat starts to "repair" the file if there is no such space.
Which means the signature is validated against the repaired document,
resulting in a "The signature byte range is invalid" error message,
hiding the root cause.
Not that ISO-32000 7.5.4 "Cross-References Table" would mention the need
for such whitespace at the end of the lines.
Change-Id: I165b57809550f184f374c00f28426a3cd813c63f
Diffstat (limited to 'xmlsecurity/source')
-rw-r--r-- | xmlsecurity/source/pdfio/pdfdocument.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx b/xmlsecurity/source/pdfio/pdfdocument.cxx index 6e807a4d4cb1..ad488cfad762 100644 --- a/xmlsecurity/source/pdfio/pdfdocument.cxx +++ b/xmlsecurity/source/pdfio/pdfdocument.cxx @@ -462,9 +462,9 @@ bool PDFDocument::Sign(const uno::Reference<security::XCertificate>& xCertificat while (aBuffer.getLength() < 10) aBuffer.insert(0, "0"); if (nObject == 0) - aBuffer.append(" 65535 f\n"); + aBuffer.append(" 65535 f \n"); else - aBuffer.append(" 00000 n\n"); + aBuffer.append(" 00000 n \n"); m_aEditBuffer.WriteOString(aBuffer.toString()); } |