Home
last modified time | relevance | path

Searched refs:nv_index (Results 1 – 16 of 16) sorted by relevance

/external/epid-sdk/epid/member/tpm2/unittests/
Dnv-test.cc43 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/
Dstorage-test.cc44 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 …]
Dprovision_key-test.cc225 uint32_t nv_index = 0x01c10100; in TEST_F() local
240 nv_index, &pub_key, &credential)); in TEST_F()
Dcontext-test.cc585 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()
Dprovision_credential-test.cc297 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/
Dnv.c28 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 …]
Dcontext.c71 tpm_ctx->nv->nv_index = 0; in Tpm2CreateContext()
98 (*ctx)->nv->nv_index = 0; in Tpm2DeleteContext()
Dstate.h46 uint32_t nv_index; member
/external/epid-sdk/epid/member/tpm2/ibm_tss/
Dnv.c28 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/
Dstorage.c36 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()
Dstorage.h51 MembershipCredential const* credential, uint32_t nv_index);
68 EpidStatus EpidNvReadMembershipCredential(Tpm2Ctx* ctx, uint32_t nv_index,
Dprovision_bulk.c36 uint32_t const nv_index = 0x01c10100; in EpidProvisionKey() local
69 nv_index); in EpidProvisionKey()
Dprovision_join.c36 uint32_t const nv_index = 0x01c10100; in EpidProvisionCredential() local
58 nv_index); in EpidProvisionCredential()
Dstartup.c43 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/
Dnv.h51 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/
Dtlcl_generator.c105 int nv_index = nv_data_public + offsetof(TPM_NV_DATA_PUBLIC, nvIndex); in BuildDefineSpaceCommand() local
135 AddVisibleField(cmd, "index", nv_index); in BuildDefineSpaceCommand()