mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
37 lines
810 B
C
37 lines
810 B
C
/*
|
|
* Copyright (C) 2019 Kaspar Schleiser <kaspar@schleiser.de>
|
|
* 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 <kaspar@schleiser.de>
|
|
*
|
|
* @}
|
|
*/
|
|
|
|
#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;
|
|
}
|
|
}
|