An agreement to indemnify a person against an act already done, is valid, even though the act was known to be wrongful, unless it was a felony.
(Enacted 1872.)