mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
Merge pull request #12645 from aabadie/pr/tests/sys_crypto_remove_board_blacklist
tests/sys_crypto: remove use of BOARD_BLACKLIST variable
This commit is contained in:
commit
1f55cffcee
@ -319,8 +319,7 @@ int32_t cipher_decrypt_ocb(cipher_t *cipher, uint8_t *auth_data,
|
||||
uint8_t tag_len, uint8_t *nonce, size_t nonce_len,
|
||||
uint8_t *input, size_t input_len, uint8_t *output)
|
||||
{
|
||||
|
||||
if (input_len - tag_len > INT32_MAX) {
|
||||
if (input_len > (uint32_t)(INT32_MAX + tag_len)) {
|
||||
// We would not be able to return the proper output length for data this long
|
||||
return OCB_ERR_INVALID_DATA_LENGTH;
|
||||
}
|
||||
|
||||
@ -1,26 +1,5 @@
|
||||
include ../Makefile.tests_common
|
||||
|
||||
# Issue with integer width
|
||||
BOARD_BLACKLIST += arduino-duemilanove
|
||||
BOARD_BLACKLIST += arduino-leonardo
|
||||
BOARD_BLACKLIST += arduino-mega2560
|
||||
BOARD_BLACKLIST += arduino-nano
|
||||
BOARD_BLACKLIST += arduino-uno
|
||||
BOARD_BLACKLIST += atmega256rfr2-xpro
|
||||
BOARD_BLACKLIST += avr-rss2
|
||||
BOARD_BLACKLIST += atmega328p
|
||||
BOARD_BLACKLIST += atmega1284p
|
||||
BOARD_BLACKLIST += chronos
|
||||
BOARD_BLACKLIST += mega-xplained
|
||||
BOARD_BLACKLIST += microduino-corerf
|
||||
BOARD_BLACKLIST += msb-430
|
||||
BOARD_BLACKLIST += msb-430h
|
||||
BOARD_BLACKLIST += telosb
|
||||
BOARD_BLACKLIST += waspmote-pro
|
||||
BOARD_BLACKLIST += wsn430-v1_3b
|
||||
BOARD_BLACKLIST += wsn430-v1_4
|
||||
BOARD_BLACKLIST += z1
|
||||
|
||||
USEMODULE += embunit
|
||||
|
||||
USEMODULE += crypto
|
||||
|
||||
@ -1,6 +1,14 @@
|
||||
BOARD_INSUFFICIENT_MEMORY := \
|
||||
arduino-duemilanove \
|
||||
arduino-leonardo \
|
||||
arduino-mega2560 \
|
||||
arduino-nano \
|
||||
arduino-uno \
|
||||
atmega328p \
|
||||
chronos \
|
||||
nucleo-f031k6 \
|
||||
nucleo-f042k6 \
|
||||
nucleo-l031k6 \
|
||||
stm32f030f4-demo \
|
||||
waspmote-pro \
|
||||
#
|
||||
|
||||
@ -1009,6 +1009,9 @@ static void test_crypto_modes_ccm_check_len(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Using length_encoding above UINT16_MAX doesn't work on 8/16 bit
|
||||
architectures, SIZE_MAX is equal to UINT16_MAX there */
|
||||
#if SIZE_MAX > UINT16_MAX
|
||||
/* Just 1 to big to fit */
|
||||
ret = _test_ccm_len(cipher_encrypt_ccm, 2, NULL, 1 << 16, 0);
|
||||
TEST_ASSERT_EQUAL_INT(CCM_ERR_INVALID_LENGTH_ENCODING, ret);
|
||||
@ -1020,6 +1023,11 @@ static void test_crypto_modes_ccm_check_len(void)
|
||||
TEST_ASSERT_EQUAL_INT(CCM_ERR_INVALID_LENGTH_ENCODING, ret);
|
||||
ret = _test_ccm_len(cipher_decrypt_ccm, 2, NULL, 1 << 16, 65535);
|
||||
TEST_ASSERT_EQUAL_INT(CCM_ERR_INVALID_LENGTH_ENCODING, ret);
|
||||
#endif
|
||||
|
||||
/* Invalid length when length_encoding < 2 */
|
||||
ret = _test_ccm_len(cipher_encrypt_ccm, 1, NULL, 8, 0);
|
||||
TEST_ASSERT_EQUAL_INT(CCM_ERR_INVALID_LENGTH_ENCODING, ret);
|
||||
|
||||
/* Valid length that were wrongly checked */
|
||||
/* Check should work with len_encoding >= 4, test with 8 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user