uint32_t version_len;
TSS_RESULT result;
- TPM_CAP_VERSION_INFO *info;
result = Tspi_Context_Create(&this->hContext);
if (result != TSS_SUCCESS)
return FALSE;
}
- info = (TPM_CAP_VERSION_INFO *)version_ptr;
+#if DEBUG_LEVEL > 2
+ TPM_CAP_VERSION_INFO *info = (TPM_CAP_VERSION_INFO *)version_ptr;
DBG2(DBG_PTS, "TPM Version Info: Chip Version: %u.%u.%u.%u, "
"Spec Level: %u, Errata Rev: %u, Vendor ID: %.4s",
info->version.major, info->version.minor,
info->version.revMajor, info->version.revMinor,
untoh16(&info->specLevel), info->errataRev, info->tpmVendorID);
+#endif
this->version_info = chunk_clone(chunk_create(version_ptr, version_len));
uint32_t version_info_size, pcr;
aik_t *aik;
chunk_t aik_blob = chunk_empty;
- chunk_t quote_chunk, pcr_digest;
+ chunk_t quote_chunk DBG_UNUSED, pcr_digest;
enumerator_t *enumerator;
bool success = FALSE;
hasher_t *hasher;
pseudo_random_function_t prf_alg;
prf_t *prf;
- chunk_t data, cp_hash, cp_hmac, nonce_caller, nonce_tpm, session_attributes;
+ chunk_t data, cp_hash, nonce_caller, nonce_tpm, session_attributes;
bool success;
uint32_t rval;
DBG1(DBG_PTS, "cpHmac computation failed");
return FALSE;
}
- cp_hmac = chunk_create(cmd.auths[0].hmac.buffer, cmd.auths[0].hmac.size);
- DBG2(DBG_PTS, LABEL "cpHmac: %B", &cp_hmac);
+ DBG2(DBG_PTS, LABEL "cpHmac: %b", cmd.auths[0].hmac.buffer,
+ cmd.auths[0].hmac.size);
rval = Tss2_Sys_SetCmdAuths(this->sys_context, &cmd);
if (rval != TSS2_RC_SUCCESS)
prf_t *prf;
crypter_t *crypter;
chunk_t kdf_label = chunk_from_chars('C','F','B', 0x00);
- chunk_t data, rp_hash, rp_hmac, nonce_caller, nonce_tpm, session_attributes;
+ chunk_t data, rp_hash, nonce_caller, nonce_tpm, session_attributes;
chunk_t key_mat, aes_key, aes_iv;
bool success;
uint32_t rval;
DBG1(DBG_PTS, "computation of rpHmac failed");
return FALSE;
}
- rp_hmac = chunk_create(rpHmac.buffer, rpHmac.size);
- DBG2(DBG_PTS, LABEL "rpHMAC: %B", &rp_hmac);
+ DBG2(DBG_PTS, LABEL "rpHMAC: %b", rpHmac.buffer, rpHmac.size);
/* verify rpHmac */
if (!memeq(rsp.auths[0].hmac.buffer, rpHmac.buffer, rpHmac.size))