if (!shim_lock)
return FALSE;
- if (shim_lock->shim_verify(data, size) == EFI_SUCCESS)
- return TRUE;
-
- return FALSE;
+ return shim_lock->shim_verify(data, size) == EFI_SUCCESS;
}
BOOLEAN secure_boot_enabled(void) {
if (shim_validate(file_buffer, file_size))
status = EFI_SUCCESS;
-
- FreePool(file_buffer);
-
- /* Try using the platform's native policy.... */
- if (status != EFI_SUCCESS)
+ else
+ /* Try using the platform's native policy.... */
status = uefi_call_wrapper(esfas, 3, this, authentication_status, device_path_const);
+ FreePool(file_buffer);
return status;
}