Lines Matching refs:result

65   TPM_RC result = factory_.GetTpm()->StartupSync(TPM_SU_CLEAR, nullptr);  in Initialize()  local
67 CHECK(result == TPM_RC_SUCCESS || result == TPM_RC_INITIALIZE) in Initialize()
68 << "TPM startup failure: " << GetErrorString(result); in Initialize()
69 result = factory_.GetTpm()->SelfTestSync(YES /* Full test. */, nullptr); in Initialize()
70 CHECK_EQ(result, TPM_RC_SUCCESS) << "TPM self-test failure: " in Initialize()
71 << GetErrorString(result); in Initialize()
81 result = factory_.GetTpm()->GetCapabilitySync(TPM_CAP_HANDLES, in Initialize()
87 if (result != TPM_RC_SUCCESS) { in Initialize()
89 << GetErrorString(result); in Initialize()
115 TPM_RC result = ParseCommand(command, &command_info); in SendCommandAndWait() local
116 if (result != TPM_RC_SUCCESS) { in SendCommandAndWait()
117 return CreateErrorResponse(result); in SendCommandAndWait()
128 result = ProcessInputHandle(command_info, handle, &tpm_handle); in SendCommandAndWait()
129 if (result != TPM_RC_SUCCESS) { in SendCommandAndWait()
130 return CreateErrorResponse(result); in SendCommandAndWait()
137 result = EnsureSessionIsLoaded(command_info, handle); in SendCommandAndWait()
138 if (result != TPM_RC_SUCCESS) { in SendCommandAndWait()
139 return CreateErrorResponse(result); in SendCommandAndWait()
166 result = ParseResponse(command_info, response, &response_info); in SendCommandAndWait()
167 if (result != TPM_RC_SUCCESS) { in SendCommandAndWait()
168 return CreateErrorResponse(result); in SendCommandAndWait()
286 TPM_RC result = LoadContext(command_info, &handle_info); in EnsureSessionIsLoaded() local
287 if (result != TPM_RC_SUCCESS) { in EnsureSessionIsLoaded()
288 return result; in EnsureSessionIsLoaded()
305 TPM_RC result = SaveContext(command_info, &info); in EvictObjects() local
306 if (result != TPM_RC_SUCCESS) { in EvictObjects()
308 << GetErrorString(result); in EvictObjects()
311 result = factory_.GetTpm()->FlushContextSync(info.tpm_handle, nullptr); in EvictObjects()
312 if (result != TPM_RC_SUCCESS) { in EvictObjects()
314 << GetErrorString(result); in EvictObjects()
328 TPM_RC result = SaveContext(command_info, &info); in EvictSession() local
329 if (result != TPM_RC_SUCCESS) { in EvictSession()
330 LOG(WARNING) << "Failed to evict session: " << GetErrorString(result); in EvictSession()
367 TPM_RC result = LoadContext(command_info, &info); in FixContextGap() local
368 if (result != TPM_RC_SUCCESS) { in FixContextGap()
370 << GetErrorString(result); in FixContextGap()
373 result = SaveContext(command_info, &info); in FixContextGap()
374 if (result != TPM_RC_SUCCESS) { in FixContextGap()
376 << GetErrorString(result); in FixContextGap()
394 TPM_RC result) { in FixWarnings() argument
395 if ((result & RC_WARN) == 0) { in FixWarnings()
406 } else if (warnings_already_seen_.count(result) > 0) { in FixWarnings()
409 warnings_already_seen_.insert(result); in FixWarnings()
410 switch (result) { in FixWarnings()
438 TPM_RC result = factory_.GetTpm()->FlushContextSync(session_to_flush, in FlushSession() local
440 if (result != TPM_RC_SUCCESS) { in FlushSession()
441 LOG(WARNING) << "Failed to flush session: " << GetErrorString(result); in FlushSession()
468 TPM_RC result = TPM_RC_SUCCESS; in LoadContext() local
471 result = factory_.GetTpm()->ContextLoadSync(handle_info->context, in LoadContext()
474 if (!FixWarnings(command_info, result)) { in LoadContext()
478 if (result != TPM_RC_SUCCESS) { in LoadContext()
480 << GetErrorString(result); in LoadContext()
481 return result; in LoadContext()
484 return result; in LoadContext()
499 TPM_RC result = Parse_TPM_ST(&buffer, &tag, nullptr); in ParseCommand() local
500 if (result != TPM_RC_SUCCESS) { in ParseCommand()
501 return MakeError(result, FROM_HERE); in ParseCommand()
509 result = Parse_UINT32(&buffer, &size, nullptr); in ParseCommand()
510 if (result != TPM_RC_SUCCESS) { in ParseCommand()
511 return MakeError(result, FROM_HERE); in ParseCommand()
517 result = Parse_TPM_CC(&buffer, &command_info->code, nullptr); in ParseCommand()
518 if (result != TPM_RC_SUCCESS) { in ParseCommand()
519 return MakeError(result, FROM_HERE); in ParseCommand()
533 result = Parse_UINT32(&buffer, &authorization_size, nullptr); in ParseCommand()
534 if (result != TPM_RC_SUCCESS) { in ParseCommand()
535 return MakeError(result, FROM_HERE); in ParseCommand()
547 result = Parse_TPM_HANDLE(&buffer, &handle, nullptr); in ParseCommand()
548 if (result != TPM_RC_SUCCESS) { in ParseCommand()
549 return MakeError(result, FROM_HERE); in ParseCommand()
555 result = Parse_TPM2B_NONCE(&buffer, &nonce, nullptr); in ParseCommand()
556 if (result != TPM_RC_SUCCESS) { in ParseCommand()
557 return MakeError(result, FROM_HERE); in ParseCommand()
560 result = Parse_BYTE(&buffer, &attributes, nullptr); in ParseCommand()
561 if (result != TPM_RC_SUCCESS) { in ParseCommand()
562 return MakeError(result, FROM_HERE); in ParseCommand()
565 result = Parse_TPM2B_DIGEST(&buffer, &authorization, nullptr); in ParseCommand()
566 if (result != TPM_RC_SUCCESS) { in ParseCommand()
567 return MakeError(result, FROM_HERE); in ParseCommand()
585 TPM_RC result = Parse_TPM_ST(&buffer, &tag, nullptr); in ParseResponse() local
586 if (result != TPM_RC_SUCCESS) { in ParseResponse()
587 return MakeError(result, FROM_HERE); in ParseResponse()
595 result = Parse_UINT32(&buffer, &size, nullptr); in ParseResponse()
596 if (result != TPM_RC_SUCCESS) { in ParseResponse()
597 return MakeError(result, FROM_HERE); in ParseResponse()
603 result = Parse_TPM_RC(&buffer, &response_info->code, nullptr); in ParseResponse()
604 if (result != TPM_RC_SUCCESS) { in ParseResponse()
605 return MakeError(result, FROM_HERE); in ParseResponse()
616 result = Parse_UINT32(&buffer, &parameter_size, nullptr); in ParseResponse()
617 if (result != TPM_RC_SUCCESS) { in ParseResponse()
618 return MakeError(result, FROM_HERE); in ParseResponse()
629 result = Parse_TPM2B_NONCE(&buffer, &nonce, nullptr); in ParseResponse()
630 if (result != TPM_RC_SUCCESS) { in ParseResponse()
631 return MakeError(result, FROM_HERE); in ParseResponse()
634 result = Parse_BYTE(&buffer, &attributes, nullptr); in ParseResponse()
635 if (result != TPM_RC_SUCCESS) { in ParseResponse()
636 return MakeError(result, FROM_HERE); in ParseResponse()
639 result = Parse_TPM2B_DIGEST(&buffer, &acknowledgement, nullptr); in ParseResponse()
640 if (result != TPM_RC_SUCCESS) { in ParseResponse()
641 return MakeError(result, FROM_HERE); in ParseResponse()
670 TPM_RC result = Parse_TPMS_CONTEXT(&mutable_parameter, in ProcessExternalContextSave() local
673 if (result != TPM_RC_SUCCESS) { in ProcessExternalContextSave()
674 LOG(WARNING) << "Invalid context save response: " << GetErrorString(result); in ProcessExternalContextSave()
729 TPM_RC result = ParseResponse(command_info, response, &response_info); in ProcessFlushContext() local
730 if (result != TPM_RC_SUCCESS) { in ProcessFlushContext()
731 return CreateErrorResponse(result); in ProcessFlushContext()
755 TPM_RC result = LoadContext(command_info, &handle_info); in ProcessInputHandle() local
756 if (result != TPM_RC_SUCCESS) { in ProcessInputHandle()
757 return result; in ProcessInputHandle()
816 TPM_RC result = TPM_RC_SUCCESS; in SaveContext() local
821 result = factory_.GetTpm()->ContextSaveSync(handle_info->tpm_handle, in SaveContext()
825 if (!FixWarnings(command_info, result)) { in SaveContext()
829 if (result != TPM_RC_SUCCESS) { in SaveContext()
831 << GetErrorString(result); in SaveContext()
832 return result; in SaveContext()
835 return result; in SaveContext()