Lines Matching full:session
72 scoped_ptr<HmacSession> session = factory_->GetHmacSession();
73 if (utility->StartSession(session.get()) != TPM_RC_SUCCESS) {
74 LOG(ERROR) << "Error starting hmac session.";
80 TPM_RC result = utility->StirRandom(entropy_data, session->GetDelegate());
85 result = utility->GenerateRandom(num_bytes, session->GetDelegate(),
101 scoped_ptr<HmacSession> session = factory_->GetHmacSession();
102 if (utility->StartSession(session.get()) != TPM_RC_SUCCESS) {
103 LOG(ERROR) << "Error starting hmac session.";
111 kNoCreationPCR, session->GetDelegate(), &key_blob, nullptr);
117 result = utility->LoadKey(key_blob, session->GetDelegate(), &signing_key);
122 session->SetEntityAuthorizationValue(key_authorization);
125 std::string(32, 'a'), session->GetDelegate(),
142 scoped_ptr<HmacSession> session = factory_->GetHmacSession();
143 if (utility->StartSession(session.get()) != TPM_RC_SUCCESS) {
144 LOG(ERROR) << "Error starting hmac session.";
152 kNoCreationPCR, session->GetDelegate(), &key_blob, nullptr);
158 result = utility->LoadKey(key_blob, session->GetDelegate(), &decrypt_key);
165 session.get());
170 scoped_ptr<HmacSession> session = factory_->GetHmacSession();
171 if (utility->StartSession(session.get()) != TPM_RC_SUCCESS) {
172 LOG(ERROR) << "Error starting hmac session.";
182 prime_factor, key_authorization, session->GetDelegate(), &key_blob);
188 result = utility->LoadKey(key_blob, session->GetDelegate(), &key_handle);
195 session.get());
200 scoped_ptr<HmacSession> session = factory_->GetHmacSession();
201 if (utility->StartSession(session.get()) != TPM_RC_SUCCESS) {
202 LOG(ERROR) << "Error starting hmac session.";
210 kNoCreationPCR, session->GetDelegate(), &key_blob, nullptr);
216 result = utility->LoadKey(key_blob, session->GetDelegate(), &key_handle);
221 session->SetEntityAuthorizationValue("old_pass");
223 session->GetDelegate(),
229 session->SetEntityAuthorizationValue("");
230 result = utility->LoadKey(key_blob, session->GetDelegate(), &key_handle);
237 session.get());
242 scoped_ptr<HmacSession> session = factory_->GetHmacSession();
243 if (utility->StartSession(session.get()) != TPM_RC_SUCCESS) {
244 LOG(ERROR) << "Error starting hmac session.";
249 session->SetEntityAuthorizationValue("");
253 kNoCreationPCR, session->GetDelegate(), &key_blob, &creation_blob);
262 kNoCreationPCR, session->GetDelegate(), &alternate_key_blob,
269 result = utility->LoadKey(key_blob, session->GetDelegate(), &key_handle);
276 session->GetDelegate(),
299 scoped_ptr<HmacSession> session = factory_->GetHmacSession();
300 if (utility->StartSession(session.get()) != TPM_RC_SUCCESS) {
301 LOG(ERROR) << "Error starting hmac session.";
315 session->GetDelegate(), &sealed_data);
323 LOG(ERROR) << "Error starting policy session: " << GetErrorString(result);
343 result = utility->ExtendPCR(pcr_index, "extend", session->GetDelegate());
365 scoped_ptr<HmacSession> session = factory_->GetHmacSession();
366 if (utility->StartSession(session.get()) != TPM_RC_SUCCESS) {
367 LOG(ERROR) << "Error starting hmac session.";
379 result = utility->ExtendPCR(pcr_index, extend_data, session->GetDelegate());
406 LOG(ERROR) << "Error starting policy session: " << GetErrorString(result);
421 // Now that we have the digest, we can close the trial session and use hmac.
427 LOG(ERROR) << "Error starting hmac session: " << GetErrorString(result);
455 LOG(ERROR) << "Error starting policy session: " << GetErrorString(result);
517 LOG(ERROR) << "Error starting policy session: " << GetErrorString(result);
548 // Now that we have the digest, we can close the trial session and use hmac.
554 LOG(ERROR) << "Error starting hmac session: " << GetErrorString(result);
583 LOG(ERROR) << "Error starting policy session: " << GetErrorString(result);
613 // we have to restart the session because we changed the pcr values.
616 LOG(ERROR) << "Error starting policy session: " << GetErrorString(result);
684 LOG(ERROR) << "Error starting policy session: " << GetErrorString(result);
700 LOG(ERROR) << "Error starting policy session: " << GetErrorString(result);
728 // Now that we have the digest, we can close the trial session and use hmac.
734 LOG(ERROR) << "Error starting hmac session: " << GetErrorString(result);
763 LOG(ERROR) << "Error starting policy session: " << GetErrorString(result);
823 scoped_ptr<HmacSession> session = factory_->GetHmacSession();
824 TPM_RC result = session->StartUnboundSession(true /* enable encryption */);
826 LOG(ERROR) << "Error starting hmac session: " << GetErrorString(result);
830 session->SetEntityAuthorizationValue(owner_password);
833 session->GetDelegate());
838 session
839 result = utility->WriteNVSpace(index, 0, nv_data, session->GetDelegate());
845 session->SetEntityAuthorizationValue("");
847 &new_nvdata, session->GetDelegate());
856 session->SetEntityAuthorizationValue(owner_password);
857 result = utility->LockNVSpace(index, session->GetDelegate());
862 session->SetEntityAuthorizationValue("");
864 &new_nvdata, session->GetDelegate());
873 session->SetEntityAuthorizationValue(owner_password);
874 result = utility->WriteNVSpace(index, 0, nv_data, session->GetDelegate());
879 session->SetEntityAuthorizationValue(owner_password);
880 result = utility->DestroyNVSpace(index, session->GetDelegate());
928 std::unique_ptr<HmacSession> session(factory_->GetHmacSession().release());
929 TPM_RC result = session->StartUnboundSession(true /* enable encryption */);
931 LOG(ERROR) << "Error starting hmac session " << i << ": "
935 sessions.push_back(std::move(session));
945 LOG(ERROR) << "Error signing with hmac session " << i;
951 LOG(ERROR) << "Error signing with shuffled hmac session " << i;
960 HmacSession* session) {
963 session->SetEntityAuthorizationValue("");
966 session->GetDelegate(),
973 session->SetEntityAuthorizationValue(key_authorization);
976 session->GetDelegate(), &plaintext);