/* BEGIN_HEADER */ #include /* END_HEADER */ /* BEGIN_DEPENDENCIES * depends_on:POLARSSL_CCM_C * END_DEPENDENCIES */ /* BEGIN_CASE depends_on:POLARSSL_SELF_TEST:POLARSSL_AES_C */ void ccm_self_test( ) { TEST_ASSERT( ccm_self_test( 0 ) == 0 ); } /* END_CASE */ /* BEGIN_CASE */ void ccm_init( int cipher_id, int key_size, int result ) { ccm_context ctx; unsigned char key[32]; int ret; memset( key, 0x2A, sizeof( key ) ); TEST_ASSERT( (unsigned) key_size <= 8 * sizeof( key ) ); ret = ccm_init( &ctx, cipher_id, key, key_size ); TEST_ASSERT( ret == result ); ccm_free( &ctx ); } /* END_CASE */