They don't actually say that the Viagra was illegal, more so that the Viagra was found among the illegal drugs. Of course, Viagra is a prescription drug so possession without a prescription would be illegal.
Well, they're not saying it was without a Rx, they're saying the Rx was in somebody else's name (and he's saying that it is his Rx but used a pseudonym for privacy reasons...I don't know if that's legal, maybe it is.)
But the fact that he used a pseudonym, it was probably for the Viagra Rx.