PKG-INFO 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. Metadata-Version: 1.1
  2. Name: backports.ssl-match-hostname
  3. Version: 3.4.0.2
  4. Summary: The ssl.match_hostname() function from Python 3.4
  5. Home-page: http://bitbucket.org/brandon/backports.ssl_match_hostname
  6. Author: Brandon Craig Rhodes
  7. Author-email: brandon@rhodesmill.org
  8. License: UNKNOWN
  9. Description:
  10. The Secure Sockets layer is only actually *secure*
  11. if you check the hostname in the certificate returned
  12. by the server to which you are connecting,
  13. and verify that it matches to hostname
  14. that you are trying to reach.
  15. But the matching logic, defined in `RFC2818`_,
  16. can be a bit tricky to implement on your own.
  17. So the ``ssl`` package in the Standard Library of Python 3.2
  18. and greater now includes a ``match_hostname()`` function
  19. for performing this check instead of requiring every application
  20. to implement the check separately.
  21. This backport brings ``match_hostname()`` to users
  22. of earlier versions of Python.
  23. Simply make this distribution a dependency of your package,
  24. and then use it like this::
  25. from backports.ssl_match_hostname import match_hostname, CertificateError
  26. ...
  27. sslsock = ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_SSLv3,
  28. cert_reqs=ssl.CERT_REQUIRED, ca_certs=...)
  29. try:
  30. match_hostname(sslsock.getpeercert(), hostname)
  31. except CertificateError, ce:
  32. ...
  33. Note that the ``ssl`` module is only included in the Standard Library
  34. for Python 2.6 and later;
  35. users of Python 2.5 or earlier versions
  36. will also need to install the ``ssl`` distribution
  37. from the Python Package Index to use code like that shown above.
  38. Brandon Craig Rhodes is merely the packager of this distribution;
  39. the actual code inside comes verbatim from Python 3.4.
  40. History
  41. -------
  42. * This function was introduced in python-3.2
  43. * It was updated for python-3.4a1 for a CVE
  44. (backports-ssl_match_hostname-3.4.0.1)
  45. * It was updated from RFC2818 to RFC 6125 compliance in order to fix another
  46. security flaw for python-3.3.3 and python-3.4a5
  47. (backports-ssl_match_hostname-3.4.0.2)
  48. .. _RFC2818: http://tools.ietf.org/html/rfc2818.html
  49. Platform: UNKNOWN
  50. Classifier: Development Status :: 5 - Production/Stable
  51. Classifier: License :: OSI Approved :: Python Software Foundation License
  52. Classifier: Programming Language :: Python :: 2.4
  53. Classifier: Programming Language :: Python :: 2.5
  54. Classifier: Programming Language :: Python :: 2.6
  55. Classifier: Programming Language :: Python :: 2.7
  56. Classifier: Programming Language :: Python :: 3
  57. Classifier: Programming Language :: Python :: 3.0
  58. Classifier: Programming Language :: Python :: 3.1
  59. Classifier: Topic :: Security :: Cryptography