equal
deleted
inserted
replaced
|
1 This patch file makes two changes: |
|
2 |
|
3 1/ Corrects the definition of is_solaris in compat.py. |
|
4 2/ Adjusts the where() routine in certs.py to return the location |
|
5 of the standard certs bundle on Solaris. |
|
6 |
|
7 These changes have been sent upstream. |
|
8 |
|
9 --- requests-1.2.3/requests/compat.py.orig 2013-07-31 07:31:19.545770096 -0700 |
|
10 +++ requests-1.2.3/requests/compat.py 2013-07-31 07:31:53.534460102 -0700 |
|
11 @@ -71,7 +71,7 @@ |
|
12 is_linux = ('linux' in str(sys.platform).lower()) |
|
13 is_osx = ('darwin' in str(sys.platform).lower()) |
|
14 is_hpux = ('hpux' in str(sys.platform).lower()) # Complete guess. |
|
15 -is_solaris = ('solar==' in str(sys.platform).lower()) # Complete guess. |
|
16 +is_solaris = ('sunos' in str(sys.platform).lower()) |
|
17 |
|
18 try: |
|
19 import simplejson as json |
|
20 --- requests-1.2.3/requests/certs.py.orig 2013-07-31 07:34:29.859095710 -0700 |
|
21 +++ requests-1.2.3/requests/certs.py 2013-07-31 09:31:36.868103751 -0700 |
|
22 @@ -13,12 +13,15 @@ |
|
23 """ |
|
24 |
|
25 import os.path |
|
26 - |
|
27 +import compat |
|
28 |
|
29 def where(): |
|
30 """Return the preferred certificate bundle.""" |
|
31 # vendored bundle inside Requests |
|
32 - return os.path.join(os.path.dirname(__file__), 'cacert.pem') |
|
33 + if compat.is_solaris: |
|
34 + return "/etc/certs/ca-certificates.crt" |
|
35 + else: |
|
36 + return os.path.join(os.path.dirname(__file__), 'cacert.pem') |
|
37 |
|
38 if __name__ == '__main__': |
|
39 print(where()) |