diff --git a/attest/pcp_windows.go b/attest/pcp_windows.go index bb85ab1c..09764117 100644 --- a/attest/pcp_windows.go +++ b/attest/pcp_windows.go @@ -86,6 +86,7 @@ var ( 0x00800000: "The device identifier has not been created.", } tpmErrNums = map[uint32]string{ + 0x80280000: "TPM_E_ERROR_MASK", 0x80280001: "TPM_E_AUTHFAIL", 0x80280002: "TPM_E_BADINDEX", 0x80280003: "TPM_E_BAD_PARAMETER", @@ -146,7 +147,18 @@ var ( 0x8028003A: "TPM_E_KEY_NOTSUPPORTED", 0x8028003B: "TPM_E_AUTH_CONFLICT", 0x8028003C: "TPM_E_AREA_LOCKED", - // TODO: Finish NVRAM error codes. + 0x8028003D: "TPM_E_BAD_LOCALITY", + 0x8028003E: "TPM_E_READ_ONLY", + 0x8028003F: "TPM_E_PER_NOWRITE", + 0x80280040: "TPM_E_FAMILYCOUNT", + 0x80280041: "TPM_E_WRITE_LOCKED", + 0x80280042: "TPM_E_BAD_ATTRIBUTES", + 0x80280043: "TPM_E_INVALID_STRUCTURE", + 0x80280044: "TPM_E_KEY_OWNER_CONTROL", + 0x80280045: "TPM_E_BAD_COUNTER", + 0x80280046: "TPM_E_NOT_FULLWRITE", + 0x80280047: "TPM_E_CONTEXT_GAP", + 0x80280048: "TPM_E_MAXNVWRITES", 0x80280049: "TPM_E_NOOPERATOR", 0x8028004A: "TPM_E_RESOURCEMISSING", 0x8028004B: "TPM_E_DELEGATE_LOCK", @@ -155,7 +167,13 @@ var ( 0x8028004E: "TPM_E_TRANSPORT_NOTEXCLUSIVE", 0x8028004F: "TPM_E_OWNER_CONTROL", 0x80280050: "TPM_E_DAA_RESOURCES", - // TODO: Finish DAA error codes. + 0x80280051: "TPM_E_DAA_INPUT_DATA0", + 0x80280052: "TPM_E_DAA_INPUT_DATA1", + 0x80280053: "TPM_E_DAA_ISSUER_SETTINGS", + 0x80280054: "TPM_E_DAA_TPM_SETTINGS", + 0x80280055: "TPM_E_DAA_STAGE", + 0x80280056: "TPM_E_DAA_ISSUER_VALIDITY", + 0x80280057: "TPM_E_DAA_WRONG_W", 0x80280058: "TPM_E_BAD_HANDLE", 0x80280059: "TPM_E_BAD_DELEGATE", 0x8028005A: "TPM_E_BADCONTEXT", @@ -167,6 +185,74 @@ var ( 0x80280061: "TPM_E_PERMANENTEK", 0x80280062: "TPM_E_BAD_SIGNATURE", 0x80280063: "TPM_E_NOCONTEXTSPACE", + 0x80280081: "TPM_20_E_ASYMMETRIC", + 0x80280082: "TPM_20_E_ATTRIBUTES", + 0x80280083: "TPM_20_E_HASH", + 0x80280084: "TPM_20_E_VALUE", + 0x80280085: "TPM_20_E_HIERARCHY", + 0x80280087: "TPM_20_E_KEY_SIZE", + 0x80280088: "TPM_20_E_MGF", + 0x80280089: "TPM_20_E_MODE", + 0x8028008A: "TPM_20_E_TYPE", + 0x8028008B: "TPM_20_E_HANDLE", + 0x8028008C: "TPM_20_E_KDF", + 0x8028008D: "TPM_20_E_RANGE", + 0x8028008E: "TPM_20_E_AUTH_FAIL", + 0x8028008F: "TPM_20_E_NONCE", + 0x80280090: "TPM_20_E_PP", + 0x80280092: "TPM_20_E_SCHEME", + 0x80280095: "TPM_20_E_SIZE", + 0x80280096: "TPM_20_E_SYMMETRIC", + 0x80280097: "TPM_20_E_TAG", + 0x80280098: "TPM_20_E_SELECTOR", + 0x8028009A: "TPM_20_E_INSUFFICIENT", + 0x8028009B: "TPM_20_E_SIGNATURE", + 0x8028009C: "TPM_20_E_KEY", + 0x8028009D: "TPM_20_E_POLICY_FAIL", + 0x8028009F: "TPM_20_E_INTEGRITY", + 0x802800A0: "TPM_20_E_TICKET", + 0x802800A1: "TPM_20_E_RESERVED_BITS", + 0x802800A2: "TPM_20_E_BAD_AUTH", + 0x802800A3: "TPM_20_E_EXPIRED", + 0x802800A4: "TPM_20_E_POLICY_CC", + 0x802800A5: "TPM_20_E_BINDING", + 0x802800A6: "TPM_20_E_CURVE", + 0x802800A7: "TPM_20_E_ECC_POINT", + 0x80280100: "TPM_20_E_INITIALIZE", + 0x80280101: "TPM_20_E_FAILURE", + 0x80280103: "TPM_20_E_SEQUENCE", + 0x8028010B: "TPM_20_E_PRIVATE", + 0x80280119: "TPM_20_E_HMAC", + 0x80280120: "TPM_20_E_DISABLED", + 0x80280121: "TPM_20_E_EXCLUSIVE", + 0x80280123: "TPM_20_E_ECC_CURVE", + 0x80280124: "TPM_20_E_AUTH_TYPE", + 0x80280125: "TPM_20_E_AUTH_MISSING", + 0x80280126: "TPM_20_E_POLICY", + 0x80280127: "TPM_20_E_PCR", + 0x80280128: "TPM_20_E_PCR_CHANGED", + 0x8028012D: "TPM_20_E_UPGRADE", + 0x8028012E: "TPM_20_E_TOO_MANY_CONTEXTS", + 0x8028012F: "TPM_20_E_AUTH_UNAVAILABLE", + 0x80280130: "TPM_20_E_REBOOT", + 0x80280131: "TPM_20_E_UNBALANCED", + 0x80280142: "TPM_20_E_COMMAND_SIZE", + 0x80280143: "TPM_20_E_COMMAND_CODE", + 0x80280144: "TPM_20_E_AUTHSIZE", + 0x80280145: "TPM_20_E_AUTH_CONTEXT", + 0x80280146: "TPM_20_E_NV_RANGE", + 0x80280147: "TPM_20_E_NV_SIZE", + 0x80280148: "TPM_20_E_NV_LOCKED", + 0x80280149: "TPM_20_E_NV_AUTHORIZATION", + 0x8028014A: "TPM_20_E_NV_UNINITIALIZED", + 0x8028014B: "TPM_20_E_NV_SPACE", + 0x8028014C: "TPM_20_E_NV_DEFINED", + 0x80280150: "TPM_20_E_BAD_CONTEXT", + 0x80280151: "TPM_20_E_CPHASH", + 0x80280152: "TPM_20_E_PARENT", + 0x80280153: "TPM_20_E_NEEDS_TEST", + 0x80280154: "TPM_20_E_NO_RESULT", + 0x80280155: "TPM_20_E_SENSITIVE", 0x80280400: "TPM_E_COMMAND_BLOCKED", 0x80280401: "TPM_E_INVALID_HANDLE", 0x80280402: "TPM_E_DUPLICATE_VHANDLE", @@ -176,6 +262,20 @@ var ( 0x80280801: "TPM_E_NEEDS_SELFTEST", 0x80280802: "TPM_E_DOING_SELFTEST", 0x80280803: "TPM_E_DEFEND_LOCK_RUNNING", + 0x80280901: "TPM_20_E_CONTEXT_GAP", + 0x80280902: "TPM_20_E_OBJECT_MEMORY", + 0x80280903: "TPM_20_E_SESSION_MEMORY", + 0x80280904: "TPM_20_E_MEMORY", + 0x80280905: "TPM_20_E_SESSION_HANDLES", + 0x80280906: "TPM_20_E_OBJECT_HANDLES", + 0x80280907: "TPM_20_E_LOCALITY", + 0x80280908: "TPM_20_E_YIELDED", + 0x80280909: "TPM_20_E_CANCELED", + 0x8028090A: "TPM_20_E_TESTING", + 0x80280920: "TPM_20_E_NV_RATE", + 0x80280921: "TPM_20_E_LOCKOUT", + 0x80280922: "TPM_20_E_RETRY", + 0x80280923: "TPM_20_E_NV_UNAVAILABLE", 0x80284001: "TBS_E_INTERNAL_ERROR", 0x80284002: "TBS_E_BAD_PARAMETER", 0x80284003: "TBS_E_INVALID_OUTPUT_POINTER", @@ -198,7 +298,87 @@ var ( 0x80284014: "TBS_E_PPI_FUNCTION_UNSUPPORTED", 0x80284015: "TBS_E_OWNERAUTH_NOT_FOUND", 0x80284016: "TBS_E_PROVISIONING_INCOMPLETE", - // TODO: TPMAPI & TPMSIMP error codes. + 0x80290100: "TPMAPI_E_INVALID_STATE", + 0x80290101: "TPMAPI_E_NOT_ENOUGH_DATA", + 0x80290102: "TPMAPI_E_TOO_MUCH_DATA", + 0x80290103: "TPMAPI_E_INVALID_OUTPUT_POINTER", + 0x80290104: "TPMAPI_E_INVALID_PARAMETER", + 0x80290105: "TPMAPI_E_OUT_OF_MEMORY", + 0x80290106: "TPMAPI_E_BUFFER_TOO_SMALL", + 0x80290107: "TPMAPI_E_INTERNAL_ERROR", + 0x80290108: "TPMAPI_E_ACCESS_DENIED", + 0x80290109: "TPMAPI_E_AUTHORIZATION_FAILED", + 0x8029010A: "TPMAPI_E_INVALID_CONTEXT_HANDLE", + 0x8029010B: "TPMAPI_E_TBS_COMMUNICATION_ERROR", + 0x8029010C: "TPMAPI_E_TPM_COMMAND_ERROR", + 0x8029010D: "TPMAPI_E_MESSAGE_TOO_LARGE", + 0x8029010E: "TPMAPI_E_INVALID_ENCODING", + 0x8029010F: "TPMAPI_E_INVALID_KEY_SIZE", + 0x80290110: "TPMAPI_E_ENCRYPTION_FAILED", + 0x80290111: "TPMAPI_E_INVALID_KEY_PARAMS", + 0x80290112: "TPMAPI_E_INVALID_MIGRATION_AUTHORIZATION_BLOB", + 0x80290113: "TPMAPI_E_INVALID_PCR_INDEX", + 0x80290114: "TPMAPI_E_INVALID_DELEGATE_BLOB", + 0x80290115: "TPMAPI_E_INVALID_CONTEXT_PARAMS", + 0x80290116: "TPMAPI_E_INVALID_KEY_BLOB", + 0x80290117: "TPMAPI_E_INVALID_PCR_DATA", + 0x80290118: "TPMAPI_E_INVALID_OWNER_AUTH", + 0x80290119: "TPMAPI_E_FIPS_RNG_CHECK_FAILED", + 0x8029011A: "TPMAPI_E_EMPTY_TCG_LOG", + 0x8029011B: "TPMAPI_E_INVALID_TCG_LOG_ENTRY", + 0x8029011C: "TPMAPI_E_TCG_SEPARATOR_ABSENT", + 0x8029011D: "TPMAPI_E_TCG_INVALID_DIGEST_ENTRY", + 0x8029011E: "TPMAPI_E_POLICY_DENIES_OPERATION", + 0x8029011F: "TPMAPI_E_NV_BITS_NOT_DEFINED", + 0x80290120: "TPMAPI_E_NV_BITS_NOT_READY", + 0x80290121: "TPMAPI_E_SEALING_KEY_NOT_AVAILABLE", + 0x80290122: "TPMAPI_E_NO_AUTHORIZATION_CHAIN_FOUND", + 0x80290123: "TPMAPI_E_SVN_COUNTER_NOT_AVAILABLE", + 0x80290124: "TPMAPI_E_OWNER_AUTH_NOT_NULL", + 0x80290125: "TPMAPI_E_ENDORSEMENT_AUTH_NOT_NULL", + 0x80290126: "TPMAPI_E_AUTHORIZATION_REVOKED", + 0x80290127: "TPMAPI_E_MALFORMED_AUTHORIZATION_KEY", + 0x80290128: "TPMAPI_E_AUTHORIZING_KEY_NOT_SUPPORTED", + 0x80290129: "TPMAPI_E_INVALID_AUTHORIZATION_SIGNATURE", + 0x8029012A: "TPMAPI_E_MALFORMED_AUTHORIZATION_POLICY", + 0x8029012B: "TPMAPI_E_MALFORMED_AUTHORIZATION_OTHER", + 0x8029012C: "TPMAPI_E_SEALING_KEY_CHANGED", + 0x8029012D: "TPMAPI_E_INVALID_TPM_VERSION", + 0x8029012E: "TPMAPI_E_INVALID_POLICYAUTH_BLOB_TYPE", + 0x80290200: "TBSIMP_E_BUFFER_TOO_SMALL", + 0x80290201: "TBSIMP_E_CLEANUP_FAILED", + 0x80290202: "TBSIMP_E_INVALID_CONTEXT_HANDLE", + 0x80290203: "TBSIMP_E_INVALID_CONTEXT_PARAM", + 0x80290204: "TBSIMP_E_TPM_ERROR", + 0x80290205: "TBSIMP_E_HASH_BAD_KEY", + 0x80290206: "TBSIMP_E_DUPLICATE_VHANDLE", + 0x80290207: "TBSIMP_E_INVALID_OUTPUT_POINTER", + 0x80290208: "TBSIMP_E_INVALID_PARAMETER", + 0x80290209: "TBSIMP_E_RPC_INIT_FAILED", + 0x8029020A: "TBSIMP_E_SCHEDULER_NOT_RUNNING", + 0x8029020B: "TBSIMP_E_COMMAND_CANCELED", + 0x8029020C: "TBSIMP_E_OUT_OF_MEMORY", + 0x8029020D: "TBSIMP_E_LIST_NO_MORE_ITEMS", + 0x8029020E: "TBSIMP_E_LIST_NOT_FOUND", + 0x8029020F: "TBSIMP_E_NOT_ENOUGH_SPACE", + 0x80290210: "TBSIMP_E_NOT_ENOUGH_TPM_CONTEXTS", + 0x80290211: "TBSIMP_E_COMMAND_FAILED", + 0x80290212: "TBSIMP_E_UNKNOWN_ORDINAL", + 0x80290213: "TBSIMP_E_RESOURCE_EXPIRED", + 0x80290214: "TBSIMP_E_INVALID_RESOURCE", + 0x80290215: "TBSIMP_E_NOTHING_TO_UNLOAD", + 0x80290216: "TBSIMP_E_HASH_TABLE_FULL", + 0x80290217: "TBSIMP_E_TOO_MANY_TBS_CONTEXTS", + 0x80290218: "TBSIMP_E_TOO_MANY_RESOURCES", + 0x80290219: "TBSIMP_E_PPI_NOT_SUPPORTED", + 0x8029021A: "TBSIMP_E_TPM_INCOMPATIBLE", + 0x8029021B: "TBSIMP_E_NO_EVENT_LOG", + 0x80290300: "TPM_E_PPI_ACPI_FAILURE", + 0x80290301: "TPM_E_PPI_USER_ABORT", + 0x80290302: "TPM_E_PPI_BIOS_FAILURE", + 0x80290303: "TPM_E_PPI_NOT_SUPPORTED", + 0x80290304: "TPM_E_PPI_BLOCKED_IN_BIOS", + 0x80290400: "TPM_E_PCP_ERROR_MASK", 0x80290401: "TPM_E_PCP_DEVICE_NOT_READY", 0x80290402: "TPM_E_PCP_INVALID_HANDLE", 0x80290403: "TPM_E_PCP_INVALID_PARAMETER", @@ -211,10 +391,91 @@ var ( 0x8029040A: "TPM_E_PCP_POLICY_NOT_FOUND", 0x8029040B: "TPM_E_PCP_PROFILE_NOT_FOUND", 0x8029040C: "TPM_E_PCP_VALIDATION_FAILED", + 0x8029040E: "TPM_E_PCP_WRONG_PARENT", + 0x8029040F: "TPM_E_KEY_NOT_LOADED", + 0x80290410: "TPM_E_NO_KEY_CERTIFICATION", + 0x80290411: "TPM_E_KEY_NOT_FINALIZED", + 0x80290412: "TPM_E_ATTESTATION_CHALLENGE_NOT_SET", + 0x80290413: "TPM_E_NOT_PCR_BOUND", + 0x80290414: "TPM_E_KEY_ALREADY_FINALIZED", + 0x80290415: "TPM_E_KEY_USAGE_POLICY_NOT_SUPPORTED", + 0x80290416: "TPM_E_KEY_USAGE_POLICY_INVALID", + 0x80290417: "TPM_E_SOFT_KEY_ERROR", + 0x80290418: "TPM_E_KEY_NOT_AUTHENTICATED", + 0x80290419: "TPM_E_PCP_KEY_NOT_AIK", + 0x8029041A: "TPM_E_KEY_NOT_SIGNING_KEY", + 0x8029041B: "TPM_E_LOCKED_OUT", + 0x8029041C: "TPM_E_CLAIM_TYPE_NOT_SUPPORTED", + 0x8029041D: "TPM_E_VERSION_NOT_SUPPORTED", + 0x8029041E: "TPM_E_BUFFER_LENGTH_MISMATCH", + 0x8029041F: "TPM_E_PCP_IFX_RSA_KEY_CREATION_BLOCKED", + 0x80290420: "TPM_E_PCP_TICKET_MISSING", + 0x80290421: "TPM_E_PCP_RAW_POLICY_NOT_SUPPORTED", + 0x80290422: "TPM_E_PCP_KEY_HANDLE_INVALIDATED", + 0x40290423: "TPM_E_PCP_UNSUPPORTED_PSS_SALT", + 0x40290424: "TPM_E_PCP_PLATFORM_CLAIM_MAY_BE_OUTDATED", + 0x40290425: "TPM_E_PCP_PLATFORM_CLAIM_OUTDATED", + 0x40290426: "TPM_E_PCP_PLATFORM_CLAIM_REBOOT", + 0x80290500: "TPM_E_ZERO_EXHAUST_ENABLED", + 0x80290600: "TPM_E_PROVISIONING_INCOMPLETE", + 0x80290601: "TPM_E_INVALID_OWNER_AUTH", + 0x80290602: "TPM_E_TOO_MUCH_DATA", + 0x80090001: "NTE_BAD_UID", + 0x80090002: "NTE_BAD_HASH", + 0x80090003: "NTE_BAD_KEY", + 0x80090004: "NTE_BAD_LEN", + 0x80090005: "NTE_BAD_DATA", + 0x80090006: "NTE_BAD_SIGNATURE", + 0x80090007: "NTE_BAD_VER", + 0x80090008: "NTE_BAD_ALGID", 0x80090009: "NTE_BAD_FLAGS", + 0x8009000A: "NTE_BAD_TYPE", + 0x8009000B: "NTE_BAD_KEY_STATE", + 0x8009000C: "NTE_BAD_HASH_STATE", + 0x8009000D: "NTE_NO_KEY", + 0x8009000E: "NTE_NO_MEMORY", + 0x8009000F: "NTE_EXISTS", + 0x80090010: "NTE_PERM", + 0x80090011: "NTE_NOT_FOUND", + 0x80090012: "NTE_DOUBLE_ENCRYPT", + 0x80090013: "NTE_BAD_PROVIDER", + 0x80090014: "NTE_BAD_PROV_TYPE", + 0x80090015: "NTE_BAD_PUBLIC_KEY", + 0x80090016: "NTE_BAD_KEYSET", + 0x80090017: "NTE_PROV_TYPE_NOT_DEF", + 0x80090018: "NTE_PROV_TYPE_ENTRY_BAD", + 0x80090019: "NTE_KEYSET_NOT_DEF", + 0x8009001A: "NTE_KEYSET_ENTRY_BAD", + 0x8009001B: "NTE_PROV_TYPE_NO_MATCH", + 0x8009001C: "NTE_SIGNATURE_FILE_BAD", + 0x8009001D: "NTE_PROVIDER_DLL_FAIL", + 0x8009001E: "NTE_PROV_DLL_NOT_FOUND", + 0x8009001F: "NTE_BAD_KEYSET_PARAM", + 0x80090020: "NTE_FAIL", + 0x80090021: "NTE_SYS_ERR", + 0x80090022: "NTE_SILENT_CONTEXT", + 0x80090023: "NTE_TOKEN_KEYSET_STORAGE_FULL", + 0x80090024: "NTE_TEMPORARY_PROFILE", + 0x80090025: "NTE_FIXEDPARAMETER", 0x80090026: "NTE_INVALID_HANDLE", 0x80090027: "NTE_INVALID_PARAMETER", + 0x80090028: "NTE_BUFFER_TOO_SMALL", 0x80090029: "NTE_NOT_SUPPORTED", + 0x8009002A: "NTE_NO_MORE_ITEMS", + 0x8009002B: "NTE_BUFFERS_OVERLAP", + 0x8009002C: "NTE_DECRYPTION_FAILURE", + 0x8009002D: "NTE_INTERNAL_ERROR", + 0x8009002E: "NTE_UI_REQUIRED", + 0x8009002F: "NTE_HMAC_NOT_SUPPORTED", + 0x80090030: "NTE_DEVICE_NOT_READY", + 0x80090031: "NTE_AUTHENTICATION_IGNORED", + 0x80090032: "NTE_VALIDATION_FAILED", + 0x80090033: "NTE_INCORRECT_PASSWORD", + 0x80090034: "NTE_ENCRYPTION_FAILURE", + 0x80090035: "NTE_DEVICE_NOT_FOUND", + 0x80090036: "NTE_USER_CANCELLED", + 0x80090037: "NTE_PASSWORD_CHANGE_REQUIRED", + 0x80090038: "NTE_NOT_ACTIVE_CONSOLE", } )