Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcti-libtpms: fix big endian response size. #2701

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/tss2-tcti/tcti-libtpms.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,17 @@ tcti_libtpms_transmit(
return TSS2_TCTI_RC_BAD_VALUE;
}

uint32_t response_len, response_buffer_len;

LOGBLOB_DEBUG(cmd_buf, size, "Sending command with TPM_CC 0x%" PRIx32, header.size);
LIBTPMS_API_CALL(fail, tcti_libtpms, TPMLIB_Process, &tcti_libtpms->response_buffer,
(uint32_t *) &tcti_libtpms->response_len,
(uint32_t *) &tcti_libtpms->response_buffer_len,
&response_len,
&response_buffer_len,
(uint8_t *) cmd_buf,
size);
tcti_libtpms->response_len = response_len;
tcti_libtpms->response_buffer_len = response_buffer_len;

rc = tcti_libtpms_store_state(tcti_libtpms);
if (rc != TSS2_RC_SUCCESS) {
LOG_ERROR("Failed to store state file");
Expand Down
Loading