You are given a task. "Torture terrorists for intelligence" you are not given high quality terrorists and you get pretty much nothing. It gets shut down, shred the evidence. As an employee is this your problem or the problem of the person who gave you this task?
It's a crime under Geneva Convention to obey an illegal order (unless, I believe, you think you will killed if you don't obey). It's also a crime under the same conventions to give an illegal order.
This was the basis of the Nuremberg and Tokyo war trials.