From a5929cee29e131ad9da82c79aeb79a6daa152e0b Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 14 Jul 2022 15:25:23 +0100 Subject: [PATCH] uefi-pk: Use the correct flag when added to the blocklist --- plugins/uefi-pk/fu-plugin-uefi-pk.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/uefi-pk/fu-plugin-uefi-pk.c b/plugins/uefi-pk/fu-plugin-uefi-pk.c index 4794bd199..d7f1b5285 100644 --- a/plugins/uefi-pk/fu-plugin-uefi-pk.c +++ b/plugins/uefi-pk/fu-plugin-uefi-pk.c @@ -179,8 +179,14 @@ fu_plugin_uefi_pk_add_security_attrs(FuPlugin *plugin, FuSecurityAttrs *attrs) fwupd_security_attr_add_guids(attr, fu_device_get_guids(msf_device)); fu_security_attrs_append(attrs, attr); - /* not enabled or test key is not secure */ - if (priv == NULL || priv->has_pk_test_key) { + /* not enabled */ + if (priv == NULL) { + fwupd_security_attr_add_flag(attr, FWUPD_SECURITY_ATTR_FLAG_MISSING_DATA); + return; + } + + /* test key is not secure */ + if (priv->has_pk_test_key) { fwupd_security_attr_set_result(attr, FWUPD_SECURITY_ATTR_RESULT_NOT_VALID); fwupd_security_attr_add_flag(attr, FWUPD_SECURITY_ATTR_FLAG_ACTION_CONFIG_FW); fwupd_security_attr_add_flag(attr, FWUPD_SECURITY_ATTR_FLAG_ACTION_CONTACT_OEM);