Skip to content

Commit

Permalink
Fix dead code in SpdmMeasurement
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 2b5bbaf commit aeb8c8c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions SecurityPkg/DeviceSecurity/SpdmSecurityLib/SpdmMeasurement.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,12 +653,14 @@ DoDeviceMeasurement (
NULL, 0
);
if (LIBSPDM_STATUS_IS_ERROR (SpdmReturn)) {
continue;
} else if (SpdmReturn == LIBSPDM_STATUS_VERIF_FAIL) {
AuthState = TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_FAIL_INVALID;
SecurityState->MeasurementState = EDKII_DEVICE_SECURITY_STATE_ERROR_DEVICE_ERROR;
Status = ExtendMeasurement (SpdmDeviceContext, AuthState, 0, NULL, NULL, NULL, SecurityState);
continue;
if (SpdmReturn == LIBSPDM_STATUS_VERIF_FAIL) {
AuthState = TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_FAIL_INVALID;
SecurityState->MeasurementState = EDKII_DEVICE_SECURITY_STATE_ERROR_DEVICE_ERROR;
Status = ExtendMeasurement (SpdmDeviceContext, AuthState, 0, NULL, NULL, NULL, SecurityState);
continue;
} else {
continue;
}
}

if ( (ReceivedNumberOfBlock == NumberOfBlocks - 1)
Expand Down

0 comments on commit aeb8c8c

Please sign in to comment.