/external/epid-sdk/epid/member/tpm2/unittests/ |
D | nv-test.cc | 43 uint32_t nv_index = 0x01000000; in TEST() local 61 if (kEpidNoErr != Tpm2NvRead(tpm, nv_index, sizeof(data), 0, &data)) { in TEST() 63 Tpm2NvDefineSpace(tpm, nv_index, sizeof(MembershipCredential))); in TEST() 67 Tpm2NvWrite(tpm, nv_index, sizeof(credential), 0, &credential)); in TEST() 70 EXPECT_EQ(kEpidNoErr, Tpm2NvRead(tpm, nv_index, sizeof(data), 0, &data)); in TEST() 72 THROW_ON_EPIDERR(Tpm2NvUndefineSpace(tpm, nv_index)); in TEST() 79 uint32_t nv_index = 0x01000000; in TEST() local 87 Tpm2NvDefineSpace(tpm, nv_index, data1_src.size() + data2_src.size())); in TEST() 90 Tpm2NvWrite(tpm, nv_index, data1_src.size(), 0, data1_src.data())); in TEST() 92 Tpm2NvWrite(tpm, nv_index, data2_src.size(), in TEST() [all …]
|
/external/epid-sdk/epid/member/unittests/ |
D | storage-test.cc | 44 uint32_t nv_index = 0x01c10100; in TEST_F() local 51 nullptr, &pub_key, &credential, nv_index)); in TEST_F() 53 tpm, nullptr, &credential, nv_index)); in TEST_F() 55 EpidNvWriteMembershipCredential(tpm, &pub_key, nullptr, nv_index)); in TEST_F() 57 Tpm2NvUndefineSpace(tpm, nv_index); in TEST_F() 65 uint32_t nv_index = 0x01c10101; in TEST_F() local 72 tpm, nv_index, &pub_key, &credential)); in TEST_F() 80 uint32_t nv_index = 0x01c10100; in TEST_F() local 88 &credential, nv_index)); in TEST_F() 91 nullptr, nv_index, &pub_key, &credential)); in TEST_F() [all …]
|
D | provision_key-test.cc | 225 uint32_t nv_index = 0x01c10100; in TEST_F() local 240 nv_index, &pub_key, &credential)); in TEST_F()
|
D | context-test.cc | 585 uint32_t const nv_index = 0x01c10100; in TEST_F() local 601 tpm, &pub_key_expected, &credential_expected, nv_index)); in TEST_F() 605 tpm, nv_index, &pub_key, &credential)); in TEST_F() 617 Tpm2NvUndefineSpace(((MemberCtx*)member)->tpm2_ctx, nv_index); in TEST_F()
|
D | provision_credential-test.cc | 297 uint32_t nv_index = 0x01c10100; in TEST_F() local 314 nv_index, &pub_key, &credential)); in TEST_F()
|
/external/epid-sdk/epid/member/tpm2/src/ |
D | nv.c | 28 int EpidFindNvIndex(Tpm2Ctx* ctx, uint32_t nv_index) { in EpidFindNvIndex() argument 31 if (ctx->nv[i].nv_index == nv_index) return i; in EpidFindNvIndex() 45 EpidStatus Tpm2NvDefineSpace(Tpm2Ctx* ctx, uint32_t nv_index, size_t size) { in Tpm2NvDefineSpace() argument 50 if (nv_index < MIN_NV_INDEX) { in Tpm2NvDefineSpace() 53 if (EpidFindNvIndex(ctx, nv_index) != -1) { in Tpm2NvDefineSpace() 60 ctx->nv[index].nv_index = nv_index; in Tpm2NvDefineSpace() 66 EpidStatus Tpm2NvUndefineSpace(Tpm2Ctx* ctx, uint32_t nv_index) { in Tpm2NvUndefineSpace() argument 71 if (nv_index < MIN_NV_INDEX) { in Tpm2NvUndefineSpace() 74 index = EpidFindNvIndex(ctx, nv_index); in Tpm2NvUndefineSpace() 78 ctx->nv[index].nv_index = 0; in Tpm2NvUndefineSpace() [all …]
|
D | context.c | 71 tpm_ctx->nv->nv_index = 0; in Tpm2CreateContext() 98 (*ctx)->nv->nv_index = 0; in Tpm2DeleteContext()
|
D | state.h | 46 uint32_t nv_index; member
|
/external/epid-sdk/epid/member/tpm2/ibm_tss/ |
D | nv.c | 28 EpidStatus Tpm2NvUndefineSpace(Tpm2Ctx* ctx, uint32_t nv_index) { in Tpm2NvUndefineSpace() argument 35 if ((nv_index >> 24) != TPM_HT_NV_INDEX) { in Tpm2NvUndefineSpace() 41 in.nvIndex = nv_index; in Tpm2NvUndefineSpace() 52 EpidStatus Tpm2NvDefineSpace(Tpm2Ctx* ctx, uint32_t nv_index, size_t size) { in Tpm2NvDefineSpace() argument 59 if ((nv_index >> 24) != TPM_HT_NV_INDEX) { in Tpm2NvDefineSpace() 65 in.publicInfo.nvPublic.nvIndex = nv_index; in Tpm2NvDefineSpace() 86 EpidStatus Tpm2NvRead(Tpm2Ctx* ctx, uint32_t nv_index, size_t size, in Tpm2NvRead() argument 99 if ((nv_index >> 24) != TPM_HT_NV_INDEX) { in Tpm2NvRead() 103 if ((nv_index >> 24) != TPM_HT_NV_INDEX) { in Tpm2NvRead() 107 in.authHandle = nv_index; in Tpm2NvRead() [all …]
|
/external/epid-sdk/epid/member/src/ |
D | storage.c | 36 MembershipCredential const* credential, uint32_t nv_index) { in EpidNvWriteMembershipCredential() argument 42 if (kEpidNoErr != Tpm2NvRead(ctx, nv_index, 1, 0, &tmp)) { in EpidNvWriteMembershipCredential() 43 sts = Tpm2NvDefineSpace(ctx, nv_index, in EpidNvWriteMembershipCredential() 47 sts = Tpm2NvWrite(ctx, nv_index, sizeof(*pub_key), 0, pub_key); in EpidNvWriteMembershipCredential() 49 sts = Tpm2NvWrite(ctx, nv_index, sizeof(*credential), sizeof(*pub_key), in EpidNvWriteMembershipCredential() 53 if (kEpidNoErr != sts) Tpm2NvUndefineSpace(ctx, nv_index); in EpidNvWriteMembershipCredential() 58 EpidStatus EpidNvReadMembershipCredential(Tpm2Ctx* ctx, uint32_t nv_index, in EpidNvReadMembershipCredential() argument 64 sts = Tpm2NvRead(ctx, nv_index, sizeof(*pub_key), 0, pub_key); in EpidNvReadMembershipCredential() 66 sts = Tpm2NvRead(ctx, nv_index, sizeof(*credential), sizeof(*pub_key), in EpidNvReadMembershipCredential()
|
D | storage.h | 51 MembershipCredential const* credential, uint32_t nv_index); 68 EpidStatus EpidNvReadMembershipCredential(Tpm2Ctx* ctx, uint32_t nv_index,
|
D | provision_bulk.c | 36 uint32_t const nv_index = 0x01c10100; in EpidProvisionKey() local 69 nv_index); in EpidProvisionKey()
|
D | provision_join.c | 36 uint32_t const nv_index = 0x01c10100; in EpidProvisionCredential() local 58 nv_index); in EpidProvisionCredential()
|
D | startup.c | 43 uint32_t const nv_index = 0x01c10100; in EpidMemberStartup() local 57 sts = EpidNvReadMembershipCredential(ctx->tpm2_ctx, nv_index, &ctx->pub_key, in EpidMemberStartup()
|
/external/epid-sdk/epid/member/tpm2/ |
D | nv.h | 51 EpidStatus Tpm2NvDefineSpace(Tpm2Ctx* ctx, uint32_t nv_index, size_t size); 64 EpidStatus Tpm2NvUndefineSpace(Tpm2Ctx* ctx, uint32_t nv_index); 85 EpidStatus Tpm2NvWrite(Tpm2Ctx* ctx, uint32_t nv_index, size_t size, 105 EpidStatus Tpm2NvRead(Tpm2Ctx* ctx, uint32_t nv_index, size_t size,
|
/external/vboot_reference/utility/ |
D | tlcl_generator.c | 105 int nv_index = nv_data_public + offsetof(TPM_NV_DATA_PUBLIC, nvIndex); in BuildDefineSpaceCommand() local 135 AddVisibleField(cmd, "index", nv_index); in BuildDefineSpaceCommand()
|