Lines Matching refs:output

5  * and check that the output matches the expected output.
18 uint8_t *output = NULL;
35 ASSERT_ALLOC( output, n1 );
37 TEST_EQUAL( 0, mbedtls_ccm_update( ctx, input->x, n1, output, n1, &olen ) );
39 ASSERT_COMPARE( output, olen, expected_output->x, n1 );
40 mbedtls_free( output );
41 output = NULL;
43 ASSERT_ALLOC( output, n2 );
45 TEST_EQUAL( 0, mbedtls_ccm_update( ctx, input->x + n1, n2, output, n2, &olen ) );
47 ASSERT_COMPARE( output, olen, expected_output->x + n1, n2 );
48 mbedtls_free( output );
49 output = NULL;
51 ASSERT_ALLOC( output, tag->len );
52 TEST_EQUAL( 0, mbedtls_ccm_finish( ctx, output, tag->len ) );
53 ASSERT_COMPARE( output, tag->len, tag->x, tag->len );
54 mbedtls_free( output );
55 output = NULL;
59 mbedtls_free( output );
190 /* Prepare input/output message buffer */
200 /* Test with input == output */
239 uint8_t *output = NULL;
247 ASSERT_ALLOC( output, msg->len );
248 TEST_EQUAL( 0, mbedtls_ccm_update( &ctx, msg->x, msg->len, output, msg->len, &olen ) );
250 ASSERT_COMPARE( output, olen, result->x, result->len );
254 mbedtls_free(output);
271 /* Prepare input/output message buffer */
279 /* Test with input == output */
344 /* Prepare input/output message buffer */
366 /* Test with input == output */
427 /* Prepare input/output message buffer */
444 /* Test with input == output */
490 uint8_t *output = NULL;
501 ASSERT_ALLOC( output, result->len );
503 TEST_EQUAL( 0, mbedtls_ccm_update( &ctx, msg->x, msg->len, output, result->len, &olen ) );
505 ASSERT_COMPARE( output, olen, result->x, result->len );
506 mbedtls_free( output );
507 output = NULL;
509 ASSERT_ALLOC( output, tag->len );
510 TEST_EQUAL( 0, mbedtls_ccm_finish( &ctx, output, tag->len ) );
511 ASSERT_COMPARE( output, tag->len, tag->x, tag->len );
512 mbedtls_free( output );
513 output = NULL;
516 mbedtls_free( output );
528 uint8_t *output = NULL;
537 ASSERT_ALLOC( output, tag->len );
538 TEST_EQUAL( 0, mbedtls_ccm_finish( &ctx, output, tag->len ) );
539 ASSERT_COMPARE( output, tag->len, tag->x, tag->len );
540 mbedtls_free( output );
541 output = NULL;
544 mbedtls_free( output );
597 uint8_t *output = NULL;
608 ASSERT_ALLOC( output, msg->len );
610 …TEST_EQUAL( MBEDTLS_ERR_CCM_BAD_INPUT, mbedtls_ccm_update( &ctx, msg->x, msg->len, output, msg->le…
612 mbedtls_free( output );
623 uint8_t *output = NULL;
633 ASSERT_ALLOC( output, 16 );
634 TEST_EQUAL( MBEDTLS_ERR_CCM_BAD_INPUT, mbedtls_ccm_finish( &ctx, output, 16 ) );
637 mbedtls_free( output );
701 uint8_t *output = NULL;
713 ASSERT_ALLOC( output, msg->len );
715 mbedtls_ccm_update( &ctx, msg->x, msg->len, output, msg->len, &olen ) );
717 mbedtls_free( output );
729 uint8_t *output = NULL;
740 ASSERT_ALLOC( output, msg->len );
742 TEST_EQUAL( 0, mbedtls_ccm_update( &ctx, msg->x, msg->len - 1, output, msg->len, &olen ) );
743 mbedtls_free( output );
744 output = NULL;
746 ASSERT_ALLOC( output, 16 );
747 TEST_EQUAL( MBEDTLS_ERR_CCM_BAD_INPUT, mbedtls_ccm_finish( &ctx, output, 16 ) );
750 mbedtls_free( output );
763 uint8_t *output = NULL;
774 ASSERT_ALLOC( output, msg->len );
776 TEST_EQUAL( 0, mbedtls_ccm_update( &ctx, msg->x, msg->len, output, msg->len, &olen ) );
779 mbedtls_ccm_update( &ctx, msg->x, 1, output, 1, &olen ) );
781 mbedtls_free( output );
794 uint8_t *output = NULL;
809 ASSERT_ALLOC( output, msg->len + 1 );
811 TEST_EQUAL( 0, mbedtls_ccm_update( &ctx, msg->x, msg->len - 1, output, msg->len + 1, &olen ) );
814 … mbedtls_ccm_update( &ctx, msg_second_buffer, 2, output + msg->len - 1, 2, &olen ) );
816 mbedtls_free( output );
827 uint8_t *output = NULL;
836 ASSERT_ALLOC( output, 16 );
837 TEST_EQUAL( MBEDTLS_ERR_CCM_BAD_INPUT, mbedtls_ccm_finish( &ctx, output, 16 ) );
840 mbedtls_free( output );