Permalink
Browse files

Inject NSAppTransportSecurity key and value into [NSBundle mainBundle…

…]'s infoDictionary in order to make App Transport Security happy on 10.11
  • Loading branch information...
gregneagle committed Jul 29, 2015
1 parent 441e649 commit 1dd8329d665d1d724ddc56ea703552effcd42db8
Showing with 9 additions and 0 deletions.
  1. +9 −0 code/client/munkilib/gurl.py
@@ -31,6 +31,7 @@
# PyLint cannot properly find names inside Cocoa libraries, so issues bogus
# No name 'Foo' in module 'Bar' warnings. Disable them.
# pylint: disable=E0611
+from Foundation import NSBundle
from Foundation import NSRunLoop, NSDate
from Foundation import NSObject, NSURL, NSURLConnection
from Foundation import NSMutableURLRequest
@@ -46,6 +47,14 @@
# Disable PyLint complaining about 'invalid' names
# pylint: disable=C0103
+
+# disturbing hack warning!
+# this works around an issue with App Transport Security on 10.11
+bundle = NSBundle.mainBundle()
+info = bundle.localizedInfoDictionary() or bundle.infoDictionary()
+info['NSAppTransportSecurity'] = {'NSAllowsArbitraryLoads': True}
+
+
ssl_error_codes = {
-9800: u'SSL protocol error',
-9801: u'Cipher Suite negotiation failure',

0 comments on commit 1dd8329

Please sign in to comment.