Home
last modified time | relevance | path

Searched refs:tpm (Results 1 – 25 of 67) sorted by relevance

123

/external/epid-sdk/epid/member/tpm2/unittests/
Dnv-test.cc42 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, nullptr, epid2params); 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()
78 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, nullptr, epid2params); 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 …]
Dcommit-test.cc48 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &this->kMemberFValue, epid2params); in TEST_F() local
49 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
50 THROW_ON_EPIDERR(Tpm2LoadExternal(tpm, &this->kMemberFValue)); in TEST_F()
55 EXPECT_EQ(kEpidBadArgErr, Tpm2Commit(tpm, p1, nullptr, this->kS2Sha256.size(), in TEST_F()
59 Tpm2Commit(tpm, p1, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
63 Tpm2Commit(tpm, p1, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
66 Tpm2Commit(tpm, p1, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
69 Tpm2Commit(tpm, p1, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
72 Tpm2Commit(tpm, p1, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
85 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &this->kMemberFValue, epid2params); in TEST_F() local
[all …]
Dsign-test.cc85 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &f, epid2params); in TEST_F() local
86 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
88 EXPECT_EQ(kEpidNoErr, Tpm2LoadExternal(tpm, &f)); in TEST_F()
98 Tpm2Commit(tpm, p2, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
105 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
119 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &f, epid2params); in TEST_F() local
120 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
122 EXPECT_EQ(kEpidNoErr, Tpm2LoadExternal(tpm, &f)); in TEST_F()
133 Tpm2Commit(tpm, p2, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
136 Tpm2Commit(tpm, p2, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
[all …]
Dcommit-simulator-test.cc50 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &this->kMemberFValue, epid2params); in TEST_F() local
51 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
52 THROW_ON_EPIDERR(Tpm2LoadExternal(tpm, &this->kMemberFValue)); in TEST_F()
55 Tpm2Commit(tpm, p1, this->kS2Sha256.data(), this->kS2Sha256.size(), in TEST_F()
57 THROW_ON_EPIDERR(Tpm2ReleaseCounter(tpm, counter)); in TEST_F()
94 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &this->kMemberFValue, epid2params); in TEST_F() local
95 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha384)); in TEST_F()
96 THROW_ON_EPIDERR(Tpm2LoadExternal(tpm, &this->kMemberFValue)); in TEST_F()
99 Tpm2Commit(tpm, p1, this->kS2Sha384.data(), this->kS2Sha384.size(), in TEST_F()
101 THROW_ON_EPIDERR(Tpm2ReleaseCounter(tpm, counter)); in TEST_F()
[all …]
Dgetrandom-test.cc39 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, nullptr, epid2params); in TEST_F() local
41 EXPECT_EQ(kEpidBadArgErr, Tpm2GetRandom(tpm, 48 * 8, nullptr)); in TEST_F()
47 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, nullptr, epid2params); in TEST_F() local
51 EXPECT_EQ(kEpidNoErr, Tpm2GetRandom(tpm, length * CHAR_BIT, buf1.data())); in TEST_F()
52 EXPECT_EQ(kEpidNoErr, Tpm2GetRandom(tpm, length * CHAR_BIT, buf2.data())); in TEST_F()
59 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, nullptr, epid2params); in TEST_F() local
63 EXPECT_EQ(kEpidNoErr, Tpm2GetRandom(tpm, length * CHAR_BIT, buf.data())); in TEST_F()
Dsign-simulator-test.cc45 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, &this->kMemberFValue, epid2params); in TEST_F() local
46 THROW_ON_EPIDERR(Tpm2SetHashAlg(tpm, kSha256)); in TEST_F()
47 THROW_ON_EPIDERR(Tpm2LoadExternal(tpm, &this->kMemberFValue)); in TEST_F()
49 Tpm2Commit(tpm, nullptr, nullptr, 0, nullptr, k, l, e, &counter)); in TEST_F()
52 Tpm2Sign(tpm, this->kDigestSha256, sizeof(this->kDigestSha256), in TEST_F()
/external/u-boot/drivers/tpm/
Dtpm2_tis_sandbox.c72 struct sandbox_tpm2 *tpm = dev_get_priv(dev); in sandbox_tpm2_check_session() local
165 if (!pw_sz && !tpm->pw_sz[*hierarchy]) in sandbox_tpm2_check_session()
179 if (pw_sz != tpm->pw_sz[*hierarchy] || in sandbox_tpm2_check_session()
180 strncmp(pw, tpm->pw[*hierarchy], tpm->pw_sz[*hierarchy])) { in sandbox_tpm2_check_session()
190 struct sandbox_tpm2 *tpm = dev_get_priv(dev); in sandbox_tpm2_check_readyness() local
194 if (!tpm->init_done || tpm->startup_done) in sandbox_tpm2_check_readyness()
199 if (!tpm->init_done || !tpm->startup_done) in sandbox_tpm2_check_readyness()
204 if (!tpm->startup_done) in sandbox_tpm2_check_readyness()
209 if (!tpm->tests_done) in sandbox_tpm2_check_readyness()
243 struct sandbox_tpm2 *tpm = dev_get_priv(dev); in sandbox_tpm2_extend() local
[all …]
DKconfig34 The usual tpm operations and the 'tpm' command can be used to talk
43 The usual tpm operations and the 'tpm' command can be used to talk
68 The usual tpm operations and the 'tpm' command can be used to talk
79 available using the 'tpm' command, too.
86 The usual tpm operations and the 'tpm' command can be used to talk
95 The usual tpm operations and the 'tpm' command can be used to talk
104 The functionality is available via the 'tpm' command as well.
112 The functionality is available via the 'tpm' command as well.
119 The functionality is available via the 'tpm' command as well.
147 The usual TPM operations and the 'tpm' command can be used to talk
Dtpm_tis_sandbox.c143 struct tpm_state *tpm = dev_get_priv(dev); in sandbox_tpm_xfer() local
195 memcpy(&tpm->nvdata[seq], sendbuf + 22, length); in sandbox_tpm_xfer()
225 sizeof(uint32_t), &tpm->nvdata[seq], length); in sandbox_tpm_xfer()
256 struct tpm_state *tpm = dev_get_priv(dev); in sandbox_tpm_probe() local
258 memcpy(tpm, &g_state, sizeof(*tpm)); in sandbox_tpm_probe()
/external/epid-sdk/epid/member/unittests/
Dstorage-test.cc42 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, nullptr, epid2params); in TEST_F() local
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()
63 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, nullptr, epid2params); in TEST_F() local
72 tpm, nv_index, &pub_key, &credential)); in TEST_F()
78 Tpm2CtxObj tpm(&Prng::Generate, &my_prng, nullptr, epid2params); in TEST_F() local
87 EXPECT_EQ(kEpidNoErr, EpidNvWriteMembershipCredential(tpm, &pub_key, in TEST_F()
93 tpm, nv_index, nullptr, &credential)); in TEST_F()
95 EpidNvReadMembershipCredential(tpm, nv_index, &pub_key, nullptr)); in TEST_F()
[all …]
/external/vboot_reference/utility/
Dchromeos-tpm-recovery-test9 rm -rf tpm-recovery-test-workdir
10 mkdir tpm-recovery-test-workdir
11 cd tpm-recovery-test-workdir
30 ctr=../chromeos-tpm-recovery
33 ctr=chromeos-tpm-recovery
58 if [ -e space.$index.data -a -e tpm-owned ]; then
83 rm -f tpm-owned
160 cat > tpm-nvtool <<"EOF"
180 if [ ! -f tpm-owned ]; then
198 if [ -f tpm-owned ]; then
[all …]
/external/autotest/client/site_tests/network_VPNConnect/
Dnetwork_VPNConnect.py105 def get_vpn_client_properties(self, tpm): argument
134 tpm.install_certificate(site_eap_certs.client_cert_1,
136 tpm.install_private_key(site_eap_certs.client_private_key_1,
141 'L2TPIPsec.ClientCertSlot': tpm.SLOT_ID,
144 'L2TPIPsec.PIN': tpm.PIN,
152 tpm.install_certificate(site_eap_certs.client_cert_1,
154 tpm.install_private_key(site_eap_certs.client_private_key_1,
164 'OpenVPN.Pkcs11.PIN': tpm.PIN,
199 with tpm_store.TPMStore() as tpm:
200 service = proxy.get_service(self.get_vpn_client_properties(tpm))
/external/autotest/server/hosts/
Dcros_repair.py224 tpm = status['tpm']
225 if not tpm['enabled']:
228 if not tpm['can_connect']:
231 'last_error=%d.' % tpm['last_error']))
232 if tpm['owned'] and not tpm['can_load_srk']:
235 if tpm['can_load_srk'] and not tpm['can_load_srk_pubkey']:
828 self.tpm = self['tpm']
833 return self.tpm.get('enabled') == True
838 return self.tpm.get('owned') == True
843 return self.tpm.get('can_load_srk') == True
[all …]
/external/autotest/server/site_tests/platform_InitLoginPerfServer/
Dcontrol15 This test clears the tpm owner, then goes through OOBE and verifies that the
16 user logs in, the tpm is initialized, and the device is prepared for enrollment.
17 It captures the performance data for tpm initialization, as well as first-boot
/external/ltp/testscripts/
Dtpm_tools.sh146 if [ -d $P11DIR/var/lib/opencryptoki/tpm/$USER ]
148 rm -rf $P11DIR/var/lib/opencryptoki/tpm/$USER
170 $LTPROOT/bin/ltp-pan -d 5 -S -a $LTPROOT/results/tpm_tools -n ltp-tpm-tools -l $LTPROOT/results/tpm…
/external/autotest/server/site_tests/firmware_UpdateFirmwareVersion/
Dfirmware_UpdateFirmwareVersion.py28 actual_tpm_fwver = self.faft_client.tpm.get_firmware_version()
58 self.fw_ver_tpm = self.faft_client.tpm.get_firmware_version()
70 if self.faft_client.tpm.get_firmware_version() != self.fw_ver_tpm:
/external/autotest/client/site_tests/platform_EncryptedStateful/
Dplatform_EncryptedStateful.py289 tpm = "/dev/tpm0"
290 off = "%s.off" % (tpm)
292 if os.path.exists(tpm):
293 utils.system("mv %s %s" % (tpm, off))
298 utils.system("mv %s %s" % (off, tpm))
/external/autotest/server/site_tests/firmware_UpdateFirmwareDataKeyVersion/
Dfirmware_UpdateFirmwareDataKeyVersion.py41 actual_tpm_fwver = self.faft_client.tpm.get_firmware_datakey_version()
70 self.fw_ver_tpm = self.faft_client.tpm.get_firmware_datakey_version()
84 if (self.faft_client.tpm.get_firmware_datakey_version() !=
/external/autotest/server/site_tests/firmware_ClearTPMOwnerAndReset/
Dcontrol7 PURPOSE = "Verify normal boot after clearing the tpm owner and rebooting the ec"
14 after the tpm owner has been cleared.
Dcontrol.stress7 PURPOSE = "Verify normal boot after clearing the tpm owner and rebooting the ec"
15 after the tpm owner has been cleared.
/external/u-boot/lib/
DMakefile43 obj-$(CONFIG_TPM) += tpm-common.o
44 obj-$(CONFIG_TPM_V1) += tpm-v1.o
45 obj-$(CONFIG_TPM_V2) += tpm-v2.o
/external/autotest/server/site_tests/firmware_TPMKernelVersion/
Dfirmware_TPMKernelVersion.py51 version = self.faft_client.tpm.get_kernel_version()
53 version = self.faft_client.tpm.get_kernel_datakey_version()
/external/autotest/server/site_tests/firmware_TPMVersionCheck/
Dcontrol.dev9 PURPOSE = "Crossystem reports the tpm versions correctly"
10 CRITERIA = "This test will fail if crossystem reports tpm version incorrectly"
Dcontrol.ec_wp9 PURPOSE = "Crossystem reports tpm version correctly"
10 CRITERIA = "This test will fail if crossystem reports tpm version incorrectly"
/external/autotest/server/site_tests/firmware_TPMNotCorruptedDevMode/
Dfirmware_TPMNotCorruptedDevMode.py83 self.faft_client.tpm.stop_daemon()
89 self.faft_client.tpm.restart_daemon()

123