Intent applies to every material factor of the crime, for most crimes. Thus, for cocaine possession, you must (a) intend to possess the substance at issue, and (b) you must know the substance at issue is cocaine. If intent is not met for both of those factors (aka sub-elements), then intent has not been proven.
For SR, it's different. You must have intended to commit the sexual acts at issue. However, intent is not required as your knowledge of the age of the other party. In that sense, SR is strict liability. But note--many legal scholars and judges are of the opinion that SR as a strict liability crime is unconstitutional. For CP, the issue, as discussed in another comment, is similar--the intent to possess is a required element, but not knowledge that the possessed content is CP (though some states require intent as to both).
>I read somewhere that possession of CP is like possession of cocaine - both are crimes purely because you have them, regardless of intent:
Possession of drug charges are not strict liability - in fact possession is actually a much greater legal analysis than one might think - for example, the are different types of possession legally (constructive or actual). Additionally, do not think you can beat the legal system by having someone else hide drugs in a vehicle and then you drive it not knowing you have possession, because there is a doctrine that prohibits someone from denying criminal intent under a willful blind eye (Willful Blind Eye Doctrine).