summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2016-07-13 20:28:18 +0800
committerHao Wu <hao.a.wu@intel.com>2016-07-15 13:33:32 +0800
commitbf988f283a30a386e7f039add9908494af2d21ae (patch)
tree2a7c131ce21da991e54e084f74b7b885c622c213
parentdedbf7529809f1966546b4467283c414c97b34c3 (diff)
downloadedk2-platforms-bf988f283a30a386e7f039add9908494af2d21ae.tar.xz
SecurityPkg DxeImageVerificationLib: Add comments in HashPeImage()
The input PeImage in HashPeImage() has been checked. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> (cherry picked from commit 89fb5aef411587661c9a1c00645d46adf76b2fb2)
-rw-r--r--SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
index 26cefda2c3..c0c4a9093b 100644
--- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
+++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
@@ -272,11 +272,14 @@ GetImageType (
/**
Calculate hash of Pe/Coff image 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.
+ Notes: PE/COFF image has been checked by BasePeCoffLib PeCoffLoaderGetImageInfo() in
+ its caller function DxeImageVerificationHandler().
+
@param[in] HashAlg Hash algorithm type.
@retval TRUE Successfully hash image.