I'm using itext 7.0.4 to sign/verify pdf documents. Currently itext sharp doesn't have a straightful way to detect if the pdf was modified between two signatures. So I'm going to write my own logic to check the pdf objects between two revisions. But I don't know what kind of pdf objects could make the pdf as modifed and then make previous signatures invalid. In some valid pdf documents, there are PdfArray, PdfDictionary (with name of BaseFont, CRL, CRLs, Differences, Filter etc) could appears between signatures but doesn't invalid any signatures. Could anyone please help me figure out any resources or link to find those pdf object out? Or if there is a better way to do this?
Here is an example of valid changes between two signatures:
525 0 obj
<</CRLs 526 0 R/Certs 527 0 R/OCSPs 528 0 R/VRI 529 0 R>>
endobj
526 0 obj
[534 0 R]
endobj
527 0 obj
[537 0 R 538 0 R 539 0 R 540 0 R]
endobj
528 0 obj
[536 0 R]
endobj
529 0 obj
<</45626735E12B29DB8AB3D77B75A72561ACAEC391 530 0 R/5A499B4A1F0078D41C99B268F1307FC122AD1FAB 531 0 R/CCE015E4A68CE20FF14004F17BECD86482CB395F 532 0 R>>
endobj
530 0 obj
<</TU(D:20171119103209+13'00')>>
endobj
534 0 obj
<</Filter[/FlateDecode]/Length 423>>stream
H‰2hbÜo肉‘Ñ€—S«Í£í;/##7+ƒA‰!·'s(›0“_”¡¸(ˆÃ-ÌâëªàœŸW\šS’™—“àÂ060I0Ëi1„0ø2¸2(0¸0d2¤q C"Cæçy%¥E©â¼†f††FFF†–Q@®9kå0 9’¹‰‘‘Áܽ Xça¨s‚õùž'µ!*ŸŒTs‹U:£Â×äþq] 䊉ւY³öO=TÂ1A7¹c9÷™ûßÜ´Ê0Y¹téUÉ^… ?òÍgâg¤ºçìÏ»)áõíÀrîØg+Â%ätZ£/Ù|ûN]j¸ìá“v/¿óåþ.‰ïù{Œ,™ö:â}²ÆýLœàám‡s'_غÙöÄæ)|Mö%7ËŠ/>[§Ü÷ïqÜâ§./ÝRýÑ/øÓNÝïüïÝþ™¦vHl½Ï]áC[ ï\÷KŠ’»ú„µHöjÄ„6^üž©ÌvËìÖyJY¼'mm¥ô¶¸øð½Zø{ÞÍØ-Š š+¶
endstream
endobj
Thanks in advance.