{\r
EFI_STATUS Status;\r
EFI_IMAGE_DOS_HEADER *DosHdr;\r
- EFI_STATUS VerifyStatus;\r
+ BOOLEAN IsVerified;\r
EFI_SIGNATURE_LIST *SignatureList;\r
UINTN SignatureListSize;\r
EFI_SIGNATURE_DATA *Signature;\r
PkcsCertData = NULL;\r
Action = EFI_IMAGE_EXECUTION_AUTH_UNTESTED;\r
Status = EFI_ACCESS_DENIED;\r
- VerifyStatus = EFI_ACCESS_DENIED;\r
+ IsVerified = FALSE;\r
\r
\r
//\r
//\r
if (IsForbiddenByDbx (AuthData, AuthDataSize)) {\r
Action = EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED;\r
- VerifyStatus = EFI_ACCESS_DENIED;\r
+ IsVerified = FALSE;\r
break;\r
}\r
\r
//\r
// Check the digital signature against the valid certificate in allowed database (db).\r
//\r
- if (EFI_ERROR (VerifyStatus)) {\r
+ if (!IsVerified) {\r
if (IsAllowedByDb (AuthData, AuthDataSize)) {\r
- VerifyStatus = EFI_SUCCESS;\r
+ IsVerified = TRUE;\r
}\r
}\r
\r
if (IsSignatureFoundInDatabase (EFI_IMAGE_SECURITY_DATABASE1, mImageDigest, &mCertType, mImageDigestSize)) {\r
Action = EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND;\r
DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: Image is signed but %s hash of image is found in DBX.\n", mHashTypeStr));\r
- VerifyStatus = EFI_ACCESS_DENIED;\r
+ IsVerified = FALSE;\r
break;\r
- } else if (EFI_ERROR (VerifyStatus)) {\r
+ } else if (!IsVerified) {\r
if (IsSignatureFoundInDatabase (EFI_IMAGE_SECURITY_DATABASE, mImageDigest, &mCertType, mImageDigestSize)) {\r
- VerifyStatus = EFI_SUCCESS;\r
+ IsVerified = TRUE;\r
} else {\r
DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: Image is signed but signature is not allowed by DB and %s hash of image is not found in DB/DBX.\n", mHashTypeStr));\r
}\r
//\r
// The Size in Certificate Table or the attribute certificate table is corrupted.\r
//\r
- VerifyStatus = EFI_ACCESS_DENIED;\r
+ IsVerified = FALSE;\r
}\r
\r
- if (!EFI_ERROR (VerifyStatus)) {\r
+ if (IsVerified) {\r
return EFI_SUCCESS;\r
} else {\r
Status = EFI_ACCESS_DENIED;\r