-
Miklos Vajna yazdı
This is a combination of 6 commits: 1) xmlsecurity PDF verify: look for the signingCertificateV2 attribute This is a required part of the PAdES spec, but so far we only wrote it. As a start just expose if the attribute exists or not. (cherry picked from commit bef9ba5e) 2) xmlsecurity: don't write unchanged signatures back to the file It's not useful, OTOH it can happen that something goes wrong and the result does not match the original. One situation when this can happen is when non-XAdES signatures are read, but the checkbox to write XAdES signature is enabled. (cherry picked from commit 7226ee05) 3) xmlsecurity PDF verify: support non-detached signatures And a couple of other changes to accept the bugdoc from <https://github.com/esig/dss/ dss-pades/target/test-classes/plugtest/esig2014/ESIG-PAdES/RO/Signature-P-RO-4.pdf>. (cherry picked from commit 055fd587) 4) xmlsecurity PDF verify: tolerate missing %%EOF in incremental updates This is broken, but work it around to avoid an infinite loop. (cherry picked from commit 0233ff95) 5) xmlsecurity PDF verify: CR is also a terminator of a comment If we skip to the first NL, then we start tokenizing some XML as PDF data and soon error out due to an unexpected keyword. (cherry picked from commit 9b526a43) 6) xmlsecurity PDF verify: handle boolean type as dictionary value This caused not finding the length of a stream -> could not actually verify signature. (cherry picked from commit c623a9f8) Change-Id: I696b6da49525eb53f7575c27f619d2116be51f1d Reviewed-on: https://gerrit.libreoffice.org/31503Tested-by:
Jenkins <ci@libreoffice.org> Reviewed-by:
Miklos Vajna <vmiklos@collabora.co.uk>
1a567a54