An annulment only says that the marriage was not the Sacrament of Matrimony. The marriage is NOT illegitimate.
Right. God and Caesar—two different things.