swtpm: Also check the state blob in the CUSE TPM

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2018-02-17 15:31:07 -05:00
parent b085ff2335
commit 98059a2908

View File

@ -646,10 +646,13 @@ ptm_set_stateblob_append(uint32_t blobtype,
stateblob.is_encrypted,
0 /* tpm_number */,
blobname);
if (res == TPM_SUCCESS && stateblob.length)
res = tpmlib_validate_blob(blobtype);
} else {
res = TPM_BAD_PARAMETER;
}
TPM_Free(stateblob.data);
stateblob.data = NULL;
stateblob.length = 0;