Yazid bin Abu Ubaid says: I asked Sayyiduna Salamah bin Akwa’ (may Allah be pleased with him), “On what did you pledge allegiance to the Prophet (peace be upon him) on the day of Hudaybiyyah?” He replied: “We pledged allegiance to death.”
Hadith Referenceمسند احمد / مسند المدنيين رضي الله عنهم اجمعين / 16533