mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-01 04:45:32 +00:00
tpm2: Use ANY_OBJECT_Marshal for OBJECTs is StateFormatLevel >=2
For profiles that work for libtpms v0.10 or later, so for StatFormatLevel >=2, use ANY_MARSHAL_Object to write OBJECTS into the NVRAM. This way OBJECTS are written in a more compact format. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
f8d9e6b853
commit
e02af1e06b
@ -589,7 +589,8 @@ void NvReadNvIndexInfo(NV_REF ref, // IN: points to NV where index is loc
|
||||
// Convert an OBJECT into a buffer to store in NVRAM // libtpms added begin
|
||||
UINT32 NvObjectToBuffer(OBJECT* object, BYTE* buffer, UINT32 size)
|
||||
{
|
||||
BOOL marshalAnyObject = false;
|
||||
// always use ANY_OBJECT_Marshal if StateFormatLevel >=2 (v0.10)
|
||||
BOOL marshalAnyObject = g_RuntimeProfile.stateFormatLevel >= 2;
|
||||
|
||||
pAssert(size >= MAX_MARSHALLED_OBJECT_SIZE);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user