File: certs-path.patch

package info (click to toggle)
python-tornado 2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,536 kB
  • sloc: python: 12,755; ansic: 64; xml: 26; sql: 25; makefile: 17
file content (17 lines) | stat: -rw-r--r-- 592 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Looks for ca-certificates.crt at the good Debian location before trying local path
Author: Carl Chenet <chaica@ohmytux.com>

--- a/tornado/simple_httpclient.py
+++ b/tornado/simple_httpclient.py
@@ -32,7 +32,10 @@
 except ImportError:
     ssl = None
 
-_DEFAULT_CA_CERTS = os.path.dirname(__file__) + '/ca-certificates.crt'
+if os.path.exists('/etc/ssl/certs/ca-certificates.crt'):
+    _DEFAULT_CA_CERTS = '/etc/ssl/certs/ca-certificates.crt'
+else:
+    _DEFAULT_CA_CERTS = os.path.dirname(__file__) + '/ca-certificates.crt'
 
 
 class SimpleAsyncHTTPClient(AsyncHTTPClient):