Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
muslim:1783bMuḥammad b. al-Muthanná And Ibn Bashhār > Muḥammad b. Jaʿfar > Shuʿbah > Abū Isḥāq > al-Barāʾ b. ʿĀzib

When the Messenger of Allah ﷺ made peace with the people of Hudaibiya, 'Ali drew up the agreement between them, and so he wrote: Muhammad, the Messenger of Allah. (This is followed by the same wording as we have in the previous tradition except the omission of the words: This is what he has settled.)  

مسلم:١٧٨٣bحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى وَابْنُ بَشَّارٍ قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ حَدَّثَنَا شُعْبَةُ عَنْ أَبِي إِسْحَاقَ قَالَ

سَمِعْتُ الْبَرَاءَ بْنَ عَازِبٍ يَقُولُ لَمَّا صَالَحَ رَسُولُ اللَّهِ ﷺ أَهْلَ الْحُدَيْبِيَةِ كَتَبَ عَلِيٌّ كِتَابًا بَيْنَهُمْ قَالَ فَكَتَبَ مُحَمَّدٌ رَسُولُ اللَّهِ ثُمَّ ذَكَرَ بِنَحْوِ حَدِيثِ مُعَاذٍ غَيْرَ أَنَّهُ لَمْ يَذْكُرْ فِي الْحَدِيثِ هَذَا مَا كَاتَبَ عَلَيْهِ