The officer may employ all reasonable and necessary force to overcome resistance in making a lawful arrest. The legality of the arrest has nothing to do with whether or not you are ultimately convicted.
Resisting arrest with violence is a felony under New York law. Resisting arrest without violence or offering to do violence is a misdemeanor. You could be convicted of either of these crimes, even if you were found not guilty of the crime for which you were arrested. If you believe that your rights are being violated, make it a point to remember exactly what the police officer did and then advise your attorney concerning this at the earliest possible time.
While the law of search and seizures is very complex, and often will depend on the facts and circumstances in a particular case, you should not resist a search with force; however, neither should you consent to an improper search. If you do object to a particular search, advise the officer who is conducting it that you do not consent, that you do object to the search and ask the officer to identify him or herself.
In most cases involving search and seizure issues, "reasonableness" of the search is the legal test without a search warrant. If police officers arrive at your premises armed with a search warrant, they may search only that area or portion authorized in the warrant itself. You are entitled to have a copy of the search warrant left with you and served on you if present. If you are arrested in your home, the officers may conduct a limited search of the immediate area where you are arrested without a search warrant. They may also check the rest of the house for any hidden accomplices. They may seize any contraband, stolen property, instrumentalities or evidence of a crime that they discover in plain view in any portion of the house where the officers have a right to be.
Your automobile may also be impounded and inventoried if there is no qualified licensed driver or towing agent to take charge of it. If an officer is about to impound your car, tell the officer if you can have a relative or friend who will come and get it, or that you have a preference of your own station, to tow your car.