mirror of https://github.com/acidanthera/audk.git
Security/OpalPasswordDxe: Enhance the logic in RouteConfig/ExtractConfig
Make the implementation of RouteConfig/ExtractConfig function follow the UEFI spec. Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
This commit is contained in:
parent
ad319b9307
commit
eafbd7a232
|
@ -30,6 +30,8 @@ extern UINT8 OpalPasswordFormBin[];
|
|||
//
|
||||
extern UINT8 OpalPasswordDxeStrings[];
|
||||
|
||||
CHAR16 OpalPasswordStorageName[] = L"OpalHiiConfig";
|
||||
|
||||
EFI_HII_CONFIG_ACCESS_PROTOCOL gHiiConfigAccessProtocol;
|
||||
|
||||
//
|
||||
|
@ -1145,6 +1147,13 @@ RouteConfig(
|
|||
return (EFI_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
*Progress = Configuration;
|
||||
if (!HiiIsConfigHdrMatch (Configuration, &gHiiSetupVariableGuid, OpalPasswordStorageName)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
*Progress = Configuration + StrLen (Configuration);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1192,6 +1201,12 @@ ExtractConfig(
|
|||
return (EFI_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
*Progress = Request;
|
||||
if ((Request != NULL) &&
|
||||
!HiiIsConfigHdrMatch (Request, &gHiiSetupVariableGuid, OpalPasswordStorageName)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
//
|
||||
// Convert Buffer Data to <ConfigResp> by helper function BlockToConfig( )
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue