Lines Matching defs:dest
140 EC_KEY *EC_KEY_copy(EC_KEY *dest, const EC_KEY *src)
144 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))
162 if (dest->pub_key)
163 EC_POINT_free(dest->pub_key);
164 dest->pub_key = EC_POINT_new(src->group);
165 if (dest->pub_key == NULL)
167 if (!EC_POINT_copy(dest->pub_key, src->pub_key))
172 if (dest->priv_key == NULL) {
173 dest->priv_key = BN_new();
174 if (dest->priv_key == NULL)
177 if (!BN_copy(dest->priv_key, src->priv_key))
181 EC_EX_DATA_free_all_data(&dest->method_data);
189 (&dest->method_data, t, d->dup_func, d->free_func,
195 dest->enc_flag = src->enc_flag;
196 dest->conv_form = src->conv_form;
197 dest->version = src->version;
198 dest->flags = src->flags;
200 return dest;