Lines Matching refs:dh

39     DH *dh = NULL;  in dh_test()  local
57 if (!TEST_ptr(dh = DH_new()) in dh_test()
72 || !TEST_true(DH_set0_pqg(dh, p, q, g))) in dh_test()
76 if (!TEST_true(DH_check(dh, &i))) in dh_test()
92 DH_get0_pqg(dh, &p2, &q2, &g2); in dh_test()
99 if (!TEST_ptr_eq(DH_get0_p(dh), p2) in dh_test()
100 || !TEST_ptr_eq(DH_get0_q(dh), q2) in dh_test()
101 || !TEST_ptr_eq(DH_get0_g(dh), g2)) in dh_test()
106 || !TEST_true(DH_set0_key(dh, NULL, priv_key))) in dh_test()
110 DH_get0_key(dh, &pub_key2, &priv_key2); in dh_test()
116 if (!TEST_ptr_eq(DH_get0_pub_key(dh), pub_key2) in dh_test()
117 || !TEST_ptr_eq(DH_get0_priv_key(dh), priv_key2)) in dh_test()
121 if (!TEST_false(DH_generate_key(dh))) in dh_test()
130 if (!TEST_true(DH_check(dh, &i))) in dh_test()
144 if (!TEST_false(DH_check(dh, &i))) in dh_test()
252 DH_free(dh); in dh_test()
265 DH *dh = NULL; in dh_computekey_range_test() local
272 || !TEST_ptr(dh = DH_new()) in dh_computekey_range_test()
273 || !TEST_true(DH_set0_pqg(dh, p, q, g))) in dh_computekey_range_test()
277 if (!TEST_int_gt(sz = DH_size(dh), 0) in dh_computekey_range_test()
284 || !TEST_true(DH_set0_key(dh, NULL, priv))) in dh_computekey_range_test()
293 if (!TEST_int_le(ossl_dh_compute_key(buf, pub, dh), 0)) in dh_computekey_range_test()
296 if (!TEST_ptr(BN_copy(pub, DH_get0_p(dh))) in dh_computekey_range_test()
297 || !TEST_int_le(ossl_dh_compute_key(buf, pub, dh), 0)) in dh_computekey_range_test()
301 || !TEST_int_le(ossl_dh_compute_key(buf, pub, dh), 0)) in dh_computekey_range_test()
305 || !TEST_int_eq(ossl_dh_compute_key(buf, pub, dh), sz)) in dh_computekey_range_test()
316 DH_free(dh); in dh_computekey_range_test()
734 DH *dh = NULL; in dh_test_prime_groups() local
737 if (!TEST_ptr(dh = DH_new_by_nid(prime_groups[index]))) in dh_test_prime_groups()
739 DH_get0_pqg(dh, &p, &q, &g); in dh_test_prime_groups()
743 if (!TEST_int_eq(DH_get_nid(dh), prime_groups[index])) in dh_test_prime_groups()
747 if (!TEST_int_eq((int)DH_get_length(dh), 0)) in dh_test_prime_groups()
752 DH_free(dh); in dh_test_prime_groups()