From a938590efda66dea85a80c9542e9a6e01b9f3329 Mon Sep 17 00:00:00 2001 From: Jon Geater Date: Sun, 21 Jul 2024 15:31:51 -0700 Subject: [PATCH] Tidy up variable names --- scitt/verify_receipt_signature.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scitt/verify_receipt_signature.py b/scitt/verify_receipt_signature.py index b4798e8..bf81f43 100644 --- a/scitt/verify_receipt_signature.py +++ b/scitt/verify_receipt_signature.py @@ -25,17 +25,17 @@ def read_cbor_file(cbor_file: str) -> Sign1Message: NOTE: the receipt is expected to be in cbor encoding. """ with open(cbor_file, "rb") as file: - receipt = file.read() + contents = file.read() # decode the cbor encoded cose sign1 message try: - message = Sign1Message.decode(receipt) + cose_object = Sign1Message.decode(contents) except (ValueError, AttributeError): # This is fatal print("failed to decode cose sign1 from file", file=sys.stderr) sys.exit(1) - return message + return cose_object def get_didweb_pubkey(didurl: str, kid: bytes) -> dict: @@ -106,6 +106,8 @@ def verify_receipt(receipt: Sign1Message) -> bool: verifies the counter signed receipt signature """ + print(receipt) + # get the verification key from didweb kid: bytes = receipt.phdr[KID] didurl = receipt.phdr[HEADER_LABEL_DID]