After waking up to news of another mass shooting, many Americans are again asking questions about their nation's gun laws. 

A man killed at least 12 people at a bar in Thousands Oaks, California, late Wednesday. Sheriff Geoff Dean said the gunman, who was also killed, was armed with a Glock 21 – a .45-caliber handgun. 

"The weapon was designed in California to hold a magazine of 10 rounds and one in the chamber, but he had an extended magazine on it," Dean said.

Dean did not specify the size of the extended magazine, but most high-capacity magazines for the gun that are for sale online hold 26 rounds. "Drum" magazines that are compatible with the handgun can hold as many as 40 rounds

California has outlawed the sale of magazines larger than 10 rounds since 2000 but owners who owned larger ones before the law took effect were permitted to keep them.

In 2016, California voters approved a proposition in the wake of the San Bernardino shooting, which made it illegal to possess magazines capable of holding more than 10 rounds.

Gun control advocates argued the previous law was not effective because there was no way to determine when or where a high-capacity magazine was purchased. Those whose magazines previously had been "grandfathered" were required to alter them or get rid of them. 

Before that law could take effect, it was blocked by a federal judge after a lawsuit by the California Rifle & Pistol Association, the state National Rifle Association affiliate, argued the law was unconstitutional. The U.S. 9th Circuit Court of Appeals upheld the injunction pending the resolution of the lawsuit.

California has some of the more restrictive gun laws in the country and federal law is somewhat stricter when it comes to handguns. 

Anyone who buys or is given a handgun in California has to get a state-issued firearm safety certificate, which comes with a fee of up to $25 and must be renewed every five years.

In California, even "private party transfers" – such as those at gun shows – must involve a licensed firearms dealer, unless the person is giving or selling the gun to a family member. 

There is also a minimum 10-day waiting period and in addition to the federally-mandated background check, the California Department of Justice is required to check its own records and records from the Department of State Hospitals, according to the Giffords Law Center to Prevent Gun Violence

Gabby Giffords, a former Democratic member of the House of Representatives, was shot along with 18 others while meeting with constituents in 2011. The gunman in that attack used a Glock 19 pistol and carried two 33-round magazines, according to The Washington Post

Under federal law, a person has to be 21 to buy a handgun from a dealer and 18 to get a handgun from an individual. Rifles and shotguns can be sold to people 18 and over, and unlicensed individuals can give them to people of any age, according to the Giffords Law Center. 

Under the 1968 Gun Control Act, anytime someone buys two or more handguns within five days, it must be reported to the Bureau of Alcohol, Tobacco, Firearms and Explosives.

Because of concerns about guns being run into Mexico, multiple rifle sales must also be reported to the ATF in the four southern border states: Arizona, California, New Mexico and Texas. That policy expires in 2021. Outside of those states, multiple rifle or shotgun sales in other states do not have to be reported, regardless of the number.