Move LLSEC checks from `tsch-security.h` to `tsch-security.c`

Different part of the stack is pulled in from `contiki-main.c` this has the unintended
side effect of including TSCH headers even when TSCH is not used. When using LLSEC for
CSMA this triggers an error and compilation fails.
This commit is contained in:
Olav Frengstad 2018-06-06 16:53:16 +02:00
parent 052997364d
commit f8d004b92f
2 changed files with 4 additions and 4 deletions

View File

@ -53,6 +53,10 @@
#include <stdio.h>
#include <string.h>
#if LLSEC802154_ENABLED && !LLSEC802154_USES_EXPLICIT_KEYS
#error LLSEC802154_ENABLED set but LLSEC802154_USES_EXPLICIT_KEYS unset
#endif /* LLSEC802154_ENABLED */
/* The two keys K1 and K2 from 6TiSCH minimal configuration
* K1: well-known, used for EBs
* K2: secret, used for data and ACK

View File

@ -54,10 +54,6 @@
* - set LLSEC802154_CONF_USES_EXPLICIT_KEYS
* */
#if LLSEC802154_ENABLED && !LLSEC802154_USES_EXPLICIT_KEYS
#error LLSEC802154_ENABLED set but LLSEC802154_USES_EXPLICIT_KEYS unset
#endif /* LLSEC802154_ENABLED */
/* K1, defined in 6TiSCH minimal, is well-known (offers no security) and used for EBs only */
#ifdef TSCH_SECURITY_CONF_K1
#define TSCH_SECURITY_K1 TSCH_SECURITY_CONF_K1