If you comply without protest, this will be taken as consent to a search, and make anything found admissible. One can verbally object. The ACLU suggests the form "I do not consent to searches" to any request to search your car, your house, your person or any other property of yours or under your control. There is no need to give any reason for your refusal.
However, one is required to follow any "lawful orders" given by police officer during a traffic or pedestrian stop. Failure to follow lawful orders may well be a separate crime. Even if the lawfulness is suspect, it is usually better to comply and challenge the order later, in court.
One might make a second objection, such as "I don't see that you have probable cause for a search, and I do not give consent. Are you ordering me to permit a search?"
If the officer clearly orders you to open the trunk, one might place the keys in reach of the officer, while not opening the trunk oneself. That might help establish that there was no consent to the search, and require probable cause to be established before anything found could be used in a trial. One might also repeat, as the officer opens the trunk "I am not consenting to any search."
If it is possible for any person present to record video without obstructing the officer(s) that might hrlp to establish the absence of consent and other relevant facts, later. People in general have a right to make such recordings, but not to obstruct or interfere with police activity.
Duty to Obey
The Washington Post in an opinion article dated July 23, 2015 "Sandra Bland and the ‘lawful order’ problem" wrote:
The Bland video brings up an overlooked problem with the law of police-citizen encounters. The police can back up their orders with force because it’s often a crime to disobey a lawful order from a police officer. But from a citizen’s perspective, it’s often impossible to know what is a lawful order. As a result, it’s often impossible for citizens to know what they can and can’t do during a police encounter.
The first problem is knowing what counts as an “order.” If an officer approaches you and asks you to do something, that’s normally just a request and not an order. But if there’s a law on the books saying that you have to comply with the officer’s request, then the request is treated as an order. You can’t know what is an “order” unless you study the law first, which you’re unlikely to have done before the officer approached you.
In the case of Oregon v Rose Mary ILLIG-RENN, 42 P.3d 62 (2006) The Supreme Court of Oregon held that
ORS 162.247(1)(b), a statute that makes it a crime to "refuse to obey a lawful order by [a] peace officer."
is constructional against challenges under the Oregon and US Federal constitutions.
- Virginia Code section 18.2-464. Failure to obey order of conservator of the peace
- Virginia Code Section § 18.2-463. Refusal to aid officer in execution of his office.
- Florida Statutes 316.072(3) "*OBEDIENCE TO POLICE AND FIRE DEPARTMENT OFFICIALS.—It is unlawful and a misdemeanor of the second degree, punishable as provided in s. 775.082 or s. 775.083, for any person willfully to fail or refuse to comply with any lawful order or direction of any law enforcement officer, traffic crash investigation officer as described in s. 316.640, traffic infraction enforcement officer as described in s. 316.640, or member of the fire department at the scene of a fire, rescue operation, or other emergency. *"
- (Oregon) ORS 162.247(1)(b) Interfering with a peace officer or parole and probation officer
A person commits the crime of interfering with a peace officer or parole and probation officer if the person, knowing that another person is a peace officer or a parole and probation officer ... Refuses to obey a lawful order by the peace officer or parole and probation officer.
- California Vehicle Code - VEH § 2800
(a) It is unlawful to willfully fail or refuse to comply with a lawful order, signal, or direction of a peace officer, as defined in Chapter 4.5 (commencing with Section 830) of Title 3 of Part 2 of the Penal Code, when that peace officer is in uniform and is performing duties pursuant to any of the provisions of this code, or to refuse to submit to a lawful inspection pursuant to this code.
- North Carolina § 20-114.1. Willful failure to obey law-enforcement or traffic-control officer
(a) No person shall willfully fail or refuse to comply with any lawful order or direction of any law-enforcement officer or traffic-control officer invested by law with authority to direct, control or regulate traffic, which order or direction related to the control of traffic.