| Previous | Next |
| TPM_E_AUTHFAIL | TPM_E_BAD_PARAMETER |
TPM_E_BADINDEX
TPM_E_BADINDEX means that the command selected an index that is not valid for the targeted TPM 1.2 object: Microsoft’s definition explicitly includes PCRs, DIRs, and other registers. The failure is about the selector, not a mismatch in the selected register’s current contents.
For PCR-related work, distinguish this from TPM_E_WRONGPCRVAL. TPM_E_BADINDEX says the caller did not name a usable register; TPM_E_WRONGPCRVAL says a named PCR was valid but its measured value no longer matched the policy or sealed-data expectation.
Useful checks
- Record the command, the index field, and the TPM version exposed by the platform. Do not assume that all implementations expose the same optional facilities.
- Validate the index against the exact command structure and capability information, rather than against a hard-coded table from another TPM generation.
- For a serialized request, inspect byte order and structure packing before changing any TPM state. A malformed selector often travels with other malformed fields.
References
- Microsoft: TPM HRESULT values in Winerror.h
- TCG TPM 1.2 Part 2: Structures
- TCG TPM 1.2 Part 3: Commands
Looking for a different code? Search another status or error code.
