Maybe maybe not. Basically, he could have taken you in for driving on a suspended license, as it is a criminal
offense, and most times police will arrest someone for it and either impound the car or let someone with a license pick you up. As he had the probable cause
to arrest you, he could search you and the car incident to an arrest and it would have been proper.
He couldn't take the car apart piece by piece without a warrant or an exception to the warrant requirement, but an inventory-type search would probably hold up in a suppression hearing.
That said, whether something is Constitutional or not is something that gets determined anew with each criminal case. The Supreme Court
has said matters involving when the police have overstepped their authority in violation of someone's fundamental rights must be fully litigated at pre-trial
suppression hearings. It is only after all
of the evidence comes out at such a hearing does the court determine if the search was unconstitutional. The standard the judge must use to decide whether a violation occurred is what a reasonable police officer would have done under all of the facts and circumstances.
If your car was searched, and the officer came up with contraband, if you wanted to fight the charges your lawyer would move for a pre-trial hearing to explore the search and seizure issues as well as any other Consitutitonal violations the officer might have made. At such a hearing the police officer would be put on the stand and the prosecutor would ask questions designed to make the whole stop and search look as reasonable under the circumstances as possible. Then your lawyer on cross examination could probe and bring out all of the unreasonable facts related to your stop, search and seizure. At the end of the hearing, the judge decides for one side or the other. If for the state, the case goes on to trial. if for the defense, evidence may get suppressed which, depending upon what it is and the type of case involved, could result in a dismissal.
If on the other hand you were not arrested and you just feel that the police officer harraassed you without reason, you could complain to his supervisors, file a complaint
as well with Internal Affairs and another with your state Attorney General's Office to get his harassing tactics investigated.