It is my understanding that pepper spray and bear spray are similar but different enough that only bear spray is proven effective, both by volume (bear spray is a much larger canister) and by delivery (bear spray is designed to hold a stream to 30 ft, while pepper spray is a close-quarter deterrent.)
According to this Yellowstone page, https://www.nps.gov/yell/learn/nature/bearspray.htm
Where to Buy
Bear spray is sold at gift shops, outdoor stores, service stations, and bookstores inside the park, as well as in local communities. Always select an EPA-approved product that is specifically designed to stop bears. Personal defense, jogger defense, law enforcement or military defense sprays may not contain the correct ingredients, or have the proper delivery system, to stop a charging bear.