"I'm still not sure about the legality of the whole thing; a long time ago I learned something along the lines that law enforcement is not allowed to 'bait' someone into doing something illegal; as the whole situation could be doctored to force somebody to do something they wouldn't have done otherwise. I think it's related to your question; but unfortunately I can't recall what the concept is called, or if I'm completely off-track here anyway."
The concept is "entrapment".