mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-25 13:43:31 +00:00
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 */
|