SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c File Reference


Functions

EFI_STATUS EFIAPI Tpm2PcrExtend (IN TPMI_DH_PCR PcrHandle, IN TPML_DIGEST_VALUES *Digests)
EFI_STATUS EFIAPI Tpm2PcrEvent (IN TPMI_DH_PCR PcrHandle, IN TPM2B_EVENT *EventData, OUT TPML_DIGEST_VALUES *Digests)
EFI_STATUS EFIAPI Tpm2PcrRead (IN TPML_PCR_SELECTION *PcrSelectionIn, OUT UINT32 *PcrUpdateCounter, OUT TPML_PCR_SELECTION *PcrSelectionOut, OUT TPML_DIGEST *PcrValues)
EFI_STATUS EFIAPI Tpm2PcrAllocate (IN TPMI_RH_PLATFORM AuthHandle, IN TPMS_AUTH_COMMAND *AuthSession, IN TPML_PCR_SELECTION *PcrAllocation, OUT TPMI_YES_NO *AllocationSuccess, OUT UINT32 *MaxPCR, OUT UINT32 *SizeNeeded, OUT UINT32 *SizeAvailable)

Detailed Description

Implement TPM2 Integrity related command.

Copyright (c) 2013 - 2014, 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 Tpm2PcrAllocate ( IN TPMI_RH_PLATFORM  AuthHandle,
IN TPMS_AUTH_COMMAND *  AuthSession,
IN TPML_PCR_SELECTION *  PcrAllocation,
OUT TPMI_YES_NO *  AllocationSuccess,
OUT UINT32 *  MaxPCR,
OUT UINT32 *  SizeNeeded,
OUT UINT32 *  SizeAvailable 
)

This command is used to set the desired PCR allocation of PCR and algorithms.

Parameters:
[in] AuthHandle TPM_RH_PLATFORM+{PP}
[in] AuthSession Auth Session context
[in] PcrAllocation The requested allocation
[out] AllocationSuccess YES if the allocation succeeded
[out] MaxPCR maximum number of PCR that may be in a bank
[out] SizeNeeded number of octets required to satisfy the request
[out] SizeAvailable Number of octets available. Computed before the allocation
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

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

Referenced by Tpm2CommandAllocPcr().

EFI_STATUS EFIAPI Tpm2PcrEvent ( IN TPMI_DH_PCR  PcrHandle,
IN TPM2B_EVENT *  EventData,
OUT TPML_DIGEST_VALUES *  Digests 
)

This command is used to cause an update to the indicated PCR. The data in eventData is hashed using the hash algorithm associated with each bank in which the indicated PCR has been allocated. After the data is hashed, the digests list is returned. If the pcrHandle references an implemented PCR and not TPM_ALG_NULL, digests list is processed as in TPM2_PCR_Extend(). A TPM shall support an Event.size of zero through 1,024 inclusive.

Parameters:
[in] PcrHandle Handle of the PCR
[in] EventData Event data in sized buffer
[out] Digests List of digest
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR Unexpected device behavior.

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

Referenced by HashAndExtend().

EFI_STATUS EFIAPI Tpm2PcrExtend ( IN TPMI_DH_PCR  PcrHandle,
IN TPML_DIGEST_VALUES *  Digests 
)

This command is used to cause an update to the indicated PCR. The digests parameter contains one or more tagged digest value identified by an algorithm ID. For each digest, the PCR associated with pcrHandle is Extended into the bank identified by the tag (hashAlg).

Parameters:
[in] PcrHandle Handle of the PCR
[in] Digests List of tagged digest values to be extended
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR Unexpected device behavior.

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

Referenced by HashAndExtend(), and HashCompleteAndExtend().

EFI_STATUS EFIAPI Tpm2PcrRead ( IN TPML_PCR_SELECTION *  PcrSelectionIn,
OUT UINT32 *  PcrUpdateCounter,
OUT TPML_PCR_SELECTION *  PcrSelectionOut,
OUT TPML_DIGEST *  PcrValues 
)

This command returns the values of all PCR specified in pcrSelect.

Parameters:
[in] PcrSelectionIn The selection of PCR to read.
[out] PcrUpdateCounter The current value of the PCR update counter.
[out] PcrSelectionOut The PCR in the returned list.
[out] PcrValues The contents of the PCR indicated in pcrSelect.
Return values:
EFI_SUCCESS Operation completed successfully.
EFI_DEVICE_ERROR The command was unsuccessful.

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


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