(b)if such person is detained in a jail under sub-section (5) of section 121 on a certificate of the Inspector-General of Prisons, and if such person is detained in a lunatic asylum under the said sub-section, on a certificate of any two or more of the visitors of such asylum and if he is detained in any other place under that sub-section, on a certificate of the prescribed authority, that he is capable of making his defence,