I'm of the opinion that the Bill of Rights ensures that we can remain secure in our serial numbers against unreasonable number checks. Speeding is hardly probable cause of gun theft.
ETA: Oops, not speeding. Insufficient taxes collected on his vehicle registration.
Amendment IV.
The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.
Did the OP contest or have issue with the officer checking his firearm? If so, you'd be correct. If not, a person who complies with a request is hardly having their rights trampled upon.