It's in 12031, IIRC. It's a total BS law that violates 4th Amendment.
Found it: 12031(e). Only applies if they have reasonable cause to believe that you have a firearm. Basically, they have to see a gun, or a case that obviously contains one.
In order to determine whether or not a firearm is loaded for
the purpose of enforcing this section, peace officers are authorized
to examine any firearm carried by anyone on his or her person or in
a vehicle while in any public place or on any public street in an
incorporated city or prohibited area of an unincorporated territory.
Refusal to allow a peace officer to inspect a firearm pursuant to this
section constitutes probable cause for arrest for violation of this