aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-10-06 13:07:36 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-10-16 19:46:20 +0000
commit06134407fe531c7c0169e8f90ae84a2bf1a546d4 (patch)
treeb65d539abc0605e4a63b1d2e12fbd03a9a864790
parentc8272f4c2f6dafc513dddf05c1a59768c46cab96 (diff)
downloadtpm2-06134407fe531c7c0169e8f90ae84a2bf1a546d4.tar.gz
Assign values to return code modifiers.
The library routines scraped from Part 4 of the TCG TPM2 spec often add constant offsets to return codes. The values are not defined in any of the spec's four parts, so they were included in TPM_Types.h for future consideration. The actual values of these offset codes are supposed to be calculated at run time depending on status of the device and results of command execution as described in "Table 15 - Format-One Response Codes" of the Part 2 of the specification. The plan is to properly integrate calculation of these values into the code later, this patch is a catch all submission to make the tests pass even if without fully informative return codes. The Part 4 sources are also interchangeably using return codes prefixed with TMP_RC_ and TPM_RCS_. It looks like they are identical, so this patch just makes sure that the values with different prefixes match. BUG=chrome-os-partner:44608, chromium:544181 TEST=this patch fixes 21 tests, the list can be found at https://goo.gl/o6LDiR Change-Id: I24f65a4508c84550f79c279b03f265ebca30759e Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/305387 Reviewed-by: Darren Krahn <dkrahn@chromium.org>
-rw-r--r--TPM_Types.h282
1 files changed, 141 insertions, 141 deletions
diff --git a/TPM_Types.h b/TPM_Types.h
index 46dbf4a..e931105 100644
--- a/TPM_Types.h
+++ b/TPM_Types.h
@@ -25,150 +25,150 @@ typedef UINT32 TPM_SPEC;
* TODO: map these properly into Format-One error reporting.
*/
enum {
- RC_ActivateCredential_credentialBlob,
- RC_ActivateCredential_keyHandle,
- RC_ActivateCredential_secret,
- RC_CertifyCreation_creationTicket,
- RC_CertifyCreation_inScheme,
- RC_CertifyCreation_signHandle,
- RC_Certify_inScheme,
- RC_Certify_signHandle,
- RC_ClockSet_newTime,
- RC_Commit_P1,
- RC_Commit_s2,
- RC_Commit_signHandle,
- RC_Commit_y2,
- RC_ContextLoad_context,
- RC_CreatePrimary_inPublic,
- RC_CreatePrimary_inSensitive,
- RC_Create_inPublic,
- RC_Create_inSensitive,
- RC_Create_parentHandle,
- RC_Duplicate_encryptionKeyIn,
- RC_Duplicate_newParentHandle,
- RC_Duplicate_objectHandle,
- RC_Duplicate_symmetricAlg,
- RC_ECC_Parameters_curveID,
- RC_ECDH_KeyGen_keyHandle,
- RC_ECDH_ZGen_keyHandle,
- RC_ECDH_ZGen_inPoint,
- RC_EncryptDecrypt_inData,
- RC_EncryptDecrypt_ivIn,
- RC_EncryptDecrypt_keyHandle,
- RC_EncryptDecrypt_mode,
- RC_EventSequenceComplete_sequenceHandle,
- RC_EvictControl_objectHandle,
- RC_EvictControl_persistentHandle,
- RC_GetCapability_property,
- RC_GetCommandAuditDigest_signHandle,
- RC_GetCommandAuditDigest_inScheme,
- RC_GetSessionAuditDigest_inScheme,
- RC_GetSessionAuditDigest_sessionHandle,
- RC_GetSessionAuditDigest_signHandle,
- RC_GetTime_inScheme,
- RC_GetTime_signHandle,
- RC_HMAC_handle,
- RC_HMAC_hashAlg,
- RC_HMAC_Start_handle,
- RC_HMAC_Start_hashAlg,
- RC_HierarchyChangeAuth_newAuth,
- RC_Import_duplicate,
- RC_Import_encryptionKey,
- RC_Import_inSymSeed,
- RC_Import_objectPublic,
- RC_Import_parentHandle,
- RC_IncrementalSelfTest_toTest,
- RC_Load_inPrivate,
- RC_Load_inPublic,
- RC_Load_parentHandle,
- RC_LoadExternal_hierarchy,
- RC_LoadExternal_inPublic,
- RC_MakeCredential_credential,
- RC_MakeCredential_handle,
- RC_NV_Certify_signHandle,
- RC_NV_Certify_inScheme,
- RC_NV_ChangeAuth_newAuth,
- RC_NV_DefineSpace_auth,
- RC_NV_DefineSpace_authHandle,
- RC_NV_DefineSpace_publicInfo,
- RC_NV_Extend_nvIndex,
- RC_NV_Increment_nvIndex,
- RC_NV_ReadLock_nvIndex,
- RC_NV_SetBits_nvIndex,
- RC_NV_UndefineSpace_nvIndex,
- RC_NV_UndefineSpaceSpecial_nvIndex,
- RC_NV_WriteLock_nvIndex,
- RC_ObjectChangeAuth_newAuth,
- RC_ObjectChangeAuth_objectHandle,
- RC_ObjectChangeAuth_parentHandle,
- RC_PCR_SetAuthPolicy_authPolicy,
- RC_PCR_SetAuthPolicy_pcrNum,
- RC_PolicyAuthorize_approvedPolicy,
- RC_PolicyAuthorize_checkTicket,
- RC_PolicyAuthorize_keySign,
- RC_PolicyCommandCode_code,
- RC_PolicyCpHash_cpHashA,
- RC_PolicyLocality_locality,
- RC_PolicyNV_operandB,
- RC_PolicyNameHash_nameHash,
- RC_PolicyNvWritten_writtenSet,
- RC_PolicyOR_pHashList,
- RC_PolicyPCR_pcrDigest,
- RC_PolicySecret_cpHashA,
- RC_PolicySecret_expiration,
- RC_PolicySecret_nonceTPM,
- RC_PolicySigned_auth,
- RC_PolicySigned_cpHashA,
- RC_PolicySigned_expiration,
- RC_PolicySigned_nonceTPM,
- RC_PolicyTicket_cpHashA,
- RC_PolicyTicket_policySession,
- RC_PolicyTicket_ticket,
- RC_PolicyTicket_timeout,
- RC_Quote_inScheme,
- RC_Quote_signHandle,
- RC_RSA_Decrypt_inScheme,
- RC_RSA_Decrypt_keyHandle,
- RC_RSA_Decrypt_label,
- RC_RSA_Encrypt_inScheme,
- RC_RSA_Encrypt_keyHandle,
- RC_RSA_Encrypt_label,
- RC_Rewrap_inDuplicate,
- RC_Rewrap_inSymSeed,
- RC_Rewrap_newParent,
- RC_Rewrap_oldParent,
- RC_SequenceComplete_sequenceHandle,
- RC_SequenceUpdate_sequenceHandle,
- RC_SetCommandCodeAuditStatus_auditAlg,
- RC_SetPrimaryPolicy_authPolicy,
- RC_Shutdown_shutdownType,
- RC_Sign_digest,
- RC_Sign_inScheme,
- RC_Sign_keyHandle,
- RC_Sign_validation,
- RC_StartAuthSession_bind,
- RC_StartAuthSession_encryptedSalt,
- RC_StartAuthSession_nonceCaller,
- RC_StartAuthSession_symmetric,
- RC_StartAuthSession_tpmKey,
- RC_Startup_startupType,
- RC_Unseal_itemHandle,
- RC_VerifySignature_keyHandle,
- RC_VerifySignature_signature,
- RC_ZGen_2Phase_counter,
- RC_ZGen_2Phase_inQeB,
- RC_ZGen_2Phase_inQsB,
- RC_ZGen_2Phase_inScheme,
- RC_ZGen_2Phase_keyA,
+ RC_ActivateCredential_credentialBlob = 0,
+ RC_ActivateCredential_keyHandle = 0,
+ RC_ActivateCredential_secret = 0,
+ RC_CertifyCreation_creationTicket = 0,
+ RC_CertifyCreation_inScheme = 0,
+ RC_CertifyCreation_signHandle = 0,
+ RC_Certify_inScheme = 0,
+ RC_Certify_signHandle = 0,
+ RC_ClockSet_newTime = 0,
+ RC_Commit_P1 = 0,
+ RC_Commit_s2 = 0,
+ RC_Commit_signHandle = 0,
+ RC_Commit_y2 = 0,
+ RC_ContextLoad_context = 0,
+ RC_CreatePrimary_inPublic = 0,
+ RC_CreatePrimary_inSensitive = 0,
+ RC_Create_inPublic = 0,
+ RC_Create_inSensitive = 0,
+ RC_Create_parentHandle = 0,
+ RC_Duplicate_encryptionKeyIn = 0,
+ RC_Duplicate_newParentHandle = 0,
+ RC_Duplicate_objectHandle = 0,
+ RC_Duplicate_symmetricAlg = 0,
+ RC_ECC_Parameters_curveID = 0,
+ RC_ECDH_KeyGen_keyHandle = 0,
+ RC_ECDH_ZGen_keyHandle = 0,
+ RC_ECDH_ZGen_inPoint = 0,
+ RC_EncryptDecrypt_inData = 0,
+ RC_EncryptDecrypt_ivIn = 0,
+ RC_EncryptDecrypt_keyHandle = 0,
+ RC_EncryptDecrypt_mode = 0,
+ RC_EventSequenceComplete_sequenceHandle = 0,
+ RC_EvictControl_objectHandle = 0,
+ RC_EvictControl_persistentHandle = 0,
+ RC_GetCapability_property = 0,
+ RC_GetCommandAuditDigest_signHandle = 0,
+ RC_GetCommandAuditDigest_inScheme = 0,
+ RC_GetSessionAuditDigest_inScheme = 0,
+ RC_GetSessionAuditDigest_sessionHandle = 0,
+ RC_GetSessionAuditDigest_signHandle = 0,
+ RC_GetTime_inScheme = 0,
+ RC_GetTime_signHandle = 0,
+ RC_HMAC_handle = 0,
+ RC_HMAC_hashAlg = 0,
+ RC_HMAC_Start_handle = 0,
+ RC_HMAC_Start_hashAlg = 0,
+ RC_HierarchyChangeAuth_newAuth = 0,
+ RC_Import_duplicate = 0,
+ RC_Import_encryptionKey = 0,
+ RC_Import_inSymSeed = 0,
+ RC_Import_objectPublic = 0,
+ RC_Import_parentHandle = 0,
+ RC_IncrementalSelfTest_toTest = 0,
+ RC_Load_inPrivate = 0,
+ RC_Load_inPublic = 0,
+ RC_Load_parentHandle = 0,
+ RC_LoadExternal_hierarchy = 0,
+ RC_LoadExternal_inPublic = 0,
+ RC_MakeCredential_credential = 0,
+ RC_MakeCredential_handle = 0,
+ RC_NV_Certify_signHandle = 0,
+ RC_NV_Certify_inScheme = 0,
+ RC_NV_ChangeAuth_newAuth = 0,
+ RC_NV_DefineSpace_auth = 0,
+ RC_NV_DefineSpace_authHandle = 0,
+ RC_NV_DefineSpace_publicInfo = 0,
+ RC_NV_Extend_nvIndex = 0,
+ RC_NV_Increment_nvIndex = 0,
+ RC_NV_ReadLock_nvIndex = 0,
+ RC_NV_SetBits_nvIndex = 0,
+ RC_NV_UndefineSpace_nvIndex = 0,
+ RC_NV_UndefineSpaceSpecial_nvIndex = 0,
+ RC_NV_WriteLock_nvIndex = 0,
+ RC_ObjectChangeAuth_newAuth = 0,
+ RC_ObjectChangeAuth_objectHandle = 0,
+ RC_ObjectChangeAuth_parentHandle = 0,
+ RC_PCR_SetAuthPolicy_authPolicy = 0,
+ RC_PCR_SetAuthPolicy_pcrNum = 0,
+ RC_PolicyAuthorize_approvedPolicy = 0,
+ RC_PolicyAuthorize_checkTicket = 0,
+ RC_PolicyAuthorize_keySign = 0,
+ RC_PolicyCommandCode_code = 0,
+ RC_PolicyCpHash_cpHashA = 0,
+ RC_PolicyLocality_locality = 0,
+ RC_PolicyNV_operandB = 0,
+ RC_PolicyNameHash_nameHash = 0,
+ RC_PolicyNvWritten_writtenSet = 0,
+ RC_PolicyOR_pHashList = 0,
+ RC_PolicyPCR_pcrDigest = 0,
+ RC_PolicySecret_cpHashA = 0,
+ RC_PolicySecret_expiration = 0,
+ RC_PolicySecret_nonceTPM = 0,
+ RC_PolicySigned_auth = 0,
+ RC_PolicySigned_cpHashA = 0,
+ RC_PolicySigned_expiration = 0,
+ RC_PolicySigned_nonceTPM = 0,
+ RC_PolicyTicket_cpHashA = 0,
+ RC_PolicyTicket_policySession = 0,
+ RC_PolicyTicket_ticket = 0,
+ RC_PolicyTicket_timeout = 0,
+ RC_Quote_inScheme = 0,
+ RC_Quote_signHandle = 0,
+ RC_RSA_Decrypt_inScheme = 0,
+ RC_RSA_Decrypt_keyHandle = 0,
+ RC_RSA_Decrypt_label = 0,
+ RC_RSA_Encrypt_inScheme = 0,
+ RC_RSA_Encrypt_keyHandle = 0,
+ RC_RSA_Encrypt_label = 0,
+ RC_Rewrap_inDuplicate = 0,
+ RC_Rewrap_inSymSeed = 0,
+ RC_Rewrap_newParent = 0,
+ RC_Rewrap_oldParent = 0,
+ RC_SequenceComplete_sequenceHandle = 0,
+ RC_SequenceUpdate_sequenceHandle = 0,
+ RC_SetCommandCodeAuditStatus_auditAlg = 0,
+ RC_SetPrimaryPolicy_authPolicy = 0,
+ RC_Shutdown_shutdownType = 0,
+ RC_Sign_digest = 0,
+ RC_Sign_inScheme = 0,
+ RC_Sign_keyHandle = 0,
+ RC_Sign_validation = 0,
+ RC_StartAuthSession_bind = 0,
+ RC_StartAuthSession_encryptedSalt = 0,
+ RC_StartAuthSession_nonceCaller = 0,
+ RC_StartAuthSession_symmetric = 0,
+ RC_StartAuthSession_tpmKey = 0,
+ RC_Startup_startupType = 0,
+ RC_Unseal_itemHandle = 0,
+ RC_VerifySignature_keyHandle = 0,
+ RC_VerifySignature_signature = 0,
+ RC_ZGen_2Phase_counter = 0,
+ RC_ZGen_2Phase_inQeB = 0,
+ RC_ZGen_2Phase_inQsB = 0,
+ RC_ZGen_2Phase_inScheme = 0,
+ RC_ZGen_2Phase_keyA = 0,
};
enum {
- TPM_RCS_ATTRIBUTES,
- TPM_RCS_HANDLE,
- TPM_RCS_KEY,
- TPM_RCS_SIZE,
- TPM_RCS_TYPE,
- TPM_RCS_VALUE,
+ TPM_RCS_ATTRIBUTES = TPM_RC_ATTRIBUTES,
+ TPM_RCS_HANDLE = TPM_RC_HANDLE,
+ TPM_RCS_KEY = TPM_RC_KEY,
+ TPM_RCS_SIZE = TPM_RC_SIZE,
+ TPM_RCS_TYPE = TPM_RC_TYPE,
+ TPM_RCS_VALUE = TPM_RC_VALUE,
};
#endif // __TPM2_TPM_TYPES_H