Art. 264e provides for a criminal penalty of not less than three years for any person who commits certain specified offenses in connection with an armed conflict, including (among other things) raping a person of the female gender protected by international humanitarian law or, after she has been forcibly made pregnant, confining her unlawfully with the intent of affecting the ethnic composition of a population, forcing a person to tolerate a sexual act of comparable severity or forcing a person protected by international humanitarian law into prostitution or to be sterilized. In especially serious cases, and in particular where the offense affects a number of persons or the offender acts in a cruel manner, life imprisonment may be imposed. In less serious cases, imprisonment of not less than one year may be imposed. Unofficial English translation available here.
Schweizerisches Strafgesetzbuch/Swiss Penal Code, Article 264e: War Crimes