In pcsclient.py _fetch_identity(), the raw HTTP response body (a JSON string) is
assigned directly to the output dict:
self.output_json["collaterals"][f"{identity_type}identity{key_suffix}"] = identity[0]
When the output dict is serialised with json.dumps(), the string is escaped and
written as a JSON string value instead of a nested object. Consumers reading the
file see e.g.:
"qeidentity": "{\"enclaveIdentity\":{...},\"signature\":\"...\"}"
instead of the expected:
"qeidentity": {"enclaveIdentity": {...}, "signature": "..."}
Fix: parse identity[0] before storing it:
self.output_json["collaterals"][f"{identity_type}identity{key_suffix}"] = json.loads(identity[0])
The same issue affects tdqeidentity, qveidentity, and their _early variants.
tcbinfos entries are not affected as those are already stored as dicts.
In pcsclient.py
_fetch_identity(), the raw HTTP response body (a JSON string) isassigned directly to the output dict:
When the output dict is serialised with json.dumps(), the string is escaped and
written as a JSON string value instead of a nested object. Consumers reading the
file see e.g.:
instead of the expected:
Fix: parse
identity[0]before storing it:The same issue affects tdqeidentity, qveidentity, and their _early variants.
tcbinfos entries are not affected as those are already stored as dicts.