Generic Viagra is legal no matter in what country it was produced, since it has to undergo all FDA procedures and show its conformity to FDA standards (quality, safety, effectiveness, etc.) to be allowed for sale at pharmacies. Generic does not mean illegal.