SecurityPkg/Tcg/TrEEDxe/MeasureBootPeCoff.c File Reference


Functions

EFI_STATUS MeasurePeImageAndExtend (IN UINT32 PCRIndex, IN EFI_PHYSICAL_ADDRESS ImageAddress, IN UINTN ImageSize, OUT TPML_DIGEST_VALUES *DigestList)

Detailed Description

This module implements measuring PeCoff image for TrEE Protocol.

Caution: This file requires additional review when modified. This driver will have external input - PE/COFF image. This external input must be validated carefully to avoid security issue like buffer overflow, integer overflow.

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 MeasurePeImageAndExtend ( IN UINT32  PCRIndex,
IN EFI_PHYSICAL_ADDRESS  ImageAddress,
IN UINTN  ImageSize,
OUT TPML_DIGEST_VALUES *  DigestList 
)

Measure PE image into TPM log based on the authenticode image hashing in PE/COFF Specification 8.0 Appendix A.

Caution: This function may receive untrusted input. PE/COFF image is external input, so this function will validate its data structure within this image buffer before use.

Parameters:
[in] PCRIndex TPM PCR index
[in] ImageAddress Start address of image buffer.
[in] ImageSize Image size
[out] DigestList Digeest list of this image.
Return values:
EFI_SUCCESS Successfully measure image.
EFI_OUT_OF_RESOURCES No enough resource to measure image.
other error value

References EFI_STATUS(), HashCompleteAndExtend(), HashStart(), HashUpdate(), and UINTN().

Referenced by Tcg2HashLogExtendEvent(), and TreeHashLogExtendEvent().


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