The Constitution does not provide for any gun purchase to be deemed "illegal". So there's no such thing as a "legal" gun purchase.
I agree with the intent of the Constitution but if you purchase a gun in a store they will not sell it to you unless you agree to a background check.