TianoCore EDK2 master
Loading...
Searching...
No Matches
Tpm2Sequences.c File Reference

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)
 

Detailed Description

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.

Function Documentation

◆ Tpm2EventSequenceComplete()

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.

Parameters
[in]PcrHandlePCR to be extended with the Event data
[in]SequenceHandleAuthorization for the sequence
[in]BufferData to be added to the Event
[out]ResultsList of digests computed for the PCR
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.

Definition at line 280 of file Tpm2Sequences.c.

◆ Tpm2HashSequenceStart()

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.

Parameters
[in]HashAlgThe hash algorithm to use for the hash sequence An Event sequence starts if this is TPM_ALG_NULL.
[out]SequenceHandleA handle to reference the sequence
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.

Definition at line 93 of file Tpm2Sequences.c.

◆ Tpm2SequenceComplete()

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.

Parameters
[in]SequenceHandleAuthorization for the sequence
[in]BufferData to be added to the hash/HMAC
[out]ResultThe returned HMAC or digest in a sized buffer
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.

Definition at line 412 of file Tpm2Sequences.c.

◆ Tpm2SequenceUpdate()

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.

Parameters
[in]SequenceHandleHandle for the sequence object
[in]BufferData to be added to hash
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.

Definition at line 181 of file Tpm2Sequences.c.