Is this kid illegitimate ?

That obviously is a big no-no. That child will be the donor's, not the husband's. Either get the husband treated for infertility, or adopt a child, or divorce the guy and marry someone else, or just live with the shortcoming.