README.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Certifi: Python SSL Certificates
  2. ================================
  3. `Certifi`_ is a carefully curated collection of Root Certificates for
  4. validating the trustworthiness of SSL certificates while verifying the identity
  5. of TLS hosts. It has been extracted from the `Requests`_ project.
  6. Installation
  7. ------------
  8. ``certifi`` is available on PyPI. Simply install it with ``pip``::
  9. $ pip install certifi
  10. Usage
  11. -----
  12. To reference the installed certificate authority (CA) bundle, you can use the
  13. built-in function::
  14. >>> import certifi
  15. >>> certifi.where()
  16. '/usr/local/lib/python2.7/site-packages/certifi/cacert.pem'
  17. Enjoy!
  18. 1024-bit Root Certificates
  19. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  20. Browsers and certificate authorities have concluded that 1024-bit keys are
  21. unacceptably weak for certificates, particularly root certificates. For this
  22. reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its
  23. bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key)
  24. certificate from the same CA. Because Mozilla removed these certificates from
  25. its bundle, ``certifi`` removed them as well.
  26. In previous versions, ``certifi`` provided the ``certifi.old_where()`` function
  27. to intentionally re-add the 1024-bit roots back into your bundle. This was not
  28. recommended in production and therefore was removed. To assist in migrating old
  29. code, the function ``certifi.old_where()`` continues to exist as an alias of
  30. ``certifi.where()``. Please update your code to use ``certifi.where()``
  31. instead. ``certifi.old_where()`` will be removed in 2018.
  32. .. _`Certifi`: http://certifi.io/en/latest/
  33. .. _`Requests`: http://docs.python-requests.org/en/latest/