/* * Copyright (C) 2019 Kaspar Schleiser * 2019 Inria * 2019 Freie Universität Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @ingroup sys_suit * @{ * * @file * @brief SUIT update policy checking code * * @author Kaspar Schleiser * * @} */ #include "log.h" #include "suit/policy.h" #include "suit.h" int suit_policy_check(suit_manifest_t *manifest) { if (SUIT_DEFAULT_POLICY & ~(manifest->validated)) { LOG_INFO("SUIT policy check failed!\n"); return -1; } else { LOG_INFO("SUIT policy check OK.\n"); return 0; } }