in cvm-attestation/src/measurements.py [0:0]
def get_measurements(os):
if os == "Linux":
binary_data = b''
# Open the file in binary read mode
with open(LINUX_TCG_LOG_PATH, 'rb') as file:
binary_data = file.read()
return binary_data
# Access the key
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, REG_KEY_PATH, 0, winreg.KEY_READ)
tcg_logs = bytearray()
# Read the values
try:
count = 0
while True:
name, value, type = winreg.EnumValue(key, count)
if name == VALUE:
tcg_logs = value
count += 1
except WindowsError:
pass
winreg.CloseKey(key)
return tcg_logs