refactor sendChallenge to only send active protocol during negotiate.
(cherry-picked from c4d5a87)