While it has long been held that, "ignorance of the law is no excuse," there is substantial justification for treating as a defense the situation where a government agent has informed the defendant that the conduct would comply with the law. In other words, if one relies on an official interpretation of the law by someone empowered to interpret or enforce the law, then such reliance may be treated as an affirmative defense often called, "entrapment by estoppel."
For instance, in the case of Miller v. Commonwealth, a convicted felon in Virginia was an avid hunter, however, he was prohibited from possessing firearms. Having asked his probation officer, the ATF, and Fish and Game, Miller was informed that a muzzle-loading rifle was allowed for him to possess. He was arrested and successfully used the "entrapment by estoppel" defense - which this author prefers to call the "official permission doctrine."
Does this discussion not beg the question, with respect to medical marijuana and the statements by Attorney General Eric Holder and President Obama; AFFIRMATIVE FEDERAL OFFICIAL PERMISSION DOCTRINE, it legalizes medical marijuana under Federal law by implication, right?
(While this defense makes legal sense to this author, Federal judges have been denying the defense by citing the statements as too vague, or placing an affirmative duty on the defendant to check again with the Attorney General's Office or FBI. In short, all marijuana is still illegal under Federal law - at least that's the safest interpretation to rely on, and one this author encourages you to adopt pending a more unified application of law.)
-Joshua Hershon, Esq.