Regardless if whether it’s illegal, assaulting a law enforcement officer would have been a severe temptation in this case.
Years ago I was working the drawer in the hardware store and a guy came in wearing Levis and a cowboy shirt. Right in front of the counter he started to turn toward me, raising his shirt tail. I saw the bottom end of a holster and I drew on him. His eyes got big as saucers and another employee hollered "don't shoot, he's a deputy". He had his badge on his belt by the holster but I sure as Hell couldn't see it right away. He actually apologized and admitted he did something stupid. He asked me how I got the old S&W out from under my shirt so fast and I told him "lots of practice.
We ended up on good terms. I know I'd have gone to jail in a lot of places. He is lucky I didn't panic and shoot, I know people who would have, some of them cops.