diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-05-09 19:53:00 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-05-11 11:25:52 +0800 |
commit | eafbd7a2325e39480c5be71cc8f456c78f1bfed0 (patch) | |
tree | c2fedffca4221f02b3a6f4e626f3be15337976b2 /SecurityPkg/Tcg/Opal | |
parent | ad319b9307aaf37ffaf27890ae03dcbfd12087ce (diff) | |
download | edk2-eafbd7a2325e39480c5be71cc8f456c78f1bfed0.zip edk2-eafbd7a2325e39480c5be71cc8f456c78f1bfed0.tar.gz edk2-eafbd7a2325e39480c5be71cc8f456c78f1bfed0.tar.bz2 |
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>
Diffstat (limited to 'SecurityPkg/Tcg/Opal')
-rw-r--r-- | SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c index 3fb3553..33f74dd 100644 --- a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c +++ b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c @@ -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( )
//
|