Lines Matching defs:dest
138 EC_KEY *EC_KEY_copy(EC_KEY *dest, const EC_KEY *src)
142 if (dest == NULL || src == NULL)
152 if (dest->group)
153 EC_GROUP_free(dest->group);
154 dest->group = EC_GROUP_new(meth);
155 if (dest->group == NULL)
157 if (!EC_GROUP_copy(dest->group, src->group))
163 if (dest->pub_key)
164 EC_POINT_free(dest->pub_key);
165 dest->pub_key = EC_POINT_new(src->group);
166 if (dest->pub_key == NULL)
168 if (!EC_POINT_copy(dest->pub_key, src->pub_key))
174 if (dest->priv_key == NULL)
176 dest->priv_key = BN_new();
177 if (dest->priv_key == NULL)
180 if (!BN_copy(dest->priv_key, src->priv_key))
184 EC_EX_DATA_free_all_data(&dest->method_data);
192 if (!EC_EX_DATA_set_data(&dest->method_data, t, d->dup_func, d->free_func, d->clear_free_func))
197 dest->enc_flag = src->enc_flag;
198 dest->conv_form = src->conv_form;
199 dest->version = src->version;
201 return dest;