This is a long and involved process.
Check it out:
Seemingly inspired by James Bond, Massachusetts Democratic Senator Ed Markey has proposed “The Handgun Trigger Safety Act of 2014,” which seeks to mandate so-called “smart gun” technology that would render a gun useless if someone apart from an authorized user attempts to fire it.
The Handgun Trigger Safety Act would mandate that, within two years of enactment, all newly manufactured handguns must be personalized, ensuring that they can only be operated by authorized users. Within three years of enactment, anyone selling a handgun must retrofit it with personalization technology before that sale can be completed; these retrofittings will be paid for out of a fund administered by the Department of Justice. The bill would also provide for grants through the National Institute of Justice to continue to develop and improve handgun personalization technology to simultaneously increase efficacy and decrease cost.