Lines Matching refs:src

161 int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)  in EC_GROUP_copy()  argument
167 if (dest->meth != src->meth) { in EC_GROUP_copy()
171 if (dest == src) in EC_GROUP_copy()
174 dest->libctx = src->libctx; in EC_GROUP_copy()
175 dest->curve_name = src->curve_name; in EC_GROUP_copy()
178 dest->pre_comp_type = src->pre_comp_type; in EC_GROUP_copy()
179 switch (src->pre_comp_type) { in EC_GROUP_copy()
185 dest->pre_comp.nistz256 = EC_nistz256_pre_comp_dup(src->pre_comp.nistz256); in EC_GROUP_copy()
190 dest->pre_comp.nistp224 = EC_nistp224_pre_comp_dup(src->pre_comp.nistp224); in EC_GROUP_copy()
193 dest->pre_comp.nistp256 = EC_nistp256_pre_comp_dup(src->pre_comp.nistp256); in EC_GROUP_copy()
196 dest->pre_comp.nistp384 = ossl_ec_nistp384_pre_comp_dup(src->pre_comp.nistp384); in EC_GROUP_copy()
199 dest->pre_comp.nistp521 = EC_nistp521_pre_comp_dup(src->pre_comp.nistp521); in EC_GROUP_copy()
209 dest->pre_comp.ec = EC_ec_pre_comp_dup(src->pre_comp.ec); in EC_GROUP_copy()
213 if (src->mont_data != NULL) { in EC_GROUP_copy()
219 if (!BN_MONT_CTX_copy(dest->mont_data, src->mont_data)) in EC_GROUP_copy()
227 if (src->generator != NULL) { in EC_GROUP_copy()
233 if (!EC_POINT_copy(dest->generator, src->generator)) in EC_GROUP_copy()
241 if ((src->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) { in EC_GROUP_copy()
242 if (!BN_copy(dest->order, src->order)) in EC_GROUP_copy()
244 if (!BN_copy(dest->cofactor, src->cofactor)) in EC_GROUP_copy()
248 dest->asn1_flag = src->asn1_flag; in EC_GROUP_copy()
249 dest->asn1_form = src->asn1_form; in EC_GROUP_copy()
250 dest->decoded_from_explicit_params = src->decoded_from_explicit_params; in EC_GROUP_copy()
252 if (src->seed) { in EC_GROUP_copy()
254 if ((dest->seed = OPENSSL_malloc(src->seed_len)) == NULL) in EC_GROUP_copy()
256 if (!memcpy(dest->seed, src->seed, src->seed_len)) in EC_GROUP_copy()
258 dest->seed_len = src->seed_len; in EC_GROUP_copy()
265 return dest->meth->group_copy(dest, src); in EC_GROUP_copy()
770 int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) in EC_POINT_copy() argument
776 if (dest->meth != src->meth in EC_POINT_copy()
777 || (dest->curve_name != src->curve_name in EC_POINT_copy()
779 && src->curve_name != 0)) { in EC_POINT_copy()
783 if (dest == src) in EC_POINT_copy()
785 return dest->meth->point_copy(dest, src); in EC_POINT_copy()