Lines Matching refs:src
105 EC_KEY *EC_KEY_copy(EC_KEY *dest, const EC_KEY *src) in EC_KEY_copy() argument
107 if (dest == NULL || src == NULL) { in EC_KEY_copy()
111 if (src->meth != dest->meth) { in EC_KEY_copy()
122 dest->libctx = src->libctx; in EC_KEY_copy()
124 if (src->group != NULL) { in EC_KEY_copy()
127 dest->group = ossl_ec_group_new_ex(src->libctx, src->propq, in EC_KEY_copy()
128 src->group->meth); in EC_KEY_copy()
131 if (!EC_GROUP_copy(dest->group, src->group)) in EC_KEY_copy()
135 if (src->pub_key != NULL) { in EC_KEY_copy()
137 dest->pub_key = EC_POINT_new(src->group); in EC_KEY_copy()
140 if (!EC_POINT_copy(dest->pub_key, src->pub_key)) in EC_KEY_copy()
144 if (src->priv_key != NULL) { in EC_KEY_copy()
150 if (!BN_copy(dest->priv_key, src->priv_key)) in EC_KEY_copy()
152 if (src->group->meth->keycopy in EC_KEY_copy()
153 && src->group->meth->keycopy(dest, src) == 0) in EC_KEY_copy()
160 dest->enc_flag = src->enc_flag; in EC_KEY_copy()
161 dest->conv_form = src->conv_form; in EC_KEY_copy()
162 dest->version = src->version; in EC_KEY_copy()
163 dest->flags = src->flags; in EC_KEY_copy()
166 &dest->ex_data, &src->ex_data)) in EC_KEY_copy()
170 if (src->meth != dest->meth) { in EC_KEY_copy()
172 if (src->engine != NULL && ENGINE_init(src->engine) == 0) in EC_KEY_copy()
174 dest->engine = src->engine; in EC_KEY_copy()
176 dest->meth = src->meth; in EC_KEY_copy()
179 if (src->meth->copy != NULL && src->meth->copy(dest, src) == 0) in EC_KEY_copy()