SecurityPkg/Library/Tpm2CommandLib/Tpm2Sequences.c File Reference


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, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Function Documentation

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] 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
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR Unexpected device behavior.

References CopyAuthSessionCommand(), EFI_STATUS(), GetHashSizeFromAlgo(), and Tpm2SubmitCommand().

Referenced by HashAndExtend(), and HashCompleteAndExtend().

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] 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
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR Unexpected device behavior.

References EFI_STATUS(), and Tpm2SubmitCommand().

Referenced by HashAndExtend(), and HashStart().

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] 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
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR Unexpected device behavior.

References CopyAuthSessionCommand(), EFI_STATUS(), and Tpm2SubmitCommand().

Referenced by HashAndExtend(), and HashCompleteAndExtend().

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] SequenceHandle Handle for the sequence object
[in] Buffer Data to be added to hash
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR Unexpected device behavior.

References CopyAuthSessionCommand(), EFI_STATUS(), and Tpm2SubmitCommand().

Referenced by HashAndExtend(), HashCompleteAndExtend(), and HashUpdate().


Generated on Thu Sep 24 23:44:24 2015 for SecurityPkg[ALL] by  doxygen 1.5.7.1