From 60b51222f5aab24e8aab1b9f763c2d63eb29bc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 10 Jul 2014 11:29:31 -0300 Subject: Look for cacert.pem in the Resources dir in OSX --- src/leap/common/ca_bundle.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/leap/common/ca_bundle.py b/src/leap/common/ca_bundle.py index 1e00f25..d8c72a6 100644 --- a/src/leap/common/ca_bundle.py +++ b/src/leap/common/ca_bundle.py @@ -21,8 +21,12 @@ If you are packaging Requests, e.g., for a Linux distribution or a managed environment, you can change the definition of where() to return a separately packaged CA bundle. """ +import platform import os.path +_system = platform.system() + +IS_MAC = _system == "Darwin" def where(): """ @@ -30,6 +34,10 @@ def where(): :rtype: str """ # vendored bundle inside Requests, plus some additions of ours + if IS_MAC: + return os.path.join("/Applications", "Bitmask.app", + "Contents", "Resources", + "cacert.pem") return os.path.join(os.path.dirname(__file__), 'cacert.pem') if __name__ == '__main__': -- cgit v1.2.3