mirror of
https://github.com/munki/munki.git
synced 2026-02-28 20:09:23 -06:00
Inject NSAppTransportSecurity key and value into [NSBundle mainBundle]'s infoDictionary in order to make App Transport Security happy on 10.11
This commit is contained in:
@@ -31,6 +31,7 @@ from objc import super
|
||||
# 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 @@ from Foundation import NSPropertyListXMLFormat_v1_0
|
||||
# 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',
|
||||
|
||||
Reference in New Issue
Block a user