uefi-pk: Use the correct flag when added to the blocklist

This commit is contained in:
Richard Hughes 2022-07-14 15:25:23 +01:00
parent 8e7ad1b188
commit a5929cee29

View File

@ -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);