if (src->generator != NULL) { if (dest->generator == NULL) { dest->generator = EC_POINT_new(dest); if (dest->generator == NULL) return 0; } if (!EC_POINT_copy(dest->generator, src->generator)) return 0; } else {  if (dest->generator != NULL) { EC_POINT_clear_free(dest->generator); dest->generator = NULL; } }  if (!BN_copy(&dest->order, &src->order)) return 0; if (!BN_copy(&dest->cofactor, &src->cofactor)) return 0;  dest->nid = src->nid;
int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)	{	if (dest->meth->group_copy == 0)		{		ECerr(EC_F_EC_GROUP_COPY, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);		return 0;		}	if (dest->meth != src->meth)		{		ECerr(EC_F_EC_GROUP_COPY, EC_R_INCOMPATIBLE_OBJECTS);		return 0;		}	if (dest == src)		return 1;		EC_GROUP_clear_free_extra_data(dest);	if (src->extra_data_dup_func)		{		if (src->extra_data != NULL)			{			dest->extra_data = src->extra_data_dup_func(src->extra_data);			if (dest->extra_data == NULL)				return 0;			}		dest->extra_data_dup_func = src->extra_data_dup_func;		dest->extra_data_free_func = src->extra_data_free_func;		dest->extra_data_clear_free_func = src->extra_data_clear_free_func;		}	return dest->meth->group_copy(dest, src);	}