There was a problem with the PAdES signing code sample. #204
-
I have tested this code from Document Load signer key material from PKCS#12 fileThis assumes that any relevant intermediate certs are also includedin the PKCS#12 file.signer = signers.SimpleSigner.load_pkcs12( Set up a timestamping client to fetch timestamps tokenstimestamper = timestamps.HTTPTimeStamper( Settings for PAdES-LTAsignature_meta = signers.PdfSignatureMetadata( with open('test.pdf', 'rb') as inf: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Hi @projackRK, this is a standard safety measure to disallow signing hybrid xref files by default, since those files can be parsed in more than one way, leading to ambiguity (and therefore potential security issues). Unfortunately, some software still regularly produces such files (MS Word, for example). If you don't care about this, simply pass (I should probably reword that error message to make that a bit more obvious) |
Beta Was this translation helpful? Give feedback.
Hi @projackRK, this is a standard safety measure to disallow signing hybrid xref files by default, since those files can be parsed in more than one way, leading to ambiguity (and therefore potential security issues). Unfortunately, some software still regularly produces such files (MS Word, for example). If you don't care about this, simply pass
strict=False
to theIncrementalPdfFileWriter
.(I should probably reword that error message to make that a bit more obvious)