|
@@ -117,9 +117,6 @@ def _copy_bound_receipt(
|
|
|
# Do not overwrite or invent the bitstream hash either.
|
|
# Do not overwrite or invent the bitstream hash either.
|
|
|
elif value.get("status") == "pass" and not SHA256_RE.fullmatch(str(value.get("bitstream_sha256", ""))):
|
|
elif value.get("status") == "pass" and not SHA256_RE.fullmatch(str(value.get("bitstream_sha256", ""))):
|
|
|
raise ValueError(f"confirmation receipt requires its own bitstream SHA256: {source}")
|
|
raise ValueError(f"confirmation receipt requires its own bitstream SHA256: {source}")
|
|
|
- if receipt_role is not None:
|
|
|
|
|
- value["receipt_role"] = receipt_role
|
|
|
|
|
-
|
|
|
|
|
required_authoritative_fields = [
|
|
required_authoritative_fields = [
|
|
|
"verification_run_id",
|
|
"verification_run_id",
|
|
|
"commit",
|
|
"commit",
|
|
@@ -137,6 +134,9 @@ def _copy_bound_receipt(
|
|
|
required_authoritative_fields.append("bitstream_sha256")
|
|
required_authoritative_fields.append("bitstream_sha256")
|
|
|
missing = [field for field in required_authoritative_fields if not value.get(field)]
|
|
missing = [field for field in required_authoritative_fields if not value.get(field)]
|
|
|
|
|
|
|
|
|
|
+ if receipt_role is not None:
|
|
|
|
|
+ value["receipt_role"] = receipt_role
|
|
|
|
|
+
|
|
|
was_pass = value.get("status") == "pass"
|
|
was_pass = value.get("status") == "pass"
|
|
|
if was_pass and not missing:
|
|
if was_pass and not missing:
|
|
|
value["authoritative"] = True
|
|
value["authoritative"] = True
|