diff --git a/pyhanko_tests/data/pdf/minimal-signed-twice-no-sig-type.pdf b/pyhanko_tests/data/pdf/minimal-signed-twice-no-sig-type.pdf new file mode 100644 index 00000000..4da46f54 Binary files /dev/null and b/pyhanko_tests/data/pdf/minimal-signed-twice-no-sig-type.pdf differ diff --git a/pyhanko_tests/test_diff_analysis.py b/pyhanko_tests/test_diff_analysis.py index 19581fe1..d8f94d6b 100644 --- a/pyhanko_tests/test_diff_analysis.py +++ b/pyhanko_tests/test_diff_analysis.py @@ -2656,3 +2656,15 @@ def test_cant_descend_into_non_container(): with pytest.raises(PdfReadError, match='Anchor'): root_rel.descend('/Blah') + + +def test_signature_without_type_is_form_filling(): + fname = f"{PDF_DATA_DIR}/minimal-signed-twice-no-sig-type.pdf" + with open(fname, 'rb') as inf: + r = PdfFileReader(inf) + s = r.embedded_signatures[0] + s.compute_integrity_info(DEFAULT_DIFF_POLICY) + assert s.field_name == 'Sig1' + assert ( + s.diff_result.modification_level == ModificationLevel.FORM_FILLING + )