As far as I've heard, the only legal criteria for judging mental illness is either having undergone voluntary/involuntary committment or having been absolved of responsibility for a crime based upon a finding of mental incapacitation. Aspergers should not fall into that category.
A quick Google found this
(sorry for the source):
http://www.lcav.org/content/mlmentalhealthprint.asp
Mental Health Reporting
Eligibility Requirements
Federal law renders certain mentally ill persons ineligible to possess firearms. Under federal law, it is illegal for a person who "has been adjudicated as a mental defective or who has been committed to a mental institution" to possess a firearm. 118 U.S.C. § 922(g). ATF regulations (see 27 CFR 178.11) define "adjudicated as a mental defective" to mean:
(a) A determination by a court, board, commission, or other lawful authority that a person, as a result of marked subnormal intelligence, or mental illness, incompetency, condition, or disease:
(1) Is a danger to himself or to others; or
(2) Lacks the mental capacity to contract or manage his own affairs.
(b) The term shall include:
(1) A finding of insanity by a court in a criminal case; and
(2) Those persons found incompetent to stand trial or found not guilty by reason of lack of mental responsibility pursuant to articles 50a and 72b of the Uniform Code of Military Justice, 10 U.S.C. 850a, 876b.
ATF regulations (see 27 CFR 178.11) define "committed to a mental institution" to mean:
A formal commitment of a person to a mental institution by a court, board, commission, or other lawful authority. The term includes a commitment to a mental institution involuntarily. The term includes a commitment for mental defectiveness or mental illness. It also includes commitments for other reasons, such as drug use. The term does not include a person in a mental institution for observation or a voluntary admission to a mental institution.
Accordingly, persons with mental disorders who have voluntarily committed themselves to mental institutions and have not been judged by a government authority to be dangers to themselves or others, insane, or lacking mental capacity are not prohibited by federal law from possessing firearms. This is true even if such mentally ill persons are believed to be dangers to themselves or others.
Many states have their own laws regarding who is eligible to possess a firearm, and some of those laws are more stringent than federal law when it comes to the mentally ill. For example, in Hawaii, the restrictions on possession of firearms by the mentally ill who have not been adjudicated as mental defectives extend beyond those persons who have been involuntarily committed to mental hospitals. Any person who has been diagnosed as having a significant behavioral, emotional, or mental disorder as defined by the most current diagnostic manual of the American Psychiatric Association is prohibited by Hawaii law from possessing a firearm. Haw. Rev. Stat. § 134-7(c)(3).
Similarly, in Illinois, it is illegal to sell or give any firearm to a person who has been a patient in a mental hospital within the past five years. 720 Ill. Comp. Stat. 5/24-3. In addition, a person in Illinois is not eligible to obtain a permit to possess a handgun if the person's mental condition "is of such a nature that it poses a clear and present danger to the applicant, any other person or persons or the community;" i.e. "a state of mind manifested violent, suicidal, threatening or assaultive behavior." 430 Ill Comp. Stat. 65/8.
California is another state that has laws concerning the mentally ill that are more stringent than federal law. In California, a person is barred, for a period of six months, from possessing a firearm if he or she communicates to a licensed psychotherapist a serious threat of physical violence against a reasonably identifiable victim or victims. The prohibition applies only if the psychotherapist notifies a local law enforcement agency of the threat by that person. Cal. Welf. & Inst. Code § 8100(b). Licensed psychotherapists are required to immediately report to a local law enforcement agency the identity of a person who has communicated to the therapist a serious threat of violence against a reasonably identifiable victim or victims. Cal. Welf. & Inst. Code § 8105(c).
In Connecticut, a state's attorney or two police officers may file complaints and affidavits under oath with any Superior Court, stating that they have probably cause to believe that a person poses a risk of imminent personal injury to himself, herself, or others and possesses firearm. Probable cause may be based, in part, on involuntary confinement to a mental hospital, but such involuntary confinement is not necessary for a finding of probable cause. If probable cause exists and there is no reasonable alternative available to prevent the person from causing imminent personal injury to himself or herself or others with the firearm, the judge may issue a warrant for seizure of the firearms. Conn. Gen. Stat. §29-38c.
Background Checks for the Mentally Ill
In accordance with the federal Brady Act, when a person acquires a firearm from a federally licensed firearms dealer, the dealer must conduct a background check before transferring the firearm. In some states, the dealer contacts the FBI and the FBI searches its databases to determine if the person is eligible to possess a firearm. In other states, the dealer is required to contact a designated authority in the state and have that authority conduct a background check by checking FBI databases as well as certain state databases. Although persons who have been adjudicated as mental defectives or committed to mental institutions are prohibited by federal law from possessing firearms, the current status of the FBI databases makes it difficult to prevent such a person from obtaining firearms if the person undergoes only an FBI background check. That is because a great deal of information about mentally ill people is not reported to the FBI and the FBI does not currently have access to mental health records that are maintained by the states.
Many Americans have been involuntarily committed to mental institutions and are barred by federal law from possessing firearms, but, as of April 2000, the FBI had received a total of only 41 records regarding mentally ill persons from all states. United States General Accounting Office, Gun Control: Options for Improving the National Instant Background Check System (2000). As a result of the FBI's lack of information about mentally ill persons, a FBI background check is unlikely to find that a person is ineligible to possess a firearm due to mental illness.
In cases where the states have chosen to perform background checks, the firearms dealer contacts the state point of contact (POC). The POC searches the FBI system as well as state databases. In some of these states, such as California, Connecticut, Illinois, and Oregon, the background check includes a search of state mental health records. For example, between 1996 and 1998, Illinois searched mental records and found that 3,699 persons who applied for a gun card were ineligible under state or federal law to possess firearms. Fox Butterfield, Hole in Gun Control Law Lets Mentally Ill Through, N.Y. Times, April 11, 2000, at A1. In addition, during that period, 5,585 persons who were hospitalized had their gun permits revoked because of their mental illnesses. Id. If the FBI had been conducting the background checks on these persons, however, the FBI probably would not been unable to determine that the persons were ineligible to possess firearms.