CAL. FAM. CODE § 7613 : California Code - Section 7613

(a) If, under the supervision of a licensed physician and surgeon and with the consent of her husband, a wife is inseminated artificially with semen donated by a man not her husband, the husband is treated in law as if he were the natural father of a child thereby conceived. The husband's consent must be in writing and signed by him and his wife. The physician and surgeon shall certify their signatures and the date of the insemination, and retain the husband's consent as part of the medical record, where it shall be kept confidential and in a sealed file. However, the physician and surgeon's failure to do so does not affect the father and child relationship. All papers and records pertaining to the insemination, whether part of the permanent record of a court or of a file held by the supervising physician and surgeon or elsewhere, are subject to inspection only upon an order of the court for good cause shown.

(b) The donor of semen provided to a licensed physician and surgeon or to a licensed sperm bank for use in artificial insemination or in vitro fertilization of a woman other than the donor's wife is treated in law as if he were not the natural father of a child thereby conceived, unless otherwise agreed to in a writing signed by the donor and the woman prior to the conception of the child.