in src/local_gpu_verifier/src/verifier/rim/__init__.py [0:0]
def get_manufacturer_id(self, driver_rim_content):
"""Returns the manufacturer id of the RIM.
Returns:
[str]: the manufacturer id of the RIM.
"""
root = etree.fromstring(driver_rim_content)
ns = {
"ns0": "http://standards.iso.org/iso/19770/-2/2015/schema.xsd",
"ns1": "https://trustedcomputinggroup.org/resource/tcg-reference-integrity-manifest-rim-information-model/",
}
meta = root.find(".//ns0:Meta", ns)
if meta is None:
event_log.error("Meta element not found in the RIM.")
return ""
firmware_manufacturer_id = meta.attrib.get(
"{https://trustedcomputinggroup.org/resource/tcg-reference-integrity-manifest-rim-information-model/}FirmwareManufacturerId",
"",
)
if not firmware_manufacturer_id:
event_log.error("FirmwareManufacturerId attribute not found in Meta element.")
return firmware_manufacturer_id