When a person has been charged with a crime, it is the responsibility of her/his defense attorney to defend her/him to the best of her/his ability, where her/his client is innocent or guilty. The defense attorney must be conscience of her/his mistakes could cost their client her/his freedom or even her/his life. The defense attorney's ethical obligations are 1. To defend her/his client with conviction, 2. To have such conviction without regard to guilt or innocence, and finally, 3. Anything her/his client says or writes to each other is kept in strict confidence.
The prosecuting attorney moral obligation to make sure the evidence, whether physical or an eye witness to be used in the case or not just circumstantial. She/he must ensure that the law prevails, and justice has been truly served. If she/he does not uphold their obligations, individuals' lives are ruined if not lost. The prosecuting attorney's ethical obligations are 1. To ensure the person being prosecuted is in deed the person who committed the crime, 2. To make sure the person being prosecuted her/his constitutional and civil rights are not being abused 3. To treat all equal under the law, no one should be treated special.
Both attorneys have a tremendous amount of moral obligation and responsibilities, so the person on trial receives the best representation. Both have to realize that lives and futures are at stake, and any corruption that would affect the outcome of the trial can put an end to the life of the person on trial.