From 35dbbb745f1331c1fbea8f72c392d9990577562b Mon Sep 17 00:00:00 2001 From: Jon Geater Date: Sun, 21 Jul 2024 15:22:58 -0700 Subject: [PATCH] Tidy up types --- scitt/verify_receipt_signature.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scitt/verify_receipt_signature.py b/scitt/verify_receipt_signature.py index bbdd473..b4798e8 100644 --- a/scitt/verify_receipt_signature.py +++ b/scitt/verify_receipt_signature.py @@ -31,8 +31,9 @@ def read_cbor_file(cbor_file: str) -> Sign1Message: try: message = Sign1Message.decode(receipt) except (ValueError, AttributeError): + # This is fatal print("failed to decode cose sign1 from file", file=sys.stderr) - return None + sys.exit(1) return message