I found this:
“In order to shed light on this difficult question, it is necessary to recall the general principles concerning cooperation in evil actions. Christians, like all people of good will, are called upon under grave obligation of conscience not to cooperate formally in practices which, even if permitted by civil legislation, are contrary to God’s law. Indeed, from the moral standpoint, it is never licit to cooperate formally in evil. Such cooperation occurs when an action, either by its very nature or by the form it takes in a concrete situation, can be defined as a direct participation in an act against innocent human life or a sharing in the immoral intention of the person committing it. This cooperation can never be justified either by invoking respect for the freedom of others or by appealing to the fact that civil law permits it or requires it. Each individual in fact has moral responsibility for the acts which he personally performs; no one can be exempted from this responsibility, and on the basis of it everyone will be judged by God himself (cf. Rom 2:6; 14:12).”
What i am uncertain about is the cooperation in actions, which are in some part or in some formal way evil and in some not.
Even greater problem, i have no realy good example.
Maybe an example is arresting people. If the only law of the land is “Persons not acknowledging the godhood of the dear leader are to be arrested and punished etc.” working in official function and arresting people is formally cooperating in evil. But what if there is a second law “Murderes are to be arrested and punished etc.” and the person doing the arresting is not and cannot be aware whether he is arresting someone defying the injust law (which would be evil) or some plain murderer (which would not be evil and actually a police officers natural duty). Formal cooperation in evil, yes or no?