a. Sections four hundred sixty-two and four hundred sixty-four shall not apply to:
(1) persons in the military service of the state of New York when duly authorized by regulations issued by the chief of staff to the governor to carry or possess a firearm;
(2) persons in the military or other service of the United States, in pursuit of official duty or when duly authorized by federal law, regulation or order to carry or possess a firearm;
(3) persons employed in fulfilling defense contracts with the government of the United States or agencies thereof when possession of a firearm is necessary for manufacture, transport, installation and testing under the requirements of such contract;
(4) police officers as defined by the criminal procedure law section 1.20;
(5) peace officers as defined by the criminal procedure law section 2.10, provided that such peace officers are (i) authorized pursuant to law or regulation of the state or city of New York to possess a firearm within the city of New York without a license or permit therefore; and (ii) authorized by their employer to possess such firearm; or
(6) participants in special events when authorized by the police commissioner.
b. Any person listed in subdivision a of this section may be permitted or licensed to purchase a firearm according to State law and the rules of the city of New York. Pursuant to section four hundred sixty-three, it shall be a crime for a dealer to sell any firearm to any person listed in subdivision a without securing full and secure proof of identification.