Roman Catholic Canon Law explicitly covers this.
1084 §1. Antecedent and perpetual impotence to have intercourse, whether on the part of the man or the woman, whether absolute or relative, nullifies marriage by its very nature.
§2. If the impediment of impotence is doubtful, whether by a doubt about the law or a doubt about a fact, a marriage must not be impeded nor, while the doubt remains, declared null.
§3. Sterility neither prohibits nor nullifies marriage, without prejudice to the prescript of can. 1098.
1098 A person contracts invalidly who enters into a marriage deceived by malice, perpetrated to obtain consent, concerning some quality of the other partner which by its very nature can gravely disturb the partnership of conjugal life.
Thus sterility does not invalidate a marriage, although impotence does. If one partner deceives the other into believing that children are possible when they are not, the marriage is invalid on the grounds of the deception, not the sterility.
Canon 1084 | Canon 1098