(1)Where an officer in charge of a prison doubts the legality of a warrant or order sent to him for execution, or the competency of the person whose official seal and signature are affixed thereto to pass the sentence and issue such warrant or order, he shall refer the matter to the District and Sessions Judge and State Government, by whose order on the case he and all other public officers shall be guided as to the future disposal of the prisoner. [Section 17 Act III of 1900]