Lines Matching refs:src
106 EC_KEY *EC_KEY_copy(EC_KEY *dest, const EC_KEY *src) in EC_KEY_copy() argument
108 if (dest == NULL || src == NULL) { in EC_KEY_copy()
112 if (src->meth != dest->meth) { in EC_KEY_copy()
123 dest->libctx = src->libctx; in EC_KEY_copy()
125 if (src->group != NULL) { in EC_KEY_copy()
128 dest->group = ossl_ec_group_new_ex(src->libctx, src->propq, in EC_KEY_copy()
129 src->group->meth); in EC_KEY_copy()
132 if (!EC_GROUP_copy(dest->group, src->group)) in EC_KEY_copy()
136 if (src->pub_key != NULL) { in EC_KEY_copy()
138 dest->pub_key = EC_POINT_new(src->group); in EC_KEY_copy()
141 if (!EC_POINT_copy(dest->pub_key, src->pub_key)) in EC_KEY_copy()
145 if (src->priv_key != NULL) { in EC_KEY_copy()
151 if (!BN_copy(dest->priv_key, src->priv_key)) in EC_KEY_copy()
153 if (src->group->meth->keycopy in EC_KEY_copy()
154 && src->group->meth->keycopy(dest, src) == 0) in EC_KEY_copy()
161 dest->enc_flag = src->enc_flag; in EC_KEY_copy()
162 dest->conv_form = src->conv_form; in EC_KEY_copy()
163 dest->version = src->version; in EC_KEY_copy()
164 dest->flags = src->flags; in EC_KEY_copy()
167 &dest->ex_data, &src->ex_data)) in EC_KEY_copy()
171 if (src->meth != dest->meth) { in EC_KEY_copy()
173 if (src->engine != NULL && ENGINE_init(src->engine) == 0) in EC_KEY_copy()
175 dest->engine = src->engine; in EC_KEY_copy()
177 dest->meth = src->meth; in EC_KEY_copy()
180 if (src->meth->copy != NULL && src->meth->copy(dest, src) == 0) in EC_KEY_copy()