As was stated above:
You are responsible for the work you do.
If your boss requires you to do Work that you feel is illegal, immoral, or otherwise against your better judgement, then you should be looking for another employer.