📄 tcs_api.c
字号:
TCPA_NONCE antiReplay, /* in */ UINT32 * pubEndorsementKeySize, /* out */ BYTE ** pubEndorsementKey, /* out */ TCPA_DIGEST * checksum) /* out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_ReadPubek_TP(entry, antiReplay, pubEndorsementKeySize, pubEndorsementKey, checksum); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_DisablePubekRead(TSS_HCONTEXT tspContext, /* in */ TPM_AUTH * ownerAuth) /* in, out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_DisablePubekRead_TP(entry, ownerAuth); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_OwnerReadPubek(TSS_HCONTEXT tspContext, /* in */ TPM_AUTH * ownerAuth, /* in, out */ UINT32 * pubEndorsementKeySize, /* out */ BYTE ** pubEndorsementKey) /* out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_OwnerReadPubek_TP(entry, ownerAuth, pubEndorsementKeySize, pubEndorsementKey); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_CreateRevocableEndorsementKeyPair(TSS_HCONTEXT tspContext, /* in */ TPM_NONCE antiReplay, /* in */ UINT32 endorsementKeyInfoSize,/* in */ BYTE * endorsementKeyInfo, /* in */ TSS_BOOL genResetAuth, /* in */ TPM_DIGEST * eKResetAuth, /* in, out */ UINT32 * endorsementKeySize, /* out */ BYTE ** endorsementKey, /* out */ TPM_DIGEST * checksum) /* out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_CreateRevocableEndorsementKeyPair_TP(entry, antiReplay, endorsementKeyInfoSize, endorsementKeyInfo, genResetAuth, eKResetAuth, endorsementKeySize, endorsementKey, checksum); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_RevokeEndorsementKeyPair(TSS_HCONTEXT tspContext, /* in */ TPM_DIGEST *EKResetAuth) /* in */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_RevokeEndorsementKeyPair_TP(entry, EKResetAuth); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_SelfTestFull(TSS_HCONTEXT tspContext) /* in */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_SelfTestFull_TP(entry); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_CertifySelfTest(TSS_HCONTEXT tspContext, /* in */ TCS_KEY_HANDLE keyHandle, /* in */ TCPA_NONCE antiReplay, /* in */ TPM_AUTH * privAuth, /* in, out */ UINT32 * sigSize, /* out */ BYTE ** sig) /* out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_CertifySelfTest_TP(entry, keyHandle, antiReplay, privAuth, sigSize, sig); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_GetTestResult(TSS_HCONTEXT tspContext, /* in */ UINT32 * outDataSize, /* out */ BYTE ** outData) /* out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_GetTestResult_TP(entry, outDataSize, outData); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_OwnerSetDisable(TSS_HCONTEXT tspContext, /* in */ TSS_BOOL disableState, /* in */ TPM_AUTH * ownerAuth) /* in, out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_OwnerSetDisable_TP(entry, disableState, ownerAuth); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_ResetLockValue(TSS_HCONTEXT tspContext, /* in */ TPM_AUTH * ownerAuth) /* in, out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_ResetLockValue_TP(entry, ownerAuth); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_OwnerClear(TSS_HCONTEXT tspContext, /* in */ TPM_AUTH * ownerAuth) /* in, out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_OwnerClear_TP(entry, ownerAuth); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_DisableOwnerClear(TSS_HCONTEXT tspContext, /* in */ TPM_AUTH * ownerAuth) /* in, out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_DisableOwnerClear_TP(entry, ownerAuth); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_ForceClear(TSS_HCONTEXT tspContext) /* in */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_ForceClear_TP(entry); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_DisableForceClear(TSS_HCONTEXT tspContext) /* in */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_DisableForceClear_TP(entry); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_PhysicalDisable(TSS_HCONTEXT tspContext) /* in */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_PhysicalDisable_TP(entry); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_PhysicalEnable(TSS_HCONTEXT tspContext) /* in */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_PhysicalEnable_TP(entry); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_PhysicalSetDeactivated(TSS_HCONTEXT tspContext, /* in */ TSS_BOOL state) /* in */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_PhysicalSetDeactivated_TP(entry, state); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_PhysicalPresence(TSS_HCONTEXT tspContext, /* in */ TCPA_PHYSICAL_PRESENCE fPhysicalPresence) /* in */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_PhysicalPresence_TP(entry, fPhysicalPresence); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_SetTempDeactivated(TSS_HCONTEXT tspContext) /* in */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_SetTempDeactivated_TP(entry); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_SetTempDeactivated2(TSS_HCONTEXT tspContext, /* in */ TPM_AUTH *operatorAuth) /* in, out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = RPC_SetTempDeactivated2_TP(entry, operatorAuth); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_FieldUpgrade(TSS_HCONTEXT tspContext, /* in */ UINT32 dataInSize, /* in */ BYTE * dataIn, /* in */ UINT32 * dataOutSize, /* out */ BYTE ** dataOut, /* out */ TPM_AUTH * ownerAuth) /* in, out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = (UINT32) TSPERR(TSS_E_INTERNAL_ERROR); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_SetRedirection(TSS_HCONTEXT tspContext, /* in */ TCS_KEY_HANDLE keyHandle, /* in */ UINT32 c1, /* in */ UINT32 c2, /* in */ TPM_AUTH * privAuth) /* in, out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext); if (entry == NULL) return TSPERR(TSS_E_NO_CONNECTION); switch (entry->type) { case CONNECTION_TYPE_TCP_PERSISTANT: result = (UINT32) TSPERR(TSS_E_INTERNAL_ERROR); break; default: break; } put_table_entry(entry); return result;}TSS_RESULT RPC_CreateMaintenanceArchive(TSS_HCONTEXT tspContext, /* in */ TSS_BOOL generateRandom, /* in */ TPM_AUTH * ownerAuth, /* in, out */ UINT32 * randomSize, /* out */ BYTE ** random, /* out */ UINT32 * archiveSize, /* out */ BYTE ** archive) /* out */{ TSS_RESULT result = TSPERR(TSS_E_INTERNAL_ERROR); struct host_table_entry *entry = get_table_entry(tspContext);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -