summaryrefslogtreecommitdiff
path: root/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
diff options
context:
space:
mode:
authorSteven Kinney <steven.kinney@linaro.org>2013-11-22 08:15:09 -0600
committerSteven Kinney <steven.kinney@linaro.org>2013-11-22 08:15:09 -0600
commitaec0833cc55918a9111af736171ba8ceb976824e (patch)
tree3b188d6e0c1075a5df74f724bb302486454e25e8 /SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
parente08b4a7ea684e3358f0281da5e23ae03b1b14116 (diff)
parent0caeca1501ec2edee346a3108f45e556e7905204 (diff)
Merging uefi-next/linaro-release into masterlinaro-uefi-2013.11
Signed-off-by: Steven Kinney <steven.kinney@linaro.org>
Diffstat (limited to 'SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c')
-rw-r--r--SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
index 2458ee2ae..8860daeaf 100644
--- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
+++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
@@ -72,6 +72,25 @@ HASH_TABLE mHash[] = {
};
/**
+ SecureBoot Hook for processing image verification.
+
+ @param[in] VariableName Name of Variable to be found.
+ @param[in] VendorGuid Variable vendor GUID.
+ @param[in] DataSize Size of Data found. If size is less than the
+ data, this value contains the required size.
+ @param[in] Data Data pointer.
+
+**/
+VOID
+EFIAPI
+SecureBootHook (
+ IN CHAR16 *VariableName,
+ IN EFI_GUID *VendorGuid,
+ IN UINTN DataSize,
+ IN VOID *Data
+ );
+
+/**
Reads contents of a PE/COFF image in memory buffer.
Caution: This function may receive untrusted input.
@@ -846,6 +865,7 @@ IsSignatureFoundInDatabase (
// Find the signature in database.
//
IsFound = TRUE;
+ SecureBootHook (VariableName, &gEfiImageSecurityDatabaseGuid, CertList->SignatureSize, Cert);
break;
}
@@ -948,6 +968,7 @@ IsPkcsSignedDataVerifiedBySignatureList (
mImageDigestSize
);
if (VerifyStatus) {
+ SecureBootHook (VariableName, VendorGuid, CertList->SignatureSize, Cert);
goto Done;
}
Cert = (EFI_SIGNATURE_DATA *) ((UINT8 *) Cert + CertList->SignatureSize);