Skip to content

Commit 52a03c3

Browse files
committed
tests: Add regression test for timestamp without certs
Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent 211f9ef commit 52a03c3

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

test/assets/tsa/issue1482-message

72 Bytes
Binary file not shown.
728 Bytes
Binary file not shown.

test/unit/verify/test_verifier.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,3 +377,14 @@ def test_verifier_not_enough_timestamp(
377377
Bundle.from_json(asset("tsa/bundle.txt.sigstore").read_bytes()),
378378
null_policy,
379379
)
380+
381+
def test_verify_signed_timestamp_regression(self, asset):
382+
"""
383+
Ensure we correctly verify a timestamp with no embedded certs.
384+
385+
This is a regression test for # 1482
386+
"""
387+
verifier = Verifier.staging(offline=True)
388+
ts = rfc3161_client.decode_timestamp_response(asset("tsa/issue1482-timestamp-with-no-cert").read_bytes())
389+
res = verifier._verify_signed_timestamp(ts, asset("tsa/issue1482-message").read_bytes())
390+
assert res is not None

0 commit comments

Comments
 (0)