Every person who shall wilfully and corruptly swear, testify, or affirm falsely to any material matter under any oath, affirmation, or declaration legally administered in any matter, cause, or proceeding pending in any court of law or equity, or before any officer thereof, or in any case where an oath or affirmation is required by law or is necessary for the prosecution or defense of any private right or for the ends of public justice, or in any matter or proceeding before any tribunal or officer created by the Constitution or by law, or where any oath may be lawfully required by any judicial, executive, or administrative officer, shall be guilty of perjury, and shall not thereafter be received as a witness to be sworn in any matter or cause whatever, until the judgment against him be reversed.