Skip to content
Browse files

include certifi

  • Loading branch information...
1 parent 1253c78 commit c3ad7af06c5fdd603d4ac114cfa114a12a386d10 @kennethreitz committed Jun 28, 2012
Showing with 3,430 additions and 3 deletions.
  1. +1 −1 MANIFEST.in
  2. +3 −0 Makefile
  3. +59 −0 NOTICE
  4. +3,338 −0 requests/cacert.pem
  5. +27 −0 requests/certs.py
  6. +2 −2 requests/utils.py
View
2 MANIFEST.in
@@ -1 +1 @@
-include README.rst LICENSE NOTICE HISTORY.rst tests/*.py
+include README.rst LICENSE NOTICE HISTORY.rst tests/*. requests/cacert.pem
View
3 Makefile
@@ -65,4 +65,7 @@ deps:
mv urllib3/urllib3 requests/packages/
rm -fr urllib3
+certs:
+ cd requests && curl -O http://curl.haxx.se/ca/cacert.pem
+
docs: site
View
59 NOTICE
@@ -23,3 +23,62 @@ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
+
+
+Chardet License
+===============
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA
+
+
+
+Chardet2 License
+================
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA
+
+
+
+Bundle of CA Root Certificates
+==============================
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301
View
3,338 requests/cacert.pem
3,338 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
27 requests/certs.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ceritfi.py
+~~~~~~~~~~
+
+This module returns the installation location of cacert.pem.
+"""
+
+import os
+try:
+ import certifi
+except ImportError:
+ certifi = None
+
+
+def where():
+
+ if certifi:
+ return certifi.where()
+ else:
+ f = os.path.split(__file__)[0]
+ return os.path.join(f, 'cacert.pem')
+
+if __name__ == '__main__':
+ print(where())
View
4 requests/utils.py
@@ -25,8 +25,8 @@
CERTIFI_BUNDLE_PATH = None
try:
# see if requests's own CA certificate bundle is installed
- import certifi
- CERTIFI_BUNDLE_PATH = certifi.where()
+ from . import certs
+ CERTIFI_BUNDLE_PATH = certs.where()
except ImportError:
pass

0 comments on commit c3ad7af

Please sign in to comment.
Something went wrong with that request. Please try again.