Home
last modified time | relevance | path

Searched refs:TEST_EQUAL (Results 1 – 25 of 41) sorted by relevance

12

/third_party/mbedtls/tests/suites/
Dtest_suite_psa_crypto_attributes.function23 TEST_EQUAL(
25 TEST_EQUAL(
27 TEST_EQUAL( psa_get_key_lifetime( &attributes ), 0 );
28 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), 0 );
29 TEST_EQUAL( psa_get_key_algorithm( &attributes ), 0 );
30 TEST_EQUAL( psa_get_key_type( &attributes ), 0 );
31 TEST_EQUAL( psa_get_key_bits( &attributes ), 0 );
42 TEST_EQUAL( psa_get_key_lifetime( &attributes ), lifetime );
43 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), usage_flags );
44 TEST_EQUAL( psa_get_key_algorithm( &attributes ), alg );
[all …]
Dtest_suite_psa_crypto_driver_wrappers.function51 TEST_EQUAL( actual_status, expected_status );
57 TEST_EQUAL( mbedtls_test_driver_signature_sign_hooks.hits, 1 );
112 TEST_EQUAL( actual_status, expected_status );
113 TEST_EQUAL( mbedtls_test_driver_signature_verify_hooks.hits, 1 );
165 TEST_EQUAL( actual_status, expected_status );
172 TEST_EQUAL( mbedtls_test_driver_signature_sign_hooks.hits,
228 TEST_EQUAL( actual_status, expected_status );
230 TEST_EQUAL( mbedtls_test_driver_signature_verify_hooks.hits,
283 TEST_EQUAL( mbedtls_test_driver_key_management_hooks.hits, 1 );
284 TEST_EQUAL( actual_status, expected_status );
[all …]
Dtest_suite_ccm.function26 TEST_EQUAL( input->len, expected_output->len );
27 TEST_EQUAL( 0, mbedtls_ccm_starts( ctx, mode, iv->x, iv->len ) );
28 TEST_EQUAL( 0, mbedtls_ccm_set_lengths( ctx, add->len, input->len, tag->len ) );
29 TEST_EQUAL( 0, mbedtls_ccm_update_ad( ctx, add->x, n1_add) );
30 TEST_EQUAL( 0, mbedtls_ccm_update_ad( ctx, add->x + n1_add, n2_add ) );
37 TEST_EQUAL( 0, mbedtls_ccm_update( ctx, input->x, n1, output, n1, &olen ) );
38 TEST_EQUAL( n1, olen );
45 TEST_EQUAL( 0, mbedtls_ccm_update( ctx, input->x + n1, n2, output, n2, &olen ) );
46 TEST_EQUAL( n2, olen );
52 TEST_EQUAL( 0, mbedtls_ccm_finish( ctx, output, tag->len ) );
[all …]
Dtest_suite_psa_crypto_metadata.function150 TEST_EQUAL( classification_flags_tested, ALG_FLAG_MASK_PLUS_ONE - 1 );
167 TEST_EQUAL( classification_flags_tested, KEY_TYPE_FLAG_MASK_PLUS_ONE - 1 );
170 TEST_EQUAL( PSA_KEY_TYPE_IS_ASYMMETRIC( type ),
173 TEST_EQUAL( PSA_KEY_TYPE_IS_ECC_KEY_PAIR( type ),
176 TEST_EQUAL( PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY( type ),
179 TEST_EQUAL( PSA_KEY_TYPE_IS_DH_KEY_PAIR( type ),
182 TEST_EQUAL( PSA_KEY_TYPE_IS_DH_PUBLIC_KEY( type ),
208 TEST_EQUAL( length, PSA_MAC_LENGTH( key_type, key_bits, alg ) );
234 TEST_EQUAL( tag_length, PSA_AEAD_TAG_LENGTH( key_type, key_bits, alg ) );
274 TEST_EQUAL( PSA_ALG_HMAC_GET_HASH( hmac_alg ), alg );
[all …]
Dtest_suite_psa_crypto_persistent_key.function92 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 ),
106 TEST_EQUAL( psa_get_key_enrollment_algorithm( &attributes ),
131 TEST_EQUAL( psa_import_key( &attributes, data, data_length, &key_id ),
170 TEST_EQUAL( psa_is_key_present_in_storage( key_id ), 1 );
176 TEST_EQUAL( psa_is_key_present_in_storage( key_id ), 0 );
[all …]
Dtest_suite_gcm.function26 TEST_EQUAL( input->len, expected_output->len );
28 TEST_EQUAL( 0, mbedtls_gcm_starts( ctx, mode,
30 TEST_EQUAL( 0, mbedtls_gcm_update_ad( ctx, add->x, n1_add ) );
31 TEST_EQUAL( 0, mbedtls_gcm_update_ad( ctx, add->x + n1_add, n2_add ) );
38 TEST_EQUAL( 0, mbedtls_gcm_update( ctx, input->x, n1, output, n1, &olen ) );
39 TEST_EQUAL( n1, olen );
46 TEST_EQUAL( 0, mbedtls_gcm_update( ctx, input->x + n1, n2, output, n2, &olen ) );
47 TEST_EQUAL( n2, olen );
53 TEST_EQUAL( 0, mbedtls_gcm_finish( ctx, NULL, 0, &olen, output, tag->len ) );
54 TEST_EQUAL( 0, olen );
[all …]
Dtest_suite_asn1parse.function39 TEST_EQUAL( mbedtls_asn1_get_tag( p, end, &len2, tag ^ 1 ),
42 TEST_EQUAL( mbedtls_asn1_get_tag( p, end, &len2, tag ), 0 );
43 TEST_EQUAL( len, len2 );
162 TEST_EQUAL( ret, 0 );
164 TEST_EQUAL( parsed_length, actual_length );
168 TEST_EQUAL( ret, MBEDTLS_ERR_ASN1_OUT_OF_DATA );
206 TEST_EQUAL( n, offset );
207 TEST_EQUAL( *rest, ',' );
210 TEST_EQUAL( n, (unsigned) tag );
211 TEST_EQUAL( *rest, ',' );
[all …]
Dtest_suite_random.function32 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,
108 TEST_EQUAL( 0, mbedtls_psa_get_random( MBEDTLS_PSA_RANDOM_STATE,
114 TEST_EQUAL( 0, mbedtls_psa_get_random( MBEDTLS_PSA_RANDOM_STATE,
[all …]
Dtest_suite_psa_crypto_slot_management.function145 TEST_EQUAL( psa_get_key_type( &attributes ), type );
158 TEST_EQUAL( psa_open_key( key_with_invalid_owner, &handle ),
169 TEST_EQUAL( psa_get_key_type( &attributes ), type );
180 TEST_EQUAL( psa_get_key_attributes( key, &attributes ),
182 TEST_EQUAL( psa_close_key( key ), PSA_ERROR_INVALID_HANDLE );
237 TEST_EQUAL( psa_open_key( wrong_owner_id, &invalid_svc_key_id ),
242 TEST_EQUAL( psa_get_key_lifetime( &attributes ), lifetime );
245 TEST_EQUAL( psa_get_key_usage_flags( &attributes ),
247 TEST_EQUAL( psa_get_key_algorithm( &attributes ), alg );
248 TEST_EQUAL( psa_get_key_enrollment_algorithm( &attributes ), alg2 );
[all …]
Dtest_suite_psa_crypto_generate_key.function29 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 );
Dtest_suite_psa_crypto.function164 TEST_EQUAL( psa_mac_sign_setup( operation, key, alg ), *status );
197 TEST_EQUAL( psa_cipher_encrypt_setup( operation, key, alg ),
221 TEST_EQUAL( psa_get_key_attributes( key, &attributes ),
223 TEST_EQUAL(
225 TEST_EQUAL(
227 TEST_EQUAL( psa_get_key_lifetime( &attributes ), 0 );
228 TEST_EQUAL( psa_get_key_usage_flags( &attributes ), 0 );
229 TEST_EQUAL( psa_get_key_algorithm( &attributes ), 0 );
230 TEST_EQUAL( psa_get_key_type( &attributes ), 0 );
231 TEST_EQUAL( psa_get_key_bits( &attributes ), 0 );
[all …]
Dtest_suite_psa_crypto_entropy.function57 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 );
Dtest_suite_psa_crypto_storage_format.function38 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,
Dtest_suite_shax.function30 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,
Dtest_suite_psa_crypto_se_driver_hal.function536 TEST_EQUAL( psa_get_key_lifetime( &actual_attributes ),
538 TEST_EQUAL( psa_get_key_type( &actual_attributes ),
540 TEST_EQUAL( psa_get_key_usage_flags( &actual_attributes ),
542 TEST_EQUAL( psa_get_key_algorithm( &actual_attributes ),
544 TEST_EQUAL( psa_get_key_enrollment_algorithm( &actual_attributes ),
548 TEST_EQUAL( psa_get_key_bits( &actual_attributes ),
562 TEST_EQUAL( status, PSA_ERROR_INVALID_ARGUMENT );
573 TEST_EQUAL( desired_slot_number, actual_slot_number );
628 TEST_EQUAL( psa_its_get_info( uid, &info ), PSA_ERROR_DOES_NOT_EXIST );
799 TEST_EQUAL( psa_register_se_driver( location, &driver ),
[all …]
Dtest_suite_hmac_drbg.function68 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 );
Dtest_suite_ctr_drbg.function253 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 );
Dtest_suite_ecp.function35 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 ) );
476 TEST_EQUAL( 0, mbedtls_mpi_read_binary( &u1, u1_bin->x, u1_bin->len ) );
477 TEST_EQUAL( 0, mbedtls_mpi_read_binary( &u2, u2_bin->x, u2_bin->len ) );
478 TEST_EQUAL( 0, mbedtls_ecp_point_read_binary( &grp, &P1,
480 TEST_EQUAL( 0, mbedtls_ecp_point_read_binary( &grp, &P2,
483 TEST_EQUAL( 0, mbedtls_ecp_muladd( &grp, &R, &u1, &P1, &u2, &P2 ) );
484 TEST_EQUAL( 0, mbedtls_ecp_point_write_binary(
916 TEST_EQUAL( 0, mbedtls_mpi_lset( &C, -c ) );
[all …]
Dtest_suite_dhm.function41 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 ) );
Dtest_suite_psa_crypto_not_supported.function23 TEST_EQUAL( psa_import_key( &attributes,
44 TEST_EQUAL( psa_generate_key( &attributes, &key_id ),
Dtest_suite_psa_crypto_init.function175 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 );
Dtest_suite_base64.function32 TEST_EQUAL( m, 0xff );
34 TEST_EQUAL( m, 0 );
49 TEST_EQUAL( digit, base64_digits[value] );
73 TEST_EQUAL( actual, expected );
Dtest_suite_camellia.function19 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,
Dtest_suite_aes.function369 TEST_EQUAL( MBEDTLS_ERR_AES_BAD_INPUT_DATA,
373 TEST_EQUAL( MBEDTLS_ERR_AES_BAD_INPUT_DATA,
381 TEST_EQUAL( MBEDTLS_ERR_AES_BAD_INPUT_DATA,
389 TEST_EQUAL( MBEDTLS_ERR_AES_BAD_INPUT_DATA,
392 TEST_EQUAL( MBEDTLS_ERR_AES_BAD_INPUT_DATA,
/third_party/mbedtls/tests/src/
Dpsa_exercise_key.c82 TEST_EQUAL( status, 0 ); in check_key_attributes_sanity()
87 TEST_EQUAL( status, PSA_ERROR_INVALID_ARGUMENT ); in check_key_attributes_sanity()
151 TEST_EQUAL( psa_mac_verify_finish( &operation, mac, mac_length ), in exercise_mac_key()
282 TEST_EQUAL( psa_aead_decrypt( key, alg, in exercise_aead_key()
340 TEST_EQUAL( psa_verify_hash( key, alg, in exercise_signature_key()
368 TEST_EQUAL( psa_verify_message( key, alg, in exercise_signature_key()
643 TEST_EQUAL( exported_length, PSA_BITS_TO_BYTES( bits ) ); in mbedtls_test_psa_exported_key_sanity_check()
664 TEST_EQUAL( mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_test_psa_exported_key_sanity_check()
667 TEST_EQUAL( len, end - p ); in mbedtls_test_psa_exported_key_sanity_check()
688 TEST_EQUAL( p - end, 0 ); in mbedtls_test_psa_exported_key_sanity_check()
[all …]

12