Impotence is an impediment to valid marriage, as it makes impossible consummation of the marriage.
However, I don’t believe that infertility is an impediment.
Here's a cite from Canon Law:
Can. 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.