Skip to content

Commit

Permalink
Add test for XAdES SignedProperties reference type. Fixes #224
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Apr 8, 2023
1 parent 37a6615 commit 373dd91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,11 @@ def test_xades_roundtrip(self):
data_object_format=self.data_object_format,
)
signed_doc = signer.sign(doc, key=key, cert=cert)

for ref in signed_doc.findall(".//{http://www.w3.org/2000/09/xmldsig#}Reference"):
if "SignedProperties" in ref.get("URI"):
self.assertEqual(ref.get("Type"), "http://uri.etsi.org/01903#SignedProperties")

verifier = XAdESVerifier()
verify_results = verifier.verify(
signed_doc, x509_cert=cert, expect_references=3, expect_signature_policy=self.signature_policy
Expand Down

0 comments on commit 373dd91

Please sign in to comment.