Files
chipsec-chipsec/tests/software
Nicolas Iooss a53c211f2f Generate 12-byte fake TPM event in EFIFirmwareBlob test
Currently `test_tpm_eventlog_firmware_blob` generates a TPM event with
16 bytes (`struct.pack("QQ",...)`) to check the decoding of
`EFIFirmwareBlob`. But the code expects a "native unsigned long", as
documented in `chipsec/hal/tpm_eventlog.py`:

    class EFIFirmwareBlob(TcgPcrEvent):
        # Although [4] 9.2.5 mentions UNIT64 for the length, [1] 7.7 uses
        # a UINTN. Use a native unsigned long to cover the most general case.
        _event_fmt = "@QL"

On Windows, the size of `unsigned long` is 32 bits, and the test fails:

      File "d:\a\chipsec\chipsec\chipsec\hal\tpm_eventlog.py", line 115, in __init__
        base, length = struct.unpack(self._event_fmt, self.event)
    struct.error: unpack requires a buffer of 12 bytes

Use `"QL"` in the test in order to fix this test on Windows.
2021-04-30 14:56:19 -07:00
..
2017-01-06 12:57:13 -08:00
2020-06-29 16:05:03 -07:00
2020-07-01 15:44:21 -07:00
2017-01-06 12:57:13 -08:00
2017-01-06 12:57:13 -08:00
2017-09-20 13:21:45 -07:00