No decree of divorce shall affect the legitimacy of a child born or begotten in lawful matrimony, unless it shall be so expressed in the decree, and children born of a marriage entered into in good faith by the parties thereto shall be regarded as legitimate children and their legitimacy shall not be affected by a decree of nullity, unless it shall be so expressed in the decree.
N.H. Rev. Stat. Ann. § 458:23
Legitimacy of Offspring
Source
Official source: New Hampshire General Court. Reproduced from public-domain New Hampshire statutes; confirm against the official source for the current text. Not legal advice.