Actually against the law for them to ask based merely on the presence of a firearm. But there are plenty of circumstances that they could legally ask for ID. Easy to “stretch”…Only required to have/ show ID when stopped while operating a vehicle. If a cop stops you otherwise, you have no duty to help him/ her in their investigation and your right to remain silent must be verbalized directly.