Under well-established common law, a man is the legal father of any child born to his wife during a marriage. Unless a state's case law or statutory law has explicitly overturned this, or there has a been a court-ordered termination of paternal rights in a specific case, the common law holds. Plenty of men have found this out the hard way, when they were forced to pay many years of child support for a child born to their ex-wife during the marriage and biologically fathered by another man.
I'm aware of that.
you are mostly right. but that law states also that if the husband is sterile, his legal father status is waived