From the Code of Canon Law;
DIRIMENT IMPEDIMENTS IN GENERAL
Can. 1073 A diriment impediment renders a person unqualified to contract marriage validly.
Can. 1074 An impediment which can be proven in the external forum is considered to be public; otherwise it is occult.
Can. 1075 §1. It is only for the supreme authority of the Church to declare authentically when divine law prohibits or nullifies marriage.
§2. Only the supreme authority has the right to establish other impediments for the baptized.
Can. 1076 A custom which introduces a new impediment or is contrary to existing impediments is reprobated.
Can. 1077 §1. In a special case, the local ordinary can prohibit marriage for his own subjects residing anywhere and for all actually present in his own territory but only for a time, for a grave cause, and for as long as the cause continues.
§2. Only the supreme authority of the Church can add a nullifying clause to a prohibition.
Can. 1078 §1. The local ordinary can dispense his own subjects residing anywhere and all actually present in his own territory from all impediments of ecclesiastical law except those whose dispensation is reserved to the Apostolic See.
§2. Impediments whose dispensation is reserved to the Apostolic See are:
1/ the impediment arising from sacred orders or from a public perpetual vow of chastity in a religious institute of pontifical right;
2/ the impediment of crime mentioned in ⇒ can. 1090.
§3. A dispensation is never given from the impediment of consanguinity in the direct line or in the second degree of the collateral line.
Can. 1079 §1. In urgent danger of death, the local ordinary can dispense his own subjects residing anywhere and all actually present in his territory both from the form to be observed in the celebration of marriage and from each and every impediment of ecclesiastical law, whether public or occult, except the impediment arising from the sacred order of presbyterate.
§2. In the same circuмstances mentioned in §1, but only for cases in which the local ordinary cannot be reached, the pastor, the properly delegated sacred minister, and the priest or deacon who assists at marriage according to the norm of ⇒ can. 1116, §2 possess the same power of dispensing.
§3. In danger of death a confessor possesses the power of dispensing from occult impediments for the internal forum, whether within or outside the act of sacramental confession.
§4. In the case mentioned in §2, the local ordinary is not considered accessible if he can be reached only through telegraph or telephone.
Can. 1080 §1. Whenever an impediment is discovered after everything has already been prepared for the wedding, and the marriage cannot be delayed without probable danger of grave harm until a dispensation is obtained from the competent authority, the local ordinary and, provided that the case is occult, all those mentioned in ⇒ can. 1079, §§2-3 when the conditions prescribed therein have been observed possess the power of dispensing from all impediments except those mentioned in ⇒ can. 1078, §2, n. 1.
§2. This power is valid even to convalidate a marriage if there is the same danger in delay and there is insufficient time to make recourse to the Apostolic See or to the local ordinary concerning impediments from which he is able to dispense.
Can. 1081 The pastor or the priest or deacon mentioned in ⇒ can. 1079, §2 is to notify the local ordinary immediately about a dispensation granted for the external forum; it is also to be noted in the marriage register.
Can. 1082 Unless a rescript of the Penitentiary provides otherwise, a dispensation from an occult impediment granted in the non-sacramental internal forum is to be noted in a book which must be kept in the secret archive of the curia; no other dispensation for the external forum is necessary if afterwards the occult impediment becomes public.
http://www.vatican.va/archive/ENG1104/__P3X.HTM