Taliban legitimacy will have to be ‘earned’: US