Functions | |
EFI_STATUS | MeasurePeImageAndExtend (IN UINT32 PCRIndex, IN EFI_PHYSICAL_ADDRESS ImageAddress, IN UINTN ImageSize, OUT TPML_DIGEST_VALUES *DigestList) |
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.
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.
[in] | PCRIndex | TPM PCR index |
[in] | ImageAddress | Start address of image buffer. |
[in] | ImageSize | Image size |
[out] | DigestList | Digeest list of this image. |
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().