pyhanko.sign.diff_analysis.rules.file_structure_rules module
- class pyhanko.sign.diff_analysis.rules.file_structure_rules.CatalogModificationRule(ignored_keys=None)
Bases:
QualifiedWhitelistRuleRule that adjudicates modifications to the document catalog.
- Parameters
ignored_keys –
Values in the document catalog that may change between revisions. The default ones are
/AcroForm,/DSS,/Extensions,/Metadata,/MarkInfoand/Version.Checking for
/AcroForm,/DSSand/Metadatais delegated toFormUpdatingRule,DSSCompareRuleandMetadataUpdateRule, respectively.
- apply_qualified(old: HistoricalResolver, new: HistoricalResolver) Iterable[Tuple[ModificationLevel, Reference]]
Apply the rule to the changes between two revisions.
- Parameters
old – The older, base revision.
new – The newer revision to be vetted.
- class pyhanko.sign.diff_analysis.rules.file_structure_rules.ObjectStreamRule
Bases:
WhitelistRuleRule that allows object streams to be added.
Note that this rule only whitelists the object streams themselves (provided they do not override any existing objects, obviously), not the objects in them.
- apply(old: HistoricalResolver, new: HistoricalResolver) Iterable[Reference]
Apply the rule to the changes between two revisions.
- Parameters
old – The older, base revision.
new – The newer revision to be vetted.
- class pyhanko.sign.diff_analysis.rules.file_structure_rules.XrefStreamRule
Bases:
WhitelistRuleRule that allows new cross-reference streams to be defined.
- apply(old: HistoricalResolver, new: HistoricalResolver) Iterable[Reference]
Apply the rule to the changes between two revisions.
- Parameters
old – The older, base revision.
new – The newer revision to be vetted.