/net-tools-latest/mbedtls-2.4.0/tests/suites/ |
D | test_suite_ecp.function | 20 TEST_ASSERT( by_id != NULL ); 21 TEST_ASSERT( by_tls != NULL ); 22 TEST_ASSERT( by_name != NULL ); 24 TEST_ASSERT( by_id == by_tls ); 25 TEST_ASSERT( by_id == by_name ); 27 TEST_ASSERT( by_id->bit_size == size ); 40 TEST_ASSERT( mbedtls_ecp_group_load( &grp, grp_id ) == 0 ); 42 TEST_ASSERT( mbedtls_mpi_read_string( &P.X, 16, key_hex ) == 0 ); 43 TEST_ASSERT( mbedtls_mpi_lset( &P.Z, 1 ) == 0 ); 45 TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &P ) == ret ); [all …]
|
D | test_suite_mpi.function | 19 TEST_ASSERT( mbedtls_mpi_get_bit( &X, 42 ) == 0 ); 20 TEST_ASSERT( mbedtls_mpi_lsb( &X ) == 0 ); 21 TEST_ASSERT( mbedtls_mpi_bitlen( &X ) == 0 ); 22 TEST_ASSERT( mbedtls_mpi_size( &X ) == 0 ); 40 TEST_ASSERT( mbedtls_mpi_read_string( &X, radix_X, input_X ) == result_read ); 43 … TEST_ASSERT( mbedtls_mpi_write_string( &X, radix_A, str, output_size, &len ) == result_write ); 46 TEST_ASSERT( strcasecmp( str, input_A ) == 0 ); 68 TEST_ASSERT( mbedtls_mpi_read_binary( &X, buf, input_len ) == 0 ); 69 TEST_ASSERT( mbedtls_mpi_write_string( &X, radix_A, (char *) str, sizeof( str ), &len ) == 0 ); 70 TEST_ASSERT( strcmp( (char *) str, input_A ) == 0 ); [all …]
|
D | test_suite_cipher.function | 20 TEST_ASSERT( mbedtls_cipher_info_from_type( *cipher_type ) != NULL ); 34 TEST_ASSERT( mbedtls_cipher_get_block_size( NULL ) == 0 ); 35 TEST_ASSERT( mbedtls_cipher_get_block_size( &ctx ) == 0 ); 37 TEST_ASSERT( mbedtls_cipher_get_cipher_mode( NULL ) == MBEDTLS_MODE_NONE ); 38 TEST_ASSERT( mbedtls_cipher_get_cipher_mode( &ctx ) == MBEDTLS_MODE_NONE ); 40 TEST_ASSERT( mbedtls_cipher_get_iv_size( NULL ) == 0 ); 41 TEST_ASSERT( mbedtls_cipher_get_iv_size( &ctx ) == 0 ); 43 TEST_ASSERT( mbedtls_cipher_info_from_string( NULL ) == NULL ); 45 TEST_ASSERT( mbedtls_cipher_setup( &ctx, NULL ) 47 TEST_ASSERT( mbedtls_cipher_setup( NULL, info ) [all …]
|
D | test_suite_md.function | 31 TEST_ASSERT( info != NULL ); 32 TEST_ASSERT( mbedtls_md_setup( &ctx, info, 0 ) == 0 ); 33 TEST_ASSERT( mbedtls_md_process( &ctx, buf ) == 0 ); 51 TEST_ASSERT( mbedtls_md_get_size( NULL ) == 0 ); 52 TEST_ASSERT( mbedtls_md_get_type( NULL ) == MBEDTLS_MD_NONE ); 53 TEST_ASSERT( mbedtls_md_get_name( NULL ) == NULL ); 55 TEST_ASSERT( mbedtls_md_info_from_string( NULL ) == NULL ); 57 TEST_ASSERT( mbedtls_md_setup( &ctx, NULL, 0 ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); 58 TEST_ASSERT( mbedtls_md_setup( NULL, info, 0 ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); 60 TEST_ASSERT( mbedtls_md_starts( NULL ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA ); [all …]
|
D | test_suite_cmac.function | 14 TEST_ASSERT( mbedtls_cmac_self_test( 1 ) == 0 ); 30 TEST_ASSERT( mbedtls_cipher_cmac_update( &ctx, test_data, 16 ) == 34 TEST_ASSERT( mbedtls_cipher_setup( &ctx, cipher_info ) == 0 ); 36 TEST_ASSERT( mbedtls_cipher_cmac_starts( NULL, test_key, 128 ) == 39 TEST_ASSERT( mbedtls_cipher_cmac_starts( &ctx, NULL, 128 ) == 42 TEST_ASSERT( mbedtls_cipher_cmac_update( NULL, test_data, 16 ) == 45 TEST_ASSERT( mbedtls_cipher_cmac_update( &ctx, NULL, 16 ) == 48 TEST_ASSERT( mbedtls_cipher_cmac_finish( NULL, test_output ) == 51 TEST_ASSERT( mbedtls_cipher_cmac_finish( &ctx, NULL ) == 54 TEST_ASSERT( mbedtls_cipher_cmac_reset( NULL ) == [all …]
|
D | test_suite_dhm.function | 39 TEST_ASSERT( mbedtls_mpi_read_string( &ctx_srv.P, radix_P, input_P ) == 0 ); 40 TEST_ASSERT( mbedtls_mpi_read_string( &ctx_srv.G, radix_G, input_G ) == 0 ); 47 …TEST_ASSERT( mbedtls_dhm_make_params( &ctx_srv, x_size, ske, &ske_len, &rnd_pseudo_rand, &rnd_info… 50 TEST_ASSERT( mbedtls_dhm_read_params( &ctx_cli, &p, ske + ske_len ) == 0 ); 52 …TEST_ASSERT( mbedtls_dhm_make_public( &ctx_cli, x_size, pub_cli, pub_cli_len, &rnd_pseudo_rand, &r… 53 TEST_ASSERT( mbedtls_dhm_read_public( &ctx_srv, pub_cli, pub_cli_len ) == 0 ); 55 …TEST_ASSERT( mbedtls_dhm_calc_secret( &ctx_srv, sec_srv, sizeof( sec_srv ), &sec_srv_len, &rnd_pse… 56 …TEST_ASSERT( mbedtls_dhm_calc_secret( &ctx_cli, sec_cli, sizeof( sec_cli ), &sec_cli_len, NULL, NU… 58 TEST_ASSERT( sec_srv_len == sec_cli_len ); 59 TEST_ASSERT( sec_srv_len != 0 ); [all …]
|
D | test_suite_rsa.function | 43 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); 44 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); 45 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); 46 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); 48 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 ); 49 TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 ); 50 TEST_ASSERT( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) == 0 ); 51 TEST_ASSERT( mbedtls_mpi_gcd( &G, &ctx.E, &H ) == 0 ); 52 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.D , &ctx.E, &H ) == 0 ); 53 TEST_ASSERT( mbedtls_mpi_mod_mpi( &ctx.DP, &ctx.D, &P1 ) == 0 ); [all …]
|
D | test_suite_x509write.function | 31 TEST_ASSERT( mbedtls_pk_parse_keyfile( &key, key_file, NULL ) == 0 ); 36 TEST_ASSERT( mbedtls_x509write_csr_set_subject_name( &req, subject_name ) == 0 ); 38 TEST_ASSERT( mbedtls_x509write_csr_set_key_usage( &req, key_usage ) == 0 ); 40 TEST_ASSERT( mbedtls_x509write_csr_set_ns_cert_type( &req, cert_type ) == 0 ); 44 TEST_ASSERT( ret == 0 ); 49 TEST_ASSERT( f != NULL ); 53 TEST_ASSERT( olen >= pem_len - 1 ); 54 TEST_ASSERT( memcmp( buf, check_buf, pem_len - 1 ) == 0 ); 58 TEST_ASSERT( der_len >= 0 ); 65 TEST_ASSERT( ret == MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); [all …]
|
D | test_suite_x509parse.function | 130 TEST_ASSERT( mbedtls_x509_crt_parse_file( &crt, crt_file ) == 0 ); 133 TEST_ASSERT( res != -1 ); 134 TEST_ASSERT( res != -2 ); 136 TEST_ASSERT( strcmp( buf, result_str ) == 0 ); 153 TEST_ASSERT( mbedtls_x509_crl_parse_file( &crl, crl_file ) == 0 ); 156 TEST_ASSERT( res != -1 ); 157 TEST_ASSERT( res != -2 ); 159 TEST_ASSERT( strcmp( buf, result_str ) == 0 ); 176 TEST_ASSERT( mbedtls_x509_csr_parse_file( &csr, csr_file ) == 0 ); 179 TEST_ASSERT( res != -1 ); [all …]
|
D | test_suite_pkcs1_v15.function | 34 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); 35 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); 37 TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); 41 …TEST_ASSERT( mbedtls_rsa_pkcs1_encrypt( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PUBLIC, msg_len… 46 TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); 79 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); 80 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); 81 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); 82 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); 84 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 ); [all …]
|
D | test_suite_ecdh.function | 24 TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); 26 TEST_ASSERT( mbedtls_ecdh_gen_public( &grp, &dA, &qA, &rnd_pseudo_rand, &rnd_info ) 28 TEST_ASSERT( mbedtls_ecdh_gen_public( &grp, &dB, &qB, &rnd_pseudo_rand, &rnd_info ) 30 TEST_ASSERT( mbedtls_ecdh_compute_shared( &grp, &zA, &qB, &dA, 32 TEST_ASSERT( mbedtls_ecdh_compute_shared( &grp, &zB, &qA, &dB, 35 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &zA, &zB ) == 0 ); 62 TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); 96 TEST_ASSERT( mbedtls_ecdh_gen_public( &grp, &dA, &qA, 98 TEST_ASSERT( ! mbedtls_ecp_is_zero( &qA ) ); 99 TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, xA_str ) == 0 ); [all …]
|
D | test_suite_pkcs1_v21.function | 34 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); 35 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); 37 TEST_ASSERT( mbedtls_rsa_check_pubkey( &ctx ) == 0 ); 41 …TEST_ASSERT( mbedtls_rsa_pkcs1_encrypt( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PUBLIC, msg_len… 46 TEST_ASSERT( strcasecmp( (char *) output_str, result_hex_str ) == 0 ); 79 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 ); 80 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 ); 81 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.N, radix_N, input_N ) == 0 ); 82 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.E, radix_E, input_E ) == 0 ); 84 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 ); [all …]
|
D | test_suite_ctr_drbg.function | 30 TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, 34 TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, 39 TEST_ASSERT( mbedtls_ctr_drbg_reseed( &ctx, additional, 70 …TEST_ASSERT( mbedtls_ctr_drbg_seed_entropy_len( &ctx, mbedtls_entropy_func, entropy, add_init, add… 73 TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, buf, 16, add1, add1_len ) == 0 ); 74 TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, buf, 16, add2, add2_len ) == 0 ); 76 TEST_ASSERT( strcmp( (char *) output_str, result_str ) == 0 ); 108 …TEST_ASSERT( mbedtls_ctr_drbg_seed_entropy_len( &ctx, mbedtls_entropy_func, entropy, add_init, add… 110 TEST_ASSERT( mbedtls_ctr_drbg_random_with_add( &ctx, buf, 16, add1, add1_len ) == 0 ); 111 TEST_ASSERT( mbedtls_ctr_drbg_reseed( &ctx, add_reseed, add_reseed_len ) == 0 ); [all …]
|
D | test_suite_hmac_drbg.function | 49 TEST_ASSERT( md_info != NULL ); 53 TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, mbedtls_entropy_func, &entropy, 55 TEST_ASSERT( entropy.len < last_len ); 62 TEST_ASSERT( mbedtls_hmac_drbg_random( &ctx, out, sizeof( out ) - 4 ) == 0 ); 63 TEST_ASSERT( mbedtls_hmac_drbg_random_with_add( &ctx, out, sizeof( out ) - 4, 66 TEST_ASSERT( entropy.len == last_len ); 69 TEST_ASSERT( out[sizeof( out ) - 4] == 0 ); 70 TEST_ASSERT( out[sizeof( out ) - 3] == 0 ); 71 TEST_ASSERT( out[sizeof( out ) - 2] == 0 ); 72 TEST_ASSERT( out[sizeof( out ) - 1] == 0 ); [all …]
|
D | test_suite_pk.function | 73 TEST_ASSERT( mbedtls_pk_setup( &pk, mbedtls_pk_info_from_type( type ) ) == 0 ); 74 TEST_ASSERT( pk_genkey( &pk ) == 0 ); 76 TEST_ASSERT( (int) mbedtls_pk_get_type( &pk ) == type ); 77 TEST_ASSERT( mbedtls_pk_can_do( &pk, type ) ); 78 TEST_ASSERT( mbedtls_pk_get_bitlen( &pk ) == (unsigned) size ); 79 TEST_ASSERT( mbedtls_pk_get_len( &pk ) == (unsigned) len ); 80 TEST_ASSERT( strcmp( mbedtls_pk_get_name( &pk), name ) == 0 ); 96 TEST_ASSERT( mbedtls_pk_parse_public_keyfile( &pub, pub_file ) == 0 ); 97 TEST_ASSERT( mbedtls_pk_parse_keyfile( &prv, prv_file, NULL ) == 0 ); 99 TEST_ASSERT( mbedtls_pk_check_pair( &pub, &prv ) == ret ); [all …]
|
D | test_suite_memory_buffer_alloc.function | 28 TEST_ASSERT( mbedtls_memory_buffer_alloc_self_test( 1 ) == 0 ); 53 TEST_ASSERT( check_pointer( ptr_a ) == 0 ); 61 TEST_ASSERT( check_pointer( ptr_b ) == 0 ); 69 TEST_ASSERT( check_pointer( ptr_c ) == 0 ); 77 TEST_ASSERT( check_pointer( ptr_d ) == 0 ); 83 TEST_ASSERT( reported_bytes == allocated_bytes ); 89 TEST_ASSERT( mbedtls_memory_buffer_alloc_verify() == 0 ); 98 TEST_ASSERT( mbedtls_memory_buffer_alloc_verify() == 0 ); 107 TEST_ASSERT( mbedtls_memory_buffer_alloc_verify() == 0 ); 116 TEST_ASSERT( mbedtls_memory_buffer_alloc_verify() == 0 ); [all …]
|
D | test_suite_ecdsa.function | 26 TEST_ASSERT( rnd_pseudo_rand( &rnd_info, buf, sizeof( buf ) ) == 0 ); 27 TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); 28 TEST_ASSERT( mbedtls_ecp_gen_keypair( &grp, &d, &Q, &rnd_pseudo_rand, &rnd_info ) 31 TEST_ASSERT( mbedtls_ecdsa_sign( &grp, &r, &s, &d, buf, sizeof( buf ), 33 TEST_ASSERT( mbedtls_ecdsa_verify( &grp, buf, sizeof( buf ), &Q, &r, &s ) == 0 ); 61 TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 ); 62 TEST_ASSERT( mbedtls_ecp_point_read_string( &Q, 16, xQ_str, yQ_str ) == 0 ); 63 TEST_ASSERT( mbedtls_mpi_read_string( &d, 16, d_str ) == 0 ); 64 TEST_ASSERT( mbedtls_mpi_read_string( &r_check, 16, r_str ) == 0 ); 65 TEST_ASSERT( mbedtls_mpi_read_string( &s_check, 16, s_str ) == 0 ); [all …]
|
D | test_suite_asn1write.function | 36 TEST_ASSERT( buf[i] == GUARD_VAL ); 37 TEST_ASSERT( buf[GUARD_LEN + buf_len + i] == GUARD_VAL ); 42 TEST_ASSERT( (size_t) ret == asn1_len ); 43 TEST_ASSERT( p + asn1_len == buf + GUARD_LEN + buf_len ); 45 TEST_ASSERT( memcmp( p, asn1, asn1_len ) == 0 ); 72 TEST_ASSERT( buf[i] == GUARD_VAL ); 73 TEST_ASSERT( buf[GUARD_LEN + buf_len + i] == GUARD_VAL ); 78 TEST_ASSERT( (size_t) ret == asn1_len ); 79 TEST_ASSERT( p + asn1_len == buf + GUARD_LEN + buf_len ); 81 TEST_ASSERT( memcmp( p, asn1, asn1_len ) == 0 ); [all …]
|
D | test_suite_pkparse.function | 26 TEST_ASSERT( res == result ); 31 TEST_ASSERT( mbedtls_pk_can_do( &ctx, MBEDTLS_PK_RSA ) ); 33 TEST_ASSERT( mbedtls_rsa_check_privkey( rsa ) == 0 ); 51 TEST_ASSERT( res == result ); 56 TEST_ASSERT( mbedtls_pk_can_do( &ctx, MBEDTLS_PK_RSA ) ); 58 TEST_ASSERT( mbedtls_rsa_check_pubkey( rsa ) == 0 ); 76 TEST_ASSERT( res == result ); 81 TEST_ASSERT( mbedtls_pk_can_do( &ctx, MBEDTLS_PK_ECKEY ) ); 83 TEST_ASSERT( mbedtls_ecp_check_pubkey( &eckey->grp, &eckey->Q ) == 0 ); 101 TEST_ASSERT( res == result ); [all …]
|
D | test_suite_base64.function | 22 …TEST_ASSERT( mbedtls_base64_encode( dst_str, dst_buf_size, &len, src_str, strlen( (char *) src_str… 25 TEST_ASSERT( strcmp( (char *) dst_str, dst_string ) == 0 ); 43 TEST_ASSERT( res == result ); 46 TEST_ASSERT( strcmp( (char *) dst_str, dst_string ) == 0 ); 61 TEST_ASSERT( mbedtls_base64_encode( res, dst_buf_size, &len, src, src_len ) == result ); 64 TEST_ASSERT( len == strlen( dst ) ); 65 TEST_ASSERT( memcmp( dst, res, len ) == 0 ); 84 TEST_ASSERT( mbedtls_base64_decode( res, dst_buf_size, &len, (unsigned char *) src, 88 TEST_ASSERT( len == dst_len ); 89 TEST_ASSERT( memcmp( dst, res, len ) == 0 ); [all …]
|
D | test_suite_pkwrite.function | 26 TEST_ASSERT( mbedtls_pk_parse_public_keyfile( &key, key_file ) == 0 ); 29 TEST_ASSERT( ret == 0 ); 32 TEST_ASSERT( f != NULL ); 36 TEST_ASSERT( ilen == strlen( (char *) buf ) ); 37 TEST_ASSERT( memcmp( (char *) buf, (char *) check_buf, ilen ) == 0 ); 58 TEST_ASSERT( mbedtls_pk_parse_keyfile( &key, key_file, NULL ) == 0 ); 61 TEST_ASSERT( ret == 0 ); 64 TEST_ASSERT( f != NULL ); 68 TEST_ASSERT( ilen == strlen( (char *) buf ) ); 69 TEST_ASSERT( memcmp( (char *) buf, (char *) check_buf, ilen ) == 0 );
|
D | test_suite_version.function | 30 TEST_ASSERT( build_int == MBEDTLS_VERSION_NUMBER ); 31 TEST_ASSERT( strcmp( build_str, MBEDTLS_VERSION_STRING ) == 0 ); 32 TEST_ASSERT( strcmp( build_str_full, MBEDTLS_VERSION_STRING_FULL ) == 0 ); 33 TEST_ASSERT( strcmp( version_str, MBEDTLS_VERSION_STRING ) == 0 ); 61 TEST_ASSERT( strcmp( build_str, version_str ) == 0 ); 62 TEST_ASSERT( strcmp( build_str_full, get_str_full ) == 0 ); 63 TEST_ASSERT( strcmp( version_str, get_str ) == 0 ); 71 TEST_ASSERT( check == result );
|
D | test_suite_des.function | 19 TEST_ASSERT( mbedtls_des_key_check_weak( key ) == ret ); 43 TEST_ASSERT( mbedtls_des_crypt_ecb( &ctx, src_str, output ) == 0 ); 46 TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); 73 TEST_ASSERT( mbedtls_des_crypt_ecb( &ctx, src_str, output ) == 0 ); 76 TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); 107 …TEST_ASSERT( mbedtls_des_crypt_cbc( &ctx, MBEDTLS_DES_ENCRYPT, src_len, iv_str, src_str, output ) … 112 TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); 144 …TEST_ASSERT( mbedtls_des_crypt_cbc( &ctx, MBEDTLS_DES_DECRYPT, src_len, iv_str, src_str, output ) … 149 TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 ); 181 TEST_ASSERT( 0 ); [all …]
|
D | test_suite_entropy.function | 133 TEST_ASSERT( mbedtls_entropy_write_seed_file( &ctx, path ) == ret ); 134 TEST_ASSERT( mbedtls_entropy_update_seed_file( &ctx, path ) == ret ); 157 TEST_ASSERT( mbedtls_entropy_add_source( &ctx, entropy_dummy_source, NULL, 181 TEST_ASSERT( mbedtls_entropy_func( &ctx, buf, len ) == ret ); 188 TEST_ASSERT( acc[j] != 0 ); 191 TEST_ASSERT( acc[j] == 0 ); 204 TEST_ASSERT( mbedtls_entropy_add_source( &ctx, entropy_dummy_source, 209 TEST_ASSERT( mbedtls_entropy_func( &ctx, buf, sizeof( buf ) ) 211 TEST_ASSERT( mbedtls_entropy_gather( &ctx ) 214 TEST_ASSERT( mbedtls_entropy_write_seed_file( &ctx, path ) [all …]
|
D | test_suite_ccm.function | 13 TEST_ASSERT( mbedtls_ccm_self_test( 1 ) == 0 ); 27 TEST_ASSERT( (unsigned) key_size <= 8 * sizeof( key ) ); 30 TEST_ASSERT( ret == result ); 58 TEST_ASSERT( mbedtls_ccm_setkey( &ctx, MBEDTLS_CIPHER_ID_AES, 61 TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len, 68 TEST_ASSERT( decrypt_ret == MBEDTLS_ERR_CCM_AUTH_FAILED ); 70 TEST_ASSERT( decrypt_ret == res ); 106 TEST_ASSERT( mbedtls_ccm_setkey( &ctx, cipher_id, key, key_len * 8 ) == 0 ); 109 TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len, 112 TEST_ASSERT( memcmp( msg, result, result_len ) == 0 ); [all …]
|