No. There must be a reasonable suspicion that you committed a crime or you are under arrest, or an inventory search is being carried out prior to a car being towed to allow a police officer search. If the search is illegal, any evidence may be suppressed. However, you could still be convicted on other evidence.