TianoCore EDK2 master
|
#include <IndustryStandard/UefiTcgPlatform.h>
#include <Library/Tpm2CommandLib.h>
#include <Library/Tpm2DeviceLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
Go to the source code of this file.
Data Structures | |
struct | TPM2_HASH_SEQUENCE_START_COMMAND |
struct | TPM2_HASH_SEQUENCE_START_RESPONSE |
struct | TPM2_SEQUENCE_UPDATE_COMMAND |
struct | TPM2_SEQUENCE_UPDATE_RESPONSE |
struct | TPM2_EVENT_SEQUENCE_COMPLETE_COMMAND |
struct | TPM2_EVENT_SEQUENCE_COMPLETE_RESPONSE |
struct | TPM2_SEQUENCE_COMPLETE_COMMAND |
struct | TPM2_SEQUENCE_COMPLETE_RESPONSE |
Functions | |
EFI_STATUS EFIAPI | Tpm2HashSequenceStart (IN TPMI_ALG_HASH HashAlg, OUT TPMI_DH_OBJECT *SequenceHandle) |
EFI_STATUS EFIAPI | Tpm2SequenceUpdate (IN TPMI_DH_OBJECT SequenceHandle, IN TPM2B_MAX_BUFFER *Buffer) |
EFI_STATUS EFIAPI | Tpm2EventSequenceComplete (IN TPMI_DH_PCR PcrHandle, IN TPMI_DH_OBJECT SequenceHandle, IN TPM2B_MAX_BUFFER *Buffer, OUT TPML_DIGEST_VALUES *Results) |
EFI_STATUS EFIAPI | Tpm2SequenceComplete (IN TPMI_DH_OBJECT SequenceHandle, IN TPM2B_MAX_BUFFER *Buffer, OUT TPM2B_DIGEST *Result) |
Implement TPM2 Sequences related command.
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Tpm2Sequences.c.
EFI_STATUS EFIAPI Tpm2EventSequenceComplete | ( | IN TPMI_DH_PCR | PcrHandle, |
IN TPMI_DH_OBJECT | SequenceHandle, | ||
IN TPM2B_MAX_BUFFER * | Buffer, | ||
OUT TPML_DIGEST_VALUES * | Results | ||
) |
This command adds the last part of data, if any, to an Event sequence and returns the result in a digest list. If pcrHandle references a PCR and not TPM_RH_NULL, then the returned digest list is processed in the same manner as the digest list input parameter to TPM2_PCR_Extend() with the pcrHandle in each bank extended with the associated digest value.
[in] | PcrHandle | PCR to be extended with the Event data |
[in] | SequenceHandle | Authorization for the sequence |
[in] | Buffer | Data to be added to the Event |
[out] | Results | List of digests computed for the PCR |
EFI_SUCCESS | Operation completed successfully. |
EFI_DEVICE_ERROR | Unexpected device behavior. |
Definition at line 280 of file Tpm2Sequences.c.
EFI_STATUS EFIAPI Tpm2HashSequenceStart | ( | IN TPMI_ALG_HASH | HashAlg, |
OUT TPMI_DH_OBJECT * | SequenceHandle | ||
) |
This command starts a hash or an Event sequence. If hashAlg is an implemented hash, then a hash sequence is started. If hashAlg is TPM_ALG_NULL, then an Event sequence is started.
[in] | HashAlg | The hash algorithm to use for the hash sequence An Event sequence starts if this is TPM_ALG_NULL. |
[out] | SequenceHandle | A handle to reference the sequence |
EFI_SUCCESS | Operation completed successfully. |
EFI_DEVICE_ERROR | Unexpected device behavior. |
Definition at line 93 of file Tpm2Sequences.c.
EFI_STATUS EFIAPI Tpm2SequenceComplete | ( | IN TPMI_DH_OBJECT | SequenceHandle, |
IN TPM2B_MAX_BUFFER * | Buffer, | ||
OUT TPM2B_DIGEST * | Result | ||
) |
This command adds the last part of data, if any, to a hash/HMAC sequence and returns the result.
[in] | SequenceHandle | Authorization for the sequence |
[in] | Buffer | Data to be added to the hash/HMAC |
[out] | Result | The returned HMAC or digest in a sized buffer |
EFI_SUCCESS | Operation completed successfully. |
EFI_DEVICE_ERROR | Unexpected device behavior. |
Definition at line 412 of file Tpm2Sequences.c.
EFI_STATUS EFIAPI Tpm2SequenceUpdate | ( | IN TPMI_DH_OBJECT | SequenceHandle, |
IN TPM2B_MAX_BUFFER * | Buffer | ||
) |
This command is used to add data to a hash or HMAC sequence. The amount of data in buffer may be any size up to the limits of the TPM. NOTE: In all TPM, a buffer size of 1,024 octets is allowed.
[in] | SequenceHandle | Handle for the sequence object |
[in] | Buffer | Data to be added to hash |
EFI_SUCCESS | Operation completed successfully. |
EFI_DEVICE_ERROR | Unexpected device behavior. |
Definition at line 181 of file Tpm2Sequences.c.