Lines Matching refs:TEST_ASSERT

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 );
100 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &qA.X, &check ) == 0 );
101 TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, yA_str ) == 0 );
102 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &qA.Y, &check ) == 0 );
104 TEST_ASSERT( mbedtls_ecdh_gen_public( &grp, &dB, &qB,
106 TEST_ASSERT( ! mbedtls_ecp_is_zero( &qB ) );
107 TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, xB_str ) == 0 );
108 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &qB.X, &check ) == 0 );
109 TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, yB_str ) == 0 );
110 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &qB.Y, &check ) == 0 );
112 TEST_ASSERT( mbedtls_mpi_read_string( &check, 16, z_str ) == 0 );
113 TEST_ASSERT( mbedtls_ecdh_compute_shared( &grp, &zA, &qB, &dA, NULL, NULL ) == 0 );
114 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &zA, &check ) == 0 );
115 TEST_ASSERT( mbedtls_ecdh_compute_shared( &grp, &zB, &qA, &dB, NULL, NULL ) == 0 );
116 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &zB, &check ) == 0 );
139 TEST_ASSERT( mbedtls_ecp_group_load( &srv.grp, id ) == 0 );
142 TEST_ASSERT( mbedtls_ecdh_make_params( &srv, &len, buf, 1000,
144 TEST_ASSERT( mbedtls_ecdh_read_params( &cli, &vbuf, buf + len ) == 0 );
147 TEST_ASSERT( mbedtls_ecdh_make_public( &cli, &len, buf, 1000,
149 TEST_ASSERT( mbedtls_ecdh_read_public( &srv, buf, len ) == 0 );
151 TEST_ASSERT( mbedtls_ecdh_calc_secret( &srv, &len, buf, 1000,
153 TEST_ASSERT( mbedtls_ecdh_calc_secret( &cli, &len, buf, 1000, NULL, NULL ) == 0 );
154 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &srv.z, &cli.z ) == 0 );