mbedtls/tests/suites/test_suite_block_cipher.function
Manuel Pégourié-Gonnard 21718769d1 Start adding internal module block_cipher.c
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-11-10 11:21:17 +01:00

29 lines
601 B
C

/* BEGIN_HEADER */
#include "block_cipher_internal.h"
#define BLOCK_SIZE 16
/* END_HEADER */
/* BEGIN_DEPENDENCIES
* depends_on:MBEDTLS_BLOCK_CIPHER_C
* END_DEPENDENCIES
*/
/* BEGIN_CASE */
void invalid()
{
mbedtls_block_cipher_context_t ctx;
mbedtls_block_cipher_init(&ctx);
TEST_EQUAL(MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA,
mbedtls_block_cipher_setup(&ctx, MBEDTLS_CIPHER_ID_NONE));
TEST_EQUAL(MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA,
mbedtls_block_cipher_setup(&ctx, MBEDTLS_CIPHER_ID_DES));
exit:
mbedtls_block_cipher_free(&ctx);
}
/* END_CASE */