A military court may punish for contempt any person who willfully and unlawfully refuses to be sworn as a witness, or who refuses to answer any legal or proper question, or who uses any menacing word, sign, or gesture in its presence, or who disturbs its proceedings by a riot or disorder. The punishment shall not exceed confinement for thirty days or a fine of one hundred dollars, or both.