A companion of the Messenger of Allah ﷺ said, "I passed by the Messenger of Allah ﷺ while he was praying, and I greeted him with salam. He returned my greeting with a gesture, and as far as I recall, he indicated with his finger."
أخبرنا قتيبة بن سعيد قال حدثنا الليث عن بكير عن نابل صاحب العباء عن ابن عمر
صاحب رسول الله ﷺ قال مررت على رسول الله ﷺ وهو يصلي فسلمت عليه فرد علي إشارة ولا أعلم إلا أنه قال بإصبعه
Reported by Abu Dawud, Prayer, chapter on returning a greeting during the prayer, no. 925, and Tirmidhi, Prayer, chapter on what has been said about gesturing during the prayer, no. 367, from Qutayba through him. Tirmidhi said, "Hasan, we do not know it except through the hadith of Layth from Bukayr." It is also in al-Kubra, no. 1109, and the following hadith serves as a corroborating witness for it.