Dear Alex —
There is indeed a juridical verdict on this. Legitimacy is a legal concept, not a theological one.
The child is considered legitimate because the
marriage was a putative one.(See Canon 1137, Code of Canon Law)
A putative marriage is a marriage that has been celebrated in good faith
by at least one of the parties, until both parties become certain of its
nullity. (Canon 1061 §3, Code of Canon Law)
Canon 1037 An unmarried candidate for the permanent diaconate and a candidate for the presbyterate are not to be admitted to the order of diaconate unless they have assumed the obligation of celibacy in the prescribed rite publicly before God and the Church or have made perpetual vows in a religious institute.
Canon 1137, Code of Canon Law
Canon 1061 §1. A valid marriage between the baptized is called ratum tantum if it has not been consummated; it is called ratum et consummatum if the spouses have performed between themselves in a human fashion a conjugal act which is suitable in itself for the procreation of offspring, to which marriage is ordered by its nature and by which the spouses become one flesh.
§2. After a marriage has been celebrated, if the spouses have lived together consummation is presumed until the contrary is proven.
§3. An invalid marriage is called putative if at least one party celebrated it in good faith, until both parties become certain of its nullity.
Canon 1061 §3, Code of Canon Law
I hope this answers your question!