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;
int ec_GFp_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src)	{	if (!BN_copy(&dest->field, &src->field)) return 0;	if (!BN_copy(&dest->a, &src->a)) return 0;	if (!BN_copy(&dest->b, &src->b)) return 0;	dest->a_is_minus3 = src->a_is_minus3;	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		{		/* src->generator == NULL */		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;	return 1;	}