Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit 8c1e259

Browse files
authored
Merge pull request #31 from brendancol/brendancol/add-osx-crt-filepath
added osx filepath for crt filepath
2 parents 48d6ce2 + 4afb8ea commit 8c1e259

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

upwork/ca_certs_locater.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@
22

33
LINUX_PATH = '/etc/ssl/certs/ca-certificates.crt'
44

5+
# openssl installed using `brew install openssl`
6+
OSX_PATH = '/usr/local/etc/openssl/cert.pem'
7+
58

69
def get():
710
"""Return a path to a certificate authority file.
811
"""
912
# FIXME(dhellmann): Assume Linux for now, add more OSes and
1013
# platforms later.
14+
1115
if os.path.exists(LINUX_PATH):
1216
return LINUX_PATH
17+
18+
if os.path.exists(OSX_PATH):
19+
return OSX_PATH
20+
1321
# Fall back to the httplib2 default behavior by raising an
1422
# ImportError if we have not found the file.
1523
raise ImportError()

0 commit comments

Comments
 (0)