Lines Matching refs:dest

161 int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)  in EC_GROUP_copy()  argument
163 if (dest->meth->group_copy == 0) { in EC_GROUP_copy()
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()
181 dest->pre_comp.ec = NULL; 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()
214 if (dest->mont_data == NULL) { in EC_GROUP_copy()
215 dest->mont_data = BN_MONT_CTX_new(); in EC_GROUP_copy()
216 if (dest->mont_data == NULL) in EC_GROUP_copy()
219 if (!BN_MONT_CTX_copy(dest->mont_data, src->mont_data)) in EC_GROUP_copy()
223 BN_MONT_CTX_free(dest->mont_data); in EC_GROUP_copy()
224 dest->mont_data = NULL; in EC_GROUP_copy()
228 if (dest->generator == NULL) { in EC_GROUP_copy()
229 dest->generator = EC_POINT_new(dest); in EC_GROUP_copy()
230 if (dest->generator == NULL) in EC_GROUP_copy()
233 if (!EC_POINT_copy(dest->generator, src->generator)) in EC_GROUP_copy()
237 EC_POINT_clear_free(dest->generator); in EC_GROUP_copy()
238 dest->generator = NULL; 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()
253 OPENSSL_free(dest->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()
260 OPENSSL_free(dest->seed); in EC_GROUP_copy()
261 dest->seed = NULL; in EC_GROUP_copy()
262 dest->seed_len = 0; 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
772 if (dest->meth->point_copy == 0) { in EC_POINT_copy()
776 if (dest->meth != src->meth in EC_POINT_copy()
777 || (dest->curve_name != src->curve_name in EC_POINT_copy()
778 && dest->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()