Lines Matching refs:TEST_ptr

47     if (!TEST_ptr(n1 = BN_new())  in group_order_tests()
48 || !TEST_ptr(n2 = BN_new()) in group_order_tests()
49 || !TEST_ptr(order = BN_new()) in group_order_tests()
50 || !TEST_ptr(ctx = BN_CTX_new()) in group_order_tests()
51 || !TEST_ptr(G = EC_GROUP_get0_generator(group)) in group_order_tests()
52 || !TEST_ptr(P = EC_POINT_new(group)) in group_order_tests()
53 || !TEST_ptr(Q = EC_POINT_new(group)) in group_order_tests()
54 || !TEST_ptr(R = EC_POINT_new(group)) in group_order_tests()
55 || !TEST_ptr(S = EC_POINT_new(group))) in group_order_tests()
174 if (!TEST_ptr(ctx = BN_CTX_new()) in prime_field_tests()
175 || !TEST_ptr(p = BN_new()) in prime_field_tests()
176 || !TEST_ptr(a = BN_new()) in prime_field_tests()
177 || !TEST_ptr(b = BN_new()) in prime_field_tests()
181 || !TEST_ptr(group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) in prime_field_tests()
192 if (!TEST_ptr(P = EC_POINT_new(group)) in prime_field_tests()
193 || !TEST_ptr(Q = EC_POINT_new(group)) in prime_field_tests()
194 || !TEST_ptr(R = EC_POINT_new(group)) in prime_field_tests()
200 || !TEST_ptr(x = BN_new()) in prime_field_tests()
201 || !TEST_ptr(y = BN_new()) in prime_field_tests()
202 || !TEST_ptr(z = BN_new()) in prime_field_tests()
203 || !TEST_ptr(yplusone = BN_new()) in prime_field_tests()
579 if (!TEST_ptr(scalar3 = BN_new())) in prime_field_tests()
793 if (!TEST_ptr(ctx = BN_CTX_new()) in char2_curve_test()
794 || !TEST_ptr(p = BN_new()) in char2_curve_test()
795 || !TEST_ptr(a = BN_new()) in char2_curve_test()
796 || !TEST_ptr(b = BN_new()) in char2_curve_test()
797 || !TEST_ptr(x = BN_new()) in char2_curve_test()
798 || !TEST_ptr(y = BN_new()) in char2_curve_test()
799 || !TEST_ptr(z = BN_new()) in char2_curve_test()
800 || !TEST_ptr(yplusone = BN_new()) in char2_curve_test()
805 || !TEST_ptr(P = EC_POINT_new(group)) in char2_curve_test()
806 || !TEST_ptr(Q = EC_POINT_new(group)) in char2_curve_test()
807 || !TEST_ptr(R = EC_POINT_new(group)) in char2_curve_test()
945 if (!TEST_ptr(ctx = BN_CTX_new()) in char2_field_tests()
946 || !TEST_ptr(p = BN_new()) in char2_field_tests()
947 || !TEST_ptr(a = BN_new()) in char2_field_tests()
948 || !TEST_ptr(b = BN_new()) in char2_field_tests()
954 if (!TEST_ptr(group = EC_GROUP_new_curve_GF2m(p, a, b, ctx)) in char2_field_tests()
964 if (!TEST_ptr(P = EC_POINT_new(group)) in char2_field_tests()
965 || !TEST_ptr(Q = EC_POINT_new(group)) in char2_field_tests()
966 || !TEST_ptr(R = EC_POINT_new(group)) in char2_field_tests()
975 || !TEST_ptr(x = BN_new()) in char2_field_tests()
976 || !TEST_ptr(y = BN_new()) in char2_field_tests()
977 || !TEST_ptr(z = BN_new()) in char2_field_tests()
978 || !TEST_ptr(cof = BN_new()) in char2_field_tests()
979 || !TEST_ptr(yplusone = BN_new()) in char2_field_tests()
1098 || !TEST_ptr(group = EC_GROUP_new_by_curve_name(NID_sect571k1)) in hybrid_point_encoding_test()
1099 || !TEST_ptr(point = EC_POINT_new(group)) in hybrid_point_encoding_test()
1107 || !TEST_ptr(buf = OPENSSL_malloc(len)) in hybrid_point_encoding_test()
1142 if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(nid))) { in internal_curve_test()
1161 if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(nid))) { in internal_curve_test_method()
1324 if (!TEST_ptr(ctx = BN_CTX_new()) in nistp_single_test()
1325 || !TEST_ptr(p = BN_new()) in nistp_single_test()
1326 || !TEST_ptr(a = BN_new()) in nistp_single_test()
1327 || !TEST_ptr(b = BN_new()) in nistp_single_test()
1328 || !TEST_ptr(x = BN_new()) in nistp_single_test()
1329 || !TEST_ptr(y = BN_new()) in nistp_single_test()
1330 || !TEST_ptr(m = BN_new()) in nistp_single_test()
1331 || !TEST_ptr(n = BN_new()) in nistp_single_test()
1332 || !TEST_ptr(order = BN_new()) in nistp_single_test()
1333 || !TEST_ptr(yplusone = BN_new()) in nistp_single_test()
1335 || !TEST_ptr(NISTP = EC_GROUP_new_by_curve_name(test->nid)) in nistp_single_test()
1341 || !TEST_ptr(G = EC_POINT_new(NISTP)) in nistp_single_test()
1342 || !TEST_ptr(P = EC_POINT_new(NISTP)) in nistp_single_test()
1343 || !TEST_ptr(Q = EC_POINT_new(NISTP)) in nistp_single_test()
1344 || !TEST_ptr(Q_CHECK = EC_POINT_new(NISTP)) in nistp_single_test()
1515 if (!TEST_ptr(bn_ctx = BN_CTX_new()) in check_named_curve_test()
1516 || !TEST_ptr(group = EC_GROUP_new_by_curve_name(nid)) in check_named_curve_test()
1517 || !TEST_ptr(gtest = EC_GROUP_dup(group)) in check_named_curve_test()
1518 || !TEST_ptr(group_p = BN_new()) in check_named_curve_test()
1519 || !TEST_ptr(group_a = BN_new()) in check_named_curve_test()
1520 || !TEST_ptr(group_b = BN_new()) in check_named_curve_test()
1521 || !TEST_ptr(group_cofactor = BN_new()) in check_named_curve_test()
1522 || !TEST_ptr(group_gen = EC_GROUP_get0_generator(group)) in check_named_curve_test()
1523 || !TEST_ptr(group_order = EC_GROUP_get0_order(group)) in check_named_curve_test()
1526 || !TEST_ptr(other_gen = EC_POINT_dup(group_gen, group)) in check_named_curve_test()
1528 || !TEST_ptr(other_order = BN_dup(group_order)) in check_named_curve_test()
1530 || !TEST_ptr(other_a = BN_dup(group_a)) in check_named_curve_test()
1532 || !TEST_ptr(other_b = BN_dup(group_b)) in check_named_curve_test()
1534 || !TEST_ptr(other_cofactor = BN_dup(group_cofactor)) in check_named_curve_test()
1542 if (!TEST_ptr(other_p = BN_dup(group_p)) in check_named_curve_test()
1546 if (!TEST_ptr(other_p = BN_dup(group_p))) in check_named_curve_test()
1553 if (!TEST_ptr(BN_copy(other_p, in check_named_curve_test()
1703 if (!TEST_ptr(ctx = BN_CTX_new()) in check_named_curve_lookup_test()
1704 || !TEST_ptr(g = EC_GROUP_new_by_curve_name(nid)) in check_named_curve_lookup_test()
1705 || !TEST_ptr(p = EC_GROUP_get_ecparameters(g, NULL))) in check_named_curve_lookup_test()
1710 if (!TEST_ptr(g = EC_GROUP_new_from_ecparameters(p))) in check_named_curve_lookup_test()
1725 if (!TEST_ptr(ga = EC_GROUP_new_by_curve_name(rv)) in check_named_curve_lookup_test()
1726 || !TEST_ptr(pa = EC_GROUP_get_ecparameters(ga, NULL))) in check_named_curve_lookup_test()
1731 if (!TEST_ptr(ga = EC_GROUP_new_from_ecparameters(pa)) in check_named_curve_lookup_test()
1843 if (!TEST_ptr(bn_ctx = BN_CTX_new())) in check_named_curve_from_ecparameters()
1848 !TEST_ptr(group_cofactor = BN_CTX_get(bn_ctx)) in check_named_curve_from_ecparameters()
1849 || !TEST_ptr(other_gen_x = BN_CTX_get(bn_ctx)) in check_named_curve_from_ecparameters()
1850 || !TEST_ptr(other_gen_y = BN_CTX_get(bn_ctx)) in check_named_curve_from_ecparameters()
1851 || !TEST_ptr(other_order = BN_CTX_get(bn_ctx)) in check_named_curve_from_ecparameters()
1852 || !TEST_ptr(other_cofactor = BN_CTX_get(bn_ctx)) in check_named_curve_from_ecparameters()
1854 || !TEST_ptr(group = EC_GROUP_new_by_curve_name(nid)) in check_named_curve_from_ecparameters()
1855 || !TEST_ptr(params = EC_GROUP_get_ecparameters(group, NULL)) in check_named_curve_from_ecparameters()
1856 || !TEST_ptr(group_gen = EC_GROUP_get0_generator(group)) in check_named_curve_from_ecparameters()
1857 || !TEST_ptr(group_order = EC_GROUP_get0_order(group)) in check_named_curve_from_ecparameters()
1860 || !TEST_ptr(tmpg = EC_GROUP_dup(group)) in check_named_curve_from_ecparameters()
1861 || !TEST_ptr(other_gen = EC_POINT_dup(group_gen, group)) in check_named_curve_from_ecparameters()
1874 if (!TEST_ptr(other_gen = EC_POINT_new(tmpg)) in check_named_curve_from_ecparameters()
1890 if (!TEST_ptr(tgroup = *g_next++ = EC_GROUP_new_from_ecparameters(params)) in check_named_curve_from_ecparameters()
1911 || !TEST_ptr(other_params = *p_next++ = in check_named_curve_from_ecparameters()
1913 || !TEST_ptr(tgroup = *g_next++ = in check_named_curve_from_ecparameters()
1928 || !TEST_ptr(other_params = *p_next++ = in check_named_curve_from_ecparameters()
1930 || !TEST_ptr(tgroup = *g_next++ = in check_named_curve_from_ecparameters()
1947 || !TEST_ptr(other_params = *p_next++ = in check_named_curve_from_ecparameters()
1949 || !TEST_ptr(tgroup = *g_next++ = in check_named_curve_from_ecparameters()
1955 || !TEST_ptr(other_params = *p_next++ = in check_named_curve_from_ecparameters()
1957 || !TEST_ptr(tgroup = *g_next++ = in check_named_curve_from_ecparameters()
1966 || !TEST_ptr(other_params = *p_next++ = in check_named_curve_from_ecparameters()
1968 || !TEST_ptr(tgroup = *g_next++ = in check_named_curve_from_ecparameters()
1977 || !TEST_ptr(other_params = *p_next++ = in check_named_curve_from_ecparameters()
1979 || !TEST_ptr(tgroup = *g_next++ = in check_named_curve_from_ecparameters()
1988 || !TEST_ptr(other_params = *p_next++ = in check_named_curve_from_ecparameters()
1990 || !TEST_ptr(tgroup = *g_next++ = in check_named_curve_from_ecparameters()
2021 if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(NID_secp384r1)) in parameter_test()
2022 || !TEST_ptr(ecparameters = EC_GROUP_get_ecparameters(group, NULL)) in parameter_test()
2023 || !TEST_ptr(group2 = EC_GROUP_new_from_ecparameters(ecparameters)) in parameter_test()
2031 if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(NID_secp521r1)) in parameter_test()
2133 if (!TEST_ptr(group = d2i_ECPKParameters(NULL, &b1, sizeof(params_cf_fail))) in cofactor_range_test()
2135 || !TEST_ptr(group = d2i_ECPKParameters(&group, &b2, in cofactor_range_test()
2165 if (!TEST_ptr(ctx = BN_CTX_new()) in cardinality_test()
2166 || !TEST_ptr(g1 = EC_GROUP_new_by_curve_name(nid))) { in cardinality_test()
2182 if (!TEST_ptr(g2_cf = BN_CTX_get(ctx)) in cardinality_test()
2191 || !TEST_ptr(g2 = (is_binary) ? in cardinality_test()
2196 || !TEST_ptr(g2 = EC_GROUP_new_curve_GFp(g1_p, g1_a, g1_b, ctx)) in cardinality_test()
2198 || !TEST_ptr(g2_gen = EC_POINT_new(g2)) in cardinality_test()
2245 if (!TEST_ptr(x = BN_new()) in check_ec_key_field_public_range_test()
2246 || !TEST_ptr(y = BN_new()) in check_ec_key_field_public_range_test()
2247 || !TEST_ptr(key = EC_KEY_new_by_curve_name(curves[id].nid)) in check_ec_key_field_public_range_test()
2248 || !TEST_ptr(group = EC_KEY_get0_group(key)) in check_ec_key_field_public_range_test()
2249 || !TEST_ptr(field = EC_GROUP_get0_field(group)) in check_ec_key_field_public_range_test()
2252 || !TEST_ptr(pub = EC_KEY_get0_public_key(key)) in check_ec_key_field_public_range_test()
2308 if (!TEST_ptr(Pinf = EC_POINT_new(group)) in ec_point_hex2point_test_helper()
2314 if (!TEST_ptr(hex = EC_POINT_point2hex(group, P, form, bnctx)) in ec_point_hex2point_test_helper()
2315 || !TEST_ptr(Q = EC_POINT_hex2point(group, hex, NULL, bnctx)) in ec_point_hex2point_test_helper()
2352 if (!TEST_ptr(bnctx = BN_CTX_new()) in ec_point_hex2point_test()
2353 || !TEST_ptr(group = EC_GROUP_new_by_curve_name(nid)) in ec_point_hex2point_test()
2354 || !TEST_ptr(G = EC_GROUP_get0_generator(group)) in ec_point_hex2point_test()
2355 || !TEST_ptr(P = EC_POINT_dup(G, group))) in ec_point_hex2point_test()
2413 if (!TEST_ptr(b) in do_test_custom_explicit_fromdata()
2414 || !TEST_ptr(bld = OSSL_PARAM_BLD_new())) in do_test_custom_explicit_fromdata()
2459 if (!TEST_ptr(params = OSSL_PARAM_BLD_to_param(bld)) in do_test_custom_explicit_fromdata()
2460 || !TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL)) in do_test_custom_explicit_fromdata()
2573 if (!TEST_ptr(gettable = EVP_PKEY_gettable_params(pkeyparam)) in do_test_custom_explicit_fromdata()
2574 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_GROUP_NAME)) in do_test_custom_explicit_fromdata()
2575 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_ENCODING)) in do_test_custom_explicit_fromdata()
2576 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_FIELD_TYPE)) in do_test_custom_explicit_fromdata()
2577 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_P)) in do_test_custom_explicit_fromdata()
2578 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_A)) in do_test_custom_explicit_fromdata()
2579 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_B)) in do_test_custom_explicit_fromdata()
2580 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_GENERATOR)) in do_test_custom_explicit_fromdata()
2581 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_ORDER)) in do_test_custom_explicit_fromdata()
2582 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_COFACTOR)) in do_test_custom_explicit_fromdata()
2583 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_SEED)) in do_test_custom_explicit_fromdata()
2585 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_CHAR2_M)) in do_test_custom_explicit_fromdata()
2586 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_CHAR2_TYPE)) in do_test_custom_explicit_fromdata()
2587 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS)) in do_test_custom_explicit_fromdata()
2588 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_CHAR2_PP_K1)) in do_test_custom_explicit_fromdata()
2589 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_CHAR2_PP_K2)) in do_test_custom_explicit_fromdata()
2590 || !TEST_ptr(OSSL_PARAM_locate_const(gettable, OSSL_PKEY_PARAM_EC_CHAR2_PP_K3)) in do_test_custom_explicit_fromdata()
2623 if (!TEST_ptr(ctx = BN_CTX_new())) in custom_generator_test()
2628 if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(nid))) in custom_generator_test()
2635 if (!TEST_ptr(k = BN_CTX_get(ctx)) in custom_generator_test()
2641 || !TEST_ptr(G2 = EC_POINT_new(group)) in custom_generator_test()
2642 || !TEST_ptr(Q1 = EC_POINT_new(group)) in custom_generator_test()
2649 || !TEST_ptr(b1 = OPENSSL_malloc(bsize)) in custom_generator_test()
2659 || !TEST_ptr(Q2 = EC_POINT_new(group)) in custom_generator_test()
2666 || !TEST_ptr(b2 = OPENSSL_malloc(bsize)) in custom_generator_test()
2724 if (!TEST_ptr(ctx = BN_CTX_new())) in custom_params_test()
2728 if (!TEST_ptr(p = BN_CTX_get(ctx)) in custom_params_test()
2729 || !TEST_ptr(a = BN_CTX_get(ctx)) in custom_params_test()
2730 || !TEST_ptr(b = BN_CTX_get(ctx)) in custom_params_test()
2731 || !TEST_ptr(k = BN_CTX_get(ctx))) in custom_params_test()
2734 if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(nid))) in custom_params_test()
2751 || !TEST_ptr(G2 = EC_POINT_new(group)) in custom_params_test()
2759 || !TEST_ptr(buf1 = OPENSSL_malloc(bsize)) in custom_params_test()
2763 || !TEST_ptr(z = EC_GROUP_get0_order(group)) in custom_params_test()
2764 || !TEST_ptr(cof = EC_GROUP_get0_cofactor(group)) in custom_params_test()
2770 if (!TEST_ptr(altgroup = EC_GROUP_new_curve_GFp(p, a, b, ctx))) in custom_params_test()
2775 if (!TEST_ptr(altgroup = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) in custom_params_test()
2782 if (!TEST_ptr(G2 = EC_POINT_new(altgroup)) in custom_params_test()
2791 !TEST_ptr(Q1 = EC_POINT_new(group)) in custom_params_test()
2792 || !TEST_ptr(Q2 = EC_POINT_new(altgroup)) in custom_params_test()
2815 || !TEST_ptr(buf2 = OPENSSL_malloc(bsize)) in custom_params_test()
2824 if (!TEST_ptr(eckey1 = EC_KEY_new()) in custom_params_test()
2827 || !TEST_ptr(eckey2 = EC_KEY_new()) in custom_params_test()
2833 if (!TEST_ptr(priv1 = EC_KEY_get0_private_key(eckey1))) in custom_params_test()
2846 || !TEST_ptr(pub1 = OPENSSL_malloc(bsize)) in custom_params_test()
2853 if (!TEST_ptr(Q = EC_KEY_get0_public_key(eckey2)) in custom_params_test()
2857 || !TEST_ptr(pub2 = OPENSSL_malloc(bsize)) in custom_params_test()
2864 if(!TEST_ptr(pkey1 = EVP_PKEY_new()) in custom_params_test()
2868 if(!TEST_ptr(pkey2 = EVP_PKEY_new()) in custom_params_test()
2874 if (!TEST_ptr(pctx1 = EVP_PKEY_CTX_new(pkey1, NULL)) in custom_params_test()
2881 if (!TEST_ptr(pctx2 = EVP_PKEY_CTX_new(pkey2, NULL)) in custom_params_test()
2895 if (!TEST_ptr(param_bld = OSSL_PARAM_BLD_new()) in custom_params_test()
2905 || !TEST_ptr(params1 = OSSL_PARAM_BLD_to_param(param_bld))) in custom_params_test()
2909 if (!TEST_ptr(param_bld = OSSL_PARAM_BLD_new()) in custom_params_test()
2916 || !TEST_ptr(params2 = OSSL_PARAM_BLD_to_param(param_bld))) in custom_params_test()
2921 if (!TEST_ptr(pctx2 = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL)) in custom_params_test()
2931 if (!TEST_ptr(pctx1 = EVP_PKEY_CTX_new(pkey1, NULL)) in custom_params_test()
2979 if (!TEST_ptr(gen_key = EVP_EC_gen("P-256"))) in ec_d2i_publickey_test()
2989 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL)) in ec_d2i_publickey_test()
2994 || !TEST_ptr(decoded_key) in ec_d2i_publickey_test()
2995 || !TEST_ptr(decoded_key = d2i_PublicKey(EVP_PKEY_EC, &decoded_key, in ec_d2i_publickey_test()
3013 if (!TEST_ptr(curves = OPENSSL_malloc(sizeof(*curves) * crv_len)) in setup_tests()