In the Sermon on the Mount, the Lord recalls the commandment, "You shall not kill," and adds to it the proscription of anger, hatred, and vengeance. Going further, Christ asks his disciples to turn the other cheek, to love their enemies. He did not defend himself and told Peter to leave his sword in its sheath.
-- CCC 2262
The legitimate defense of persons and societies is not an exception to the prohibition against the murder of the innocent that constitutes intentional killing. "The act of self-defense can have a double effect: the preservation of one's own life; and the killing of the aggressor. . . . The one is intended, the other is not."
-- CCC 2263