Lines Matching refs:NULL

34     if (meth == NULL) {  in ossl_ec_group_new_ex()
36 return NULL; in ossl_ec_group_new_ex()
40 return NULL; in ossl_ec_group_new_ex()
44 if (ret == NULL) in ossl_ec_group_new_ex()
45 return NULL; in ossl_ec_group_new_ex()
48 if (propq != NULL) { in ossl_ec_group_new_ex()
50 if (ret->propq == NULL) in ossl_ec_group_new_ex()
56 if (ret->order == NULL) in ossl_ec_group_new_ex()
59 if (ret->cofactor == NULL) in ossl_ec_group_new_ex()
73 return NULL; in ossl_ec_group_new_ex()
80 return ossl_ec_group_new_ex(NULL, NULL, meth); in EC_GROUP_new()
119 group->pre_comp.ec = NULL; in EC_pre_comp_free()
181 dest->pre_comp.ec = NULL; in EC_GROUP_copy()
213 if (src->mont_data != NULL) { in EC_GROUP_copy()
214 if (dest->mont_data == NULL) { in EC_GROUP_copy()
216 if (dest->mont_data == NULL) in EC_GROUP_copy()
224 dest->mont_data = NULL; in EC_GROUP_copy()
227 if (src->generator != NULL) { in EC_GROUP_copy()
228 if (dest->generator == NULL) { in EC_GROUP_copy()
230 if (dest->generator == NULL) in EC_GROUP_copy()
238 dest->generator = NULL; in EC_GROUP_copy()
254 if ((dest->seed = OPENSSL_malloc(src->seed_len)) == NULL) in EC_GROUP_copy()
261 dest->seed = NULL; in EC_GROUP_copy()
270 EC_GROUP *t = NULL; in EC_GROUP_dup()
273 if (a == NULL) in EC_GROUP_dup()
274 return NULL; in EC_GROUP_dup()
276 if ((t = ossl_ec_group_new_ex(a->libctx, a->propq, a->meth)) == NULL) in EC_GROUP_dup()
277 return NULL; in EC_GROUP_dup()
286 return NULL; in EC_GROUP_dup()
320 BN_CTX *ctx = NULL; in ec_guess_cofactor()
321 BIGNUM *q = NULL; in ec_guess_cofactor()
334 if ((ctx = BN_CTX_new_ex(group->libctx)) == NULL) in ec_guess_cofactor()
338 if ((q = BN_CTX_get(ctx)) == NULL) in ec_guess_cofactor()
357 || !BN_div(group->cofactor, NULL, group->cofactor, group->order, ctx)) in ec_guess_cofactor()
369 if (generator == NULL) { in EC_GROUP_set_generator()
375 if (group->field == NULL || BN_is_zero(group->field) in EC_GROUP_set_generator()
386 if (order == NULL || BN_is_zero(order) || BN_is_negative(order) in EC_GROUP_set_generator()
397 if (cofactor != NULL && BN_is_negative(cofactor)) { in EC_GROUP_set_generator()
402 if (group->generator == NULL) { in EC_GROUP_set_generator()
404 if (group->generator == NULL) in EC_GROUP_set_generator()
414 if (cofactor != NULL && !BN_is_zero(cofactor)) { in EC_GROUP_set_generator()
432 group->mont_data = NULL; in EC_GROUP_set_generator()
448 if (group->order == NULL) in EC_GROUP_get_order()
470 if (group->cofactor == NULL) in EC_GROUP_get_cofactor()
532 group->seed = NULL; in EC_GROUP_set_seed()
538 if ((group->seed = OPENSSL_malloc(len)) == NULL) in EC_GROUP_set_seed()
569 if (group->meth->group_get_curve == NULL) { in EC_GROUP_get_curve()
627 BN_CTX *ctx_new = NULL; in EC_GROUP_cmp()
641 if (ctx == NULL) in EC_GROUP_cmp()
644 if (ctx == NULL) in EC_GROUP_cmp()
654 if (b3 == NULL) { in EC_GROUP_cmp()
685 if (ao == NULL || bo == NULL) { in EC_GROUP_cmp()
720 if (group == NULL) { in EC_POINT_new()
722 return NULL; in EC_POINT_new()
724 if (group->meth->point_init == NULL) { in EC_POINT_new()
726 return NULL; in EC_POINT_new()
730 if (ret == NULL) in EC_POINT_new()
731 return NULL; in EC_POINT_new()
738 return NULL; in EC_POINT_new()
746 if (point == NULL) in EC_POINT_free()
760 if (point == NULL) in EC_POINT_clear_free()
793 if (a == NULL) in EC_POINT_dup()
794 return NULL; in EC_POINT_dup()
797 if (t == NULL) in EC_POINT_dup()
798 return NULL; in EC_POINT_dup()
802 return NULL; in EC_POINT_dup()
867 if (group->meth->point_set_affine_coordinates == NULL) { in EC_POINT_set_affine_coordinates()
907 if (group->meth->point_get_affine_coordinates == NULL) { in EC_POINT_get_affine_coordinates()
1077 BN_CTX *new_ctx = NULL; in EC_POINTs_mul()
1085 if (scalar == NULL && num == 0) in EC_POINTs_mul()
1096 if (ctx == NULL) in EC_POINTs_mul()
1099 if (ctx == NULL) { in EC_POINTs_mul()
1104 if (group->meth->mul != NULL) in EC_POINTs_mul()
1123 BN_CTX *new_ctx = NULL; in EC_POINT_mul()
1127 || (point != NULL && !ec_point_is_compat(point, group))) { in EC_POINT_mul()
1132 if (g_scalar == NULL && p_scalar == NULL) in EC_POINT_mul()
1136 if (ctx == NULL) in EC_POINT_mul()
1139 if (ctx == NULL) { in EC_POINT_mul()
1144 num = (point != NULL && p_scalar != NULL) ? 1 : 0; in EC_POINT_mul()
1145 if (group->meth->mul != NULL) in EC_POINT_mul()
1194 group->mont_data = NULL; in ec_precompute_mont_data()
1196 if (ctx == NULL) in ec_precompute_mont_data()
1200 if (group->mont_data == NULL) in ec_precompute_mont_data()
1205 group->mont_data = NULL; in ec_precompute_mont_data()
1231 if (group->order == NULL) in ossl_ec_group_simple_order_bits()
1239 BIGNUM *e = NULL; in ec_field_inverse_mod_ord()
1242 BN_CTX *new_ctx = NULL; in ec_field_inverse_mod_ord()
1245 if (group->mont_data == NULL) in ec_field_inverse_mod_ord()
1249 if (ctx == NULL) in ec_field_inverse_mod_ord()
1252 if (ctx == NULL) in ec_field_inverse_mod_ord()
1256 if ((e = BN_CTX_get(ctx)) == NULL) in ec_field_inverse_mod_ord()
1300 if (group->meth->field_inverse_mod_ord != NULL) in ossl_ec_group_do_inverse_ord()
1319 if (group->meth->blind_coordinates == NULL) in ossl_ec_point_blind_coordinates()
1351 if (group == NULL) in EC_GROUP_get_trinomial_basis()
1370 if (group == NULL) in EC_GROUP_get_pentanomial_basis()
1409 EC_GROUP *ret_group = NULL, *dup = NULL; in ec_group_explicit_to_named()
1414 int no_seed = (EC_GROUP_get0_seed(group) == NULL); in ec_group_explicit_to_named()
1416 if ((dup = EC_GROUP_dup(group)) == NULL in ec_group_explicit_to_named()
1417 || EC_GROUP_set_seed(dup, NULL, 0) != 1 in ec_group_explicit_to_named()
1418 || !EC_GROUP_set_generator(dup, point, order, NULL)) in ec_group_explicit_to_named()
1441 if (ret_group == NULL) in ec_group_explicit_to_named()
1460 if (EC_GROUP_set_seed(ret_group, NULL, 0) != 1) in ec_group_explicit_to_named()
1471 return NULL; in ec_group_explicit_to_named()
1479 const char *curve_name = NULL; in group_new_from_name()
1485 ok = (curve_name != NULL); in group_new_from_name()
1496 return NULL; in group_new_from_name()
1501 return NULL; in group_new_from_name()
1511 if (p != NULL) { in ossl_ec_group_set_params()
1520 if (p != NULL) { in ossl_ec_group_set_params()
1529 if (p != NULL) { in ossl_ec_group_set_params()
1544 EC_GROUP *group = NULL; in EC_GROUP_new_from_params()
1549 EC_GROUP *named_group = NULL; in EC_GROUP_new_from_params()
1550 BIGNUM *p = NULL, *a = NULL, *b = NULL, *order = NULL, *cofactor = NULL; in EC_GROUP_new_from_params()
1551 EC_POINT *point = NULL; in EC_GROUP_new_from_params()
1554 BN_CTX *bnctx = NULL; in EC_GROUP_new_from_params()
1555 const unsigned char *buf = NULL; in EC_GROUP_new_from_params()
1561 if (ptmp != NULL) { in EC_GROUP_new_from_params()
1564 if ((group = group_new_from_name(ptmp, libctx, propq)) == NULL) in EC_GROUP_new_from_params()
1565 return NULL; in EC_GROUP_new_from_params()
1568 return NULL; in EC_GROUP_new_from_params()
1573 if (ptmp != NULL && !OSSL_PARAM_get_int(ptmp, &decoded)) { in EC_GROUP_new_from_params()
1576 return NULL; in EC_GROUP_new_from_params()
1583 return NULL; in EC_GROUP_new_from_params()
1587 if (bnctx == NULL) { in EC_GROUP_new_from_params()
1597 if (order == NULL) { in EC_GROUP_new_from_params()
1603 if (ptmp == NULL || ptmp->data_type != OSSL_PARAM_UTF8_STRING) { in EC_GROUP_new_from_params()
1655 group = EC_GROUP_new_curve_GF2m(p, a, b, NULL); in EC_GROUP_new_from_params()
1656 if (group != NULL) { in EC_GROUP_new_from_params()
1666 if (group == NULL) { in EC_GROUP_new_from_params()
1673 if (ptmp != NULL) { in EC_GROUP_new_from_params()
1684 if (ptmp == NULL in EC_GROUP_new_from_params()
1690 if ((point = EC_POINT_new(group)) == NULL) in EC_GROUP_new_from_params()
1710 if (ptmp != NULL) { in EC_GROUP_new_from_params()
1712 if (cofactor == NULL || !OSSL_PARAM_get_BN(ptmp, &cofactor)) { in EC_GROUP_new_from_params()
1725 if (named_group == NULL) { in EC_GROUP_new_from_params()
1735 if (ptmp != NULL in EC_GROUP_new_from_params()
1755 group = NULL; in EC_GROUP_new_from_params()
1768 OSSL_PARAM_BLD *tmpl = NULL; in EC_GROUP_to_params()
1769 BN_CTX *new_bnctx = NULL; in EC_GROUP_to_params()
1770 unsigned char *gen_buf = NULL; in EC_GROUP_to_params()
1771 OSSL_PARAM *params = NULL; in EC_GROUP_to_params()
1773 if (group == NULL) in EC_GROUP_to_params()
1777 if (tmpl == NULL) in EC_GROUP_to_params()
1780 if (bnctx == NULL) in EC_GROUP_to_params()
1782 if (bnctx == NULL) in EC_GROUP_to_params()
1787 group, tmpl, NULL, libctx, propq, bnctx, &gen_buf)) in EC_GROUP_to_params()