I think the legality is: the only alcohol you can drink on board is the one served by the airline (FAA rule). The reason behind it is to give the airline a control over you, to make sure you do not become intoxicated to the point of putting the flight in danger.
So in short: Legally you cannot. But my guess is that not too many people would worry about it.