Beispiel #1
0
grub_err_t
grub_tpm_execute (PassThroughToTPM_InputParamBlock *inbuf,
		  PassThroughToTPM_OutputParamBlock *outbuf)
{
  grub_efi_handle_t tpm_handle;
  grub_uint8_t protocol_version;

  /* Absence of a TPM isn't a failure. */
  if (!grub_tpm_handle_find (&tpm_handle, &protocol_version))
    return 0;

  if (protocol_version == 1)
    return grub_tpm1_execute (tpm_handle, inbuf, outbuf);
  else
    return grub_tpm2_execute (tpm_handle, inbuf, outbuf);
}
Beispiel #2
0
grub_err_t
grub_tpm_execute(PassThroughToTPM_InputParamBlock *inbuf,
		 PassThroughToTPM_OutputParamBlock *outbuf)
{
  grub_efi_handle_t tpm_handle;
   grub_uint8_t protocol_version;

  /* It's not a hard failure for there to be no TPM */
  if (!grub_tpm_handle_find(&tpm_handle, &protocol_version))
    return 0;

  if (protocol_version == 1) {
    return grub_tpm1_execute(tpm_handle, inbuf, outbuf);
  } else {
    return grub_tpm2_execute(tpm_handle, inbuf, outbuf);
  }
}