consolidate case statement

This commit is contained in:
iadgovuser58 2024-06-24 15:20:52 -04:00
parent b6ec99c373
commit e65f11e6d5

View File

@ -527,9 +527,12 @@ public class TpmPcrEvent {
vendorTableFileStatus = efiVar.getVendorTableFileStatus(); vendorTableFileStatus = efiVar.getVendorTableFileStatus();
break; break;
case EvConstants.EV_EFI_VARIABLE_BOOT: case EvConstants.EV_EFI_VARIABLE_BOOT:
UefiVariable efiVarBoot = new UefiVariable(content); case EvConstants.EV_EFI_VARIABLE_AUTHORITY:
description += "Event Content:\n" + efiVarBoot.toString(); case EvConstants.EV_EFI_SPDM_DEVICE_POLICY:
vendorTableFileStatus = efiVarBoot.getVendorTableFileStatus(); case EvConstants.EV_EFI_SPDM_DEVICE_AUTHORITY:
UefiVariable efiVar2 = new UefiVariable(content);
description += "Event Content:\n" + efiVar2.toString();
vendorTableFileStatus = efiVar2.getVendorTableFileStatus();
break; break;
case EvConstants.EV_EFI_BOOT_SERVICES_APPLICATION: case EvConstants.EV_EFI_BOOT_SERVICES_APPLICATION:
EvEfiBootServicesApp bootServices = new EvEfiBootServicesApp(content); EvEfiBootServicesApp bootServices = new EvEfiBootServicesApp(content);
@ -557,23 +560,12 @@ public class TpmPcrEvent {
break; break;
case EvConstants.EV_EFI_HCRTM_EVENT: case EvConstants.EV_EFI_HCRTM_EVENT:
break; break;
case EvConstants.EV_EFI_VARIABLE_AUTHORITY:
UefiVariable efiVarAuth = new UefiVariable(content);
description += "Event Content:\n" + efiVarAuth.toString();
vendorTableFileStatus = efiVarAuth.getVendorTableFileStatus();
break;
case EvConstants.EV_EFI_SPDM_FIRMWARE_BLOB: case EvConstants.EV_EFI_SPDM_FIRMWARE_BLOB:
description += "Event Content:\n" + new EvEfiSpdmDeviceSecurityEvent(content).toString(); description += "Event Content:\n" + new EvEfiSpdmDeviceSecurityEvent(content).toString();
break; break;
case EvConstants.EV_EFI_SPDM_FIRMWARE_CONFIG: case EvConstants.EV_EFI_SPDM_FIRMWARE_CONFIG:
description += "Event Content:\n" + new EvEfiSpdmDeviceSecurityEvent(content).toString(); description += "Event Content:\n" + new EvEfiSpdmDeviceSecurityEvent(content).toString();
break; break;
case EvConstants.EV_EFI_SPDM_DEVICE_POLICY:
case EvConstants.EV_EFI_SPDM_DEVICE_AUTHORITY:
UefiVariable efiSpdmDevPol = new UefiVariable(content);
description += "Event Content:\n" + efiSpdmDevPol.toString();
vendorTableFileStatus = efiSpdmDevPol.getVendorTableFileStatus();
break;
default: default:
description += " Unknown Event found" + "\n"; description += " Unknown Event found" + "\n";
} }