What were laws like regarding cannons during the Age of Sail, especially for non-military ships? Could a merchant captain just sail into port and buy a couple? Or would he have to apply for permits (something like how gun licenses work today)? Could a British captain buy cannons from say, a French port?
I understand its a broad period of time (1571–1862), so I guess anything within that time period is fine.
Follow up question: What about weapons on ships in general? Were there laws concerning what kind of weaponry a merchant captain carry on board?