Section 30. The acknowledgment of a deed or other written instrument required to be acknowledged shall be by one or more of the grantors or by the attorney executing it. The officer before whom the acknowledgment is made shall endorse upon or annex to the instrument a certificate thereof. Such acknowledgment may be made—
(a) If within the commonwealth, before a justice of the peace or notary public.
(b) If without the commonwealth, in any state, territory, district or dependency of the United States, before a justice of the peace, notary public, magistrate or commissioner appointed therefor by the governor of this commonwealth, or, if a certificate of authority in the form prescribed by section thirty-three is attached thereto, before any other officer therein authorized to take acknowledgments of deeds.
(c) If without the United States or any dependency thereof, before a justice of the peace, notary, magistrate or commissioner as above provided, or before an ambassador, minister, consul, vice consul, charge d'affaires or consular officer or agent of the United States accredited to the country where the acknowledgment is made; if made before an ambassador or other official of the United States, it shall be certified by him under his seal of office.