In CA it is illegal to carry a concealed loaded firearm in your car. The firearm has to be unloaded, in a locked box, not accessible to the occupants, with no ammunition attached in any way. Hypothetically, a LEO cannot force you to open a locked container if he has no probable cause. A warrant cannot be issued unless there is probable cause (which is an affidavit).However regarding your question on searching the vehicle. According to Ca law, Officers may search any part of a motor vehicle as long as what they are searching for might reasonably be located in that part of the vehicle. In the search of a vehicle to be legal under probable cause (PC):
1) vehicle must have been lawfully stopped, or otherwise be lawfully accessible,and
2) LEO's must have enough facts, knowledge, training, or experience to provide probable cause that the item they are seeking will be found inside the vehicle they want to search.
LEO's with PC may search the passenger compartment of the vehicle and any container therein, the glove compartment, under hood, trunk, etc. For instance, if a LEO pulled you over and smelled marijuana, or thought you were DUI he can search the vehicle and any container therein including the trunk.
LEO's can also do a PROTECTIVE SEARCH of a vehicle as well where the officer believes, based on specific facts, that there may be a weapon, or item that could be used as a weapon, inside the vehicle. This is a search for weapons only. This does not include the trunk of a vehicle though.
Under consent, we all basically know what that will get you. However, if the consenting person expressly restricts certain areas of the vehicle or items within the vehicle, the officers must honor those restrictions.
When an officer makes a custodial arrest of a person inside the vehicle, LEO's may search:
1)passenger compartment, and
2)everything and anything in it.
The trunk does not apply in this case. However, if the car is being impounded then an inventory will be performed and any contraband will be seized.
Reminder this is CA law. There is another thing called the Exclusionary Rule many of you might not know about. The Exclusionary Rule is not in the Constitution but rather created by the US Supreme Court to encourage proper law enforcement conduct regarding searches. It basically says, if a court finds that a search is not reasonable and that a person's Fourth Ammendment rights have been violated by the gov't, all items seized during the search could be ruled inadmissible or excluded as evidence at trial.
Regarding Lavan's comment on pleading the 5th for self incrimination. You cannot do that because the 5th only applies if you are in a criminal trial. If you fail to answer any LEO's questions, in Ca, he can arrest you for PC 148 which is resisting, obstructing, or delaying a police officer which is a misdemeanor.