Skip to content

Commit

Permalink
Measurement should not be executed when challenge failed
Browse files Browse the repository at this point in the history
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
  • Loading branch information
Wenxing-hou authored and jyao1 committed Aug 18, 2023
1 parent 728bbdc commit 2b5bbaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SecurityPkg/DeviceSecurity/SpdmSecurityLib/SpdmSecurityLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ SpdmDeviceAuthenticationAndMeasurement (
DEBUG ((DEBUG_ERROR, "DoDeviceAuthentication failed - %r\n", Status));
goto Ret;
} else {
if (AuthState == TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_FAIL_NO_SIG) {
if ((AuthState == TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_FAIL_NO_SIG) ||
(AuthState == TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_FAIL_INVALID)) {
goto Ret;
} else {
IsAuthenticated = TRUE;
Expand Down

0 comments on commit 2b5bbaf

Please sign in to comment.