357 magnum or Glock 17L
Well, I'd start by saying I don't think there are a whole lot of aggressive black bears plus they are mostly nocturnal but I totally understand your worry as such I've packed a Glock 17L (call me crazy) for similar types of protection in the North woods.
My personal preference would be with the 357magnum at most but really favor the Glock17L. I had a 44mag (Ruger Super Redhawk) and I'll just admit it was a bit too much gun for my liking. It didn't win my favor although it did awe me a bit. Every time I shot it was like a bolt of lightening coming out of my hand. After like 50 rnds it starts to hurt your arm (no I'm not going to act macho about it). So I down-loaded to 44 special rounds cause those were a lot easier to shoot. I didn't care for them at all plus they were hard to find at local stores let alone one with a copper jacket. Yeah the 44mag will do it with more power than a 357 but really it's all in the shot placement. I'd try each first and see what you like shooting more. With a 357 mag it should be lighter and easier to carry and the follow up shot should be a bit better. Anyone can blast a 44mag a bunch of times but try hitting more than one target in a couple of seconds.
Also, practicality and consistency are virtue. I've carried a Glock 17L with expanding type rounds. Not cause I thought it was the best choice but because I know I can nail bulls-eyes real quick with it. Plus if worst case I can just unload most of the rounds in a couple seconds into anything close (i.e. a bear). The 17 Long slide is super accurate and just about the same price as a regular Glock 17. Every time I go to the range I get someone who wonders what type of gun I'm shooting cause they watch me group a pistol in a couple inches at like 25 yds with minimal practice (i.e. once every couple of months).
I think of it this way. Who's going to be more deadly/safe? The guy who shoots over a thousand rounds of 9mm and gets really good at shooting his gun fast and placing shots right where they wants it? or the person who shoots a couple hundred cause it's expensive and has heavy recoil as well as has a gun that is pushing almost 3 times the weight. Trust me, you'll get sick of carrying it, you can almost put the Glock in your pocket if you weren't afraid of snagging the trigger on a draw = more likely to have it on you when you need it. Also I think I read an article of someone who killed a Kodiak with a Glock17 while they were fishing but that could be a rumor it was a while ago. I believe they unloaded the gun though. If you get an adrenaline rush I think it's better to have many shots. If you get flustered wait till it's close and let them all rip. Some of the reasons the military uses a .223 instead of a .308, the reality is most people aren't super proficient with heavy recoil (despite the rhetoric), higher capacity, ease of carry, ease of use, expense, more shots faster = more success. Even better might be a Glock in .40 cal.
That and the double action on the Redhawk sucked as most revolvers do. The single action hammer cock back was great but..... that adds even more time to shooting it and if you miss the first shot, again, good luck lining up a second shot before the toothy critter gets to you! Then too, ever watch the TV with the guy who shoots the Polar Bear with a 300 win Mag and can't kill it, over penetration I'd suspect? I'll never forget that