The prosecuting attorney shall endorse upon each information the names of the witnesses known to him at the time of its filing. Any further endorsement of names upon the information shall be done only with permission of the court. This section shall not preclude calling any witnesses whose names or the materiality of whose testimony is first learned by the prosecuting attorney during the trial. This section does not require the endorsement of names of witnesses which are to be used only in rebuttal.
SDCL 23A-6-10