i would call the ATF beareau in maine 207-780-3324 and ask directly.
Maines law states you must be 21 to purchase a handgun through FFL *federally licensed dealer* and 18 to purchase a firearm through a private sale with ID.
Maines law also states you can carry a handgun and be accepted for a CCW at the age of 18.
however federal law states that transfering a pistol to anyone under legal age is a felony. meaning if you OC and it turns out to be illegal, not only will you be arrested and fined, so will your parents.
seeing as your 17 it is a very important question in your case that you NEED to find the legal deffinition before you actually attempt it.
either call a good lawyer and ask or contact the ATF :-) but dont try it untill you do buddy :-) good luck