Lines Matching defs:dest
105 EC_KEY *EC_KEY_copy(EC_KEY *dest, const EC_KEY *src)
107 if (dest == NULL || src == NULL) {
111 if (src->meth != dest->meth) {
112 if (dest->meth->finish != NULL)
113 dest->meth->finish(dest);
114 if (dest->group && dest->group->meth->keyfinish)
115 dest->group->meth->keyfinish(dest);
117 if (ENGINE_finish(dest->engine) == 0)
119 dest->engine = NULL;
122 dest->libctx = src->libctx;
126 EC_GROUP_free(dest->group);
127 dest->group = ossl_ec_group_new_ex(src->libctx, src->propq,
129 if (dest->group == NULL)
131 if (!EC_GROUP_copy(dest->group, src->group))
136 EC_POINT_free(dest->pub_key);
137 dest->pub_key = EC_POINT_new(src->group);
138 if (dest->pub_key == NULL)
140 if (!EC_POINT_copy(dest->pub_key, src->pub_key))
145 if (dest->priv_key == NULL) {
146 dest->priv_key = BN_new();
147 if (dest->priv_key == NULL)
150 if (!BN_copy(dest->priv_key, src->priv_key))
153 && src->group->meth->keycopy(dest, src) == 0)
160 dest->enc_flag = src->enc_flag;
161 dest->conv_form = src->conv_form;
162 dest->version = src->version;
163 dest->flags = src->flags;
166 &dest->ex_data, &src->ex_data))
170 if (src->meth != dest->meth) {
174 dest->engine = src->engine;
176 dest->meth = src->meth;
179 if (src->meth->copy != NULL && src->meth->copy(dest, src) == 0)
182 dest->dirty_cnt++;
184 return dest;