Geneva Conventions: Art. 5
"Where in occupied territory an individual protected person is detained as a spy or saboteur, or as a person under definite suspicion of activity hostile to the security of the Occupying Power, such person shall, in those cases where absolute military security so requires, be regarded as having forfeited rights of communication under the present Convention."

Afterwards it says "In each case, such persons shall nevertheless be treated with humanity and, in case of trial, shall not be deprived of the rights of fair and regular trial prescribed by the present Convention. They shall also be granted the full rights and privileges of a protected person under the present< Convention at the earliest date consistent with security of State or Occupying Power"

Since a soldier is technically defined as a person that fights for a country and wears a uniform on the battlefield terrorists are not protected under the Geneva Conventions. They must be treated HUMANLY but are not protected anywhere in the Conventions against torture. I have not read the entire document only parts of it. From what i gather if you capture a terrorist they are considered a spy and a spy is not protected against torture only INNOCENT civilians are therefore can’t we legally torture terrorists if we try them in court?