Lines Matching refs:connection
57 TpmConnection connection(GetDefaultOwnerPassword()); in InitializeTpm() local
58 if (!InitializeEndorsementKey(&connection) || !TakeOwnership(&connection) || in InitializeTpm()
59 !InitializeSrk(&connection)) { in InitializeTpm()
76 if (!ChangeOwnerPassword(&connection, owner_password)) { in InitializeTpm()
91 bool TpmInitializerImpl::InitializeEndorsementKey(TpmConnection* connection) { in InitializeEndorsementKey() argument
92 trousers::ScopedTssKey local_key_handle(connection->GetContext()); in InitializeEndorsementKey()
94 connection->GetTpm(), false, nullptr, local_key_handle.ptr()); in InitializeEndorsementKey()
103 connection->GetContext(), TSS_OBJECT_TYPE_RSAKEY, in InitializeEndorsementKey()
109 connection->GetTpm(), local_key_handle, NULL))) { in InitializeEndorsementKey()
116 bool TpmInitializerImpl::TakeOwnership(TpmConnection* connection) { in TakeOwnership() argument
122 trousers::ScopedTssKey srk_handle(connection->GetContext()); in TakeOwnership()
125 connection->GetContext(), TSS_OBJECT_TYPE_RSAKEY, in TakeOwnership()
151 result = Tspi_TPM_TakeOwnership(connection->GetTpm(), srk_handle, 0); in TakeOwnership()
165 bool TpmInitializerImpl::InitializeSrk(TpmConnection* connection) { in InitializeSrk() argument
167 trousers::ScopedTssKey srk_handle(connection->GetContext()); in InitializeSrk()
170 connection->GetContext(), TSS_PS_TYPE_SYSTEM, SRK_UUID, in InitializeSrk()
176 trousers::ScopedTssPolicy policy_handle(connection->GetContext()); in InitializeSrk()
178 connection->GetContext(), TSS_OBJECT_TYPE_POLICY, in InitializeSrk()
190 if (TPM_ERROR(result = Tspi_ChangeAuth(srk_handle, connection->GetTpm(), in InitializeSrk()
196 if (TPM_ERROR(result = Tspi_TPM_GetStatus(connection->GetTpm(), in InitializeSrk()
204 if (TPM_ERROR(result = Tspi_TPM_SetStatus(connection->GetTpm(), in InitializeSrk()
215 TpmConnection* connection, in ChangeOwnerPassword() argument
218 trousers::ScopedTssPolicy policy_handle(connection->GetContext()); in ChangeOwnerPassword()
220 connection->GetContext(), TSS_OBJECT_TYPE_POLICY, in ChangeOwnerPassword()
235 Tspi_ChangeAuth(connection->GetTpm(), 0, policy_handle))) { in ChangeOwnerPassword()
244 TpmConnection connection(owner_password); in TestTpmAuth() local
245 TSS_HTPM tpm_handle = connection.GetTpm(); in TestTpmAuth()