/mbedtls-development/tests/suites/ |
A D | test_suite_psa_crypto_attributes.function | 23 TEST_EQUAL( 25 TEST_EQUAL( 30 TEST_EQUAL( psa_get_key_type( &attributes ), 0 ); 31 TEST_EQUAL( psa_get_key_bits( &attributes ), 0 ); 50 TEST_EQUAL( 52 TEST_EQUAL( 57 TEST_EQUAL( psa_get_key_type( &attributes ), 0 ); 58 TEST_EQUAL( psa_get_key_bits( &attributes ), 0 ); 104 TEST_EQUAL( slot_number, 0 ); 109 TEST_EQUAL( slot_number, 42 ); [all …]
|
A D | test_suite_psa_crypto_driver_wrappers.function | 51 TEST_EQUAL( actual_status, expected_status ); 619 TEST_EQUAL( status, expected_status ); 752 TEST_EQUAL( status, expected_status ); 830 TEST_EQUAL( status, expected_status ); 1053 TEST_EQUAL( output_size, 1202 TEST_EQUAL( forced_status, status ); 1221 TEST_EQUAL( forced_status, status ); 1320 TEST_EQUAL( forced_status, status ); 1337 TEST_EQUAL( forced_status, status ); 1427 TEST_EQUAL( output_size, 0 ); [all …]
|
A D | test_suite_ccm.function | 26 TEST_EQUAL( input->len, expected_output->len ); 38 TEST_EQUAL( n1, olen ); 46 TEST_EQUAL( n2, olen ); 249 TEST_EQUAL( result->len, olen ); 313 TEST_EQUAL( io_msg_buf[i], 0 ); 364 TEST_EQUAL( mbedtls_ccm_setkey( &ctx, cipher_id, 494 TEST_EQUAL( msg->len, result->len ); 504 TEST_EQUAL( result->len, olen ); 714 TEST_EQUAL( MBEDTLS_ERR_CCM_BAD_INPUT, \ 778 TEST_EQUAL( MBEDTLS_ERR_CCM_BAD_INPUT, \ [all …]
|
A D | test_suite_psa_crypto_metadata.function | 170 TEST_EQUAL( PSA_KEY_TYPE_IS_ASYMMETRIC( type ), 179 TEST_EQUAL( PSA_KEY_TYPE_IS_DH_KEY_PAIR( type ), 285 TEST_EQUAL( length, PSA_HASH_LENGTH( alg ) ); 327 TEST_EQUAL( PSA_ALG_TRUNCATED_MAC( 330 TEST_EQUAL( PSA_ALG_TRUNCATED_MAC( 333 TEST_EQUAL( PSA_ALG_TRUNCATED_MAC( 384 TEST_EQUAL( PSA_ALG_HMAC( hash_alg ), alg ); 602 TEST_EQUAL( actual_ka_alg, expected_ka_alg ); 664 TEST_EQUAL( type & PSA_KEY_TYPE_CATEGORY_MASK, 681 TEST_EQUAL( type & PSA_KEY_TYPE_CATEGORY_MASK, [all …]
|
A D | test_suite_psa_crypto_persistent_key.function | 92 TEST_EQUAL( status, expected_status ); 96 TEST_EQUAL( psa_get_key_lifetime( &attributes ), 98 TEST_EQUAL( psa_get_key_type( &attributes ), 100 TEST_EQUAL( psa_get_key_bits( &attributes ), 102 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), 104 TEST_EQUAL( psa_get_key_algorithm( &attributes ), 233 TEST_EQUAL( psa_get_key_lifetime( &attributes ), 235 TEST_EQUAL( psa_get_key_type( &attributes ), type ); 291 TEST_EQUAL( psa_get_key_lifetime( &attributes ), 293 TEST_EQUAL( psa_get_key_type( &attributes ), type ); [all …]
|
A D | test_suite_gcm.function | 26 TEST_EQUAL( input->len, expected_output->len ); 28 TEST_EQUAL( 0, mbedtls_gcm_starts( ctx, mode, 39 TEST_EQUAL( n1, olen ); 47 TEST_EQUAL( n2, olen ); 54 TEST_EQUAL( 0, olen ); 94 TEST_EQUAL( input->len, olen ); 101 TEST_EQUAL( 0, olen ); 126 TEST_EQUAL( 0, olen ); 132 TEST_EQUAL( 0, olen ); 151 TEST_EQUAL( 0, olen ); [all …]
|
A D | test_suite_asn1parse.function | 43 TEST_EQUAL( len, len2 ); 162 TEST_EQUAL( ret, 0 ); 206 TEST_EQUAL( n, offset ); 207 TEST_EQUAL( *rest, ',' ); 210 TEST_EQUAL( n, (unsigned) tag ); 211 TEST_EQUAL( *rest, ',' ); 214 TEST_EQUAL( n, len ); 322 TEST_EQUAL( ret, expected_result ); 325 TEST_EQUAL( val, expected_value ); 415 TEST_EQUAL( val, expected_value ); [all …]
|
A D | test_suite_random.function | 32 TEST_EQUAL( 0, mbedtls_ctr_drbg_seed( &drbg, 35 TEST_EQUAL( 0, mbedtls_ctr_drbg_random( &drbg, 43 TEST_EQUAL( 0, mbedtls_ctr_drbg_seed( &drbg, 46 TEST_EQUAL( 0, mbedtls_ctr_drbg_random( &drbg, 72 TEST_EQUAL( 0, mbedtls_hmac_drbg_seed( &drbg, md_info, 75 TEST_EQUAL( 0, mbedtls_hmac_drbg_random( &drbg, 83 TEST_EQUAL( 0, mbedtls_hmac_drbg_seed( &drbg, md_info, 86 TEST_EQUAL( 0, mbedtls_hmac_drbg_random( &drbg, 188 TEST_EQUAL( 0, mbedtls_mpi_lset( &d, 123456789 ) ); 189 TEST_EQUAL( 0, mbedtls_ecp_group_load( &grp, curve ) ); [all …]
|
A D | test_suite_psa_crypto_generate_key.function | 29 TEST_EQUAL( psa_generate_key( &attributes, &key_id ), 37 TEST_EQUAL( psa_get_key_lifetime( &attributes ), PSA_KEY_LIFETIME_VOLATILE ); 38 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), 0 ); 39 TEST_EQUAL( psa_get_key_algorithm( &attributes ), 0 ); 40 TEST_EQUAL( psa_get_key_type( &attributes ), key_type ); 41 TEST_EQUAL( psa_get_key_bits( &attributes ), bits );
|
A D | test_suite_psa_crypto_slot_management.function | 145 TEST_EQUAL( psa_get_key_type( &attributes ), type ); 169 TEST_EQUAL( psa_get_key_type( &attributes ), type ); 245 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), 249 TEST_EQUAL( psa_get_key_type( &attributes ), type ); 265 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), 582 TEST_EQUAL( expected_alg2, 685 TEST_EQUAL( psa_copy_key( returned_source_id, 695 TEST_EQUAL( psa_get_key_lifetime( &attributes1 ), 697 TEST_EQUAL( psa_get_key_type( &attributes1 ), 699 TEST_EQUAL( psa_get_key_bits( &attributes1 ), [all …]
|
A D | test_suite_psa_crypto.function | 223 TEST_EQUAL( 225 TEST_EQUAL( 558 TEST_EQUAL( output_length, 566 TEST_EQUAL( output_length, 1202 TEST_EQUAL( policy_usage, 1261 TEST_EQUAL( policy_usage, 1321 TEST_EQUAL( policy_usage, 1393 TEST_EQUAL( expected_usage, 1684 TEST_EQUAL( expected_alg2, 3620 TEST_EQUAL( output_size, [all …]
|
A D | test_suite_psa_crypto_entropy.function | 57 TEST_EQUAL( PSA_ERROR_INSUFFICIENT_ENTROPY, 59 TEST_EQUAL( PSA_ERROR_INSUFFICIENT_ENTROPY, 104 TEST_EQUAL( PSA_ERROR_INSUFFICIENT_ENTROPY, 149 TEST_EQUAL( status, expected_status_a ); 151 TEST_EQUAL( status, expected_status_b ); 180 TEST_EQUAL( status, PSA_SUCCESS ); 182 TEST_EQUAL( status, PSA_ERROR_INSUFFICIENT_ENTROPY ); 190 TEST_EQUAL( status, PSA_ERROR_NOT_PERMITTED );
|
A D | test_suite_psa_crypto_storage_format.function | 38 TEST_EQUAL( storage_info.size, expected_representation->len ); 89 TEST_EQUAL( psa_get_key_lifetime( expected_attributes ), 91 TEST_EQUAL( psa_get_key_type( expected_attributes ), 93 TEST_EQUAL( psa_get_key_bits( expected_attributes ), 95 TEST_EQUAL( psa_get_key_usage_flags( expected_attributes ), 97 TEST_EQUAL( psa_get_key_algorithm( expected_attributes ), 99 TEST_EQUAL( psa_get_key_enrollment_algorithm( expected_attributes ), 124 TEST_EQUAL( PSA_ERROR_NOT_PERMITTED, psa_destroy_key( key_id ) ); 130 TEST_EQUAL( PSA_ERROR_DOES_NOT_EXIST,
|
A D | test_suite_shax.function | 30 TEST_EQUAL( MBEDTLS_ERR_SHA256_BAD_INPUT_DATA, 33 TEST_EQUAL( MBEDTLS_ERR_SHA256_BAD_INPUT_DATA, 79 TEST_EQUAL( MBEDTLS_ERR_SHA512_BAD_INPUT_DATA, 82 TEST_EQUAL( MBEDTLS_ERR_SHA512_BAD_INPUT_DATA,
|
A D | test_suite_psa_crypto_not_supported.function | 23 TEST_EQUAL( psa_import_key( &attributes, 44 TEST_EQUAL( psa_generate_key( &attributes, &key_id ),
|
A D | test_suite_hmac_drbg.function | 68 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy ); 78 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy ); 89 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy ); 101 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy ); 107 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy ); 113 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy ); 118 TEST_EQUAL( sizeof( buf ) - entropy.len, expected_consumed_entropy );
|
A D | test_suite_psa_crypto_se_driver_hal.function | 536 TEST_EQUAL( psa_get_key_lifetime( &actual_attributes ), 538 TEST_EQUAL( psa_get_key_type( &actual_attributes ), 542 TEST_EQUAL( psa_get_key_algorithm( &actual_attributes ), 548 TEST_EQUAL( psa_get_key_bits( &actual_attributes ), 799 TEST_EQUAL( psa_register_se_driver( location, &driver ), 845 TEST_EQUAL( psa_register_se_driver( location, &driver ), 973 TEST_EQUAL( psa_open_key( returned_id, &handle ), 977 TEST_EQUAL( ram_slots[min_slot].type, 0 ); 1028 TEST_EQUAL( status, expected_status ); 1410 TEST_EQUAL( psa_verify_hash( sw_key, alg, [all …]
|
A D | test_suite_ctr_drbg.function | 253 TEST_EQUAL( test_offset_idx, expected_idx ); 263 TEST_EQUAL( test_offset_idx, expected_idx ); 274 TEST_EQUAL( test_offset_idx, expected_idx ); 286 TEST_EQUAL( test_offset_idx, expected_idx ); 298 TEST_EQUAL( test_offset_idx, expected_idx ); 304 TEST_EQUAL( test_offset_idx, expected_idx ); 309 TEST_EQUAL( test_offset_idx, expected_idx );
|
A D | test_suite_dhm.function | 41 TEST_EQUAL( n, mbedtls_mpi_size( expected ) ); 43 TEST_EQUAL( 0, mbedtls_mpi_read_binary( &actual, buffer + *offset, n ) ); 44 TEST_EQUAL( 0, mbedtls_mpi_cmp_mpi( expected, &actual ) ); 76 TEST_EQUAL( offset, ske_len ); 271 TEST_EQUAL( mbedtls_dhm_get_len( &ctx ), (size_t) len ); 272 TEST_EQUAL( mbedtls_dhm_get_bitlen( &ctx ), mbedtls_mpi_bitlen( &P ) );
|
A D | test_suite_ecp.function | 35 TEST_EQUAL( MBEDTLS_ERR_ECP_BAD_INPUT_DATA, 40 TEST_EQUAL( MBEDTLS_ERR_ECP_BAD_INPUT_DATA, 475 TEST_EQUAL( 0, mbedtls_ecp_group_load( &grp, id ) ); 478 TEST_EQUAL( 0, mbedtls_ecp_point_read_binary( &grp, &P1, 484 TEST_EQUAL( 0, mbedtls_ecp_point_write_binary( 916 TEST_EQUAL( 0, mbedtls_mpi_lset( &C, -c ) ); 917 TEST_EQUAL( 0, mbedtls_mpi_shift_l( &C, bits ) ); 920 TEST_EQUAL( 0, mbedtls_mpi_grow( &N, C.n ) ); 923 TEST_EQUAL( 0, mbedtls_mpi_sub_mpi( &M, &N, &C ) ); 927 TEST_EQUAL( 0, mbedtls_mpi_cmp_mpi( &N, &M ) ); [all …]
|
A D | test_suite_psa_crypto_init.function | 175 TEST_EQUAL( status, PSA_ERROR_BAD_STATE ); 196 TEST_EQUAL( status, PSA_ERROR_BAD_STATE ); 211 TEST_EQUAL( psa_crypto_init( ), expected_init_status ); 251 TEST_EQUAL( psa_crypto_init( ), expected_init_status ); 278 TEST_EQUAL( psa_crypto_init( ), expected_init_status );
|
A D | test_suite_base64.function | 31 TEST_EQUAL( m, 0xff ); 33 TEST_EQUAL( m, 0 ); 48 TEST_EQUAL( digit, base64_digits[value] ); 72 TEST_EQUAL( actual, expected );
|
A D | test_suite_camellia.function | 19 TEST_EQUAL( MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA, 25 TEST_EQUAL( MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA, 33 TEST_EQUAL( MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA,
|
/mbedtls-development/tests/src/ |
A D | psa_exercise_key.c | 81 TEST_EQUAL( status, 0 ); in check_key_attributes_sanity() 86 TEST_EQUAL( status, PSA_ERROR_INVALID_ARGUMENT ); in check_key_attributes_sanity() 281 TEST_EQUAL( psa_aead_decrypt( key, alg, in exercise_aead_key() 339 TEST_EQUAL( psa_verify_hash( key, alg, in exercise_signature_key() 367 TEST_EQUAL( psa_verify_message( key, alg, in exercise_signature_key() 666 TEST_EQUAL( len, end - p ); in mbedtls_test_psa_exported_key_sanity_check() 687 TEST_EQUAL( p - end, 0 ); in mbedtls_test_psa_exported_key_sanity_check() 719 TEST_EQUAL( len, end - p ); in mbedtls_test_psa_exported_key_sanity_check() 724 TEST_EQUAL( p - end, 0 ); in mbedtls_test_psa_exported_key_sanity_check() 759 TEST_EQUAL( exported[0], 4 ); in mbedtls_test_psa_exported_key_sanity_check() [all …]
|
/mbedtls-development/tests/include/test/ |
A D | psa_helpers.h | 34 #define PSA_ASSERT( expr ) TEST_EQUAL( ( expr ), PSA_SUCCESS )
|