mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-29 12:32:48 +00:00
21718769d1
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
29 lines
601 B
C
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 */
|