Trump ban on Muslims ‘endangers national security’: Kerry