U.S. crude-export ban once called crucial to “national security” is now said to be illegal