Skip to content

Commit

Permalink
Documentation for the PyOpenSSL contrib module.
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkeby committed Mar 20, 2013
1 parent a105119 commit f41dccb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
10 changes: 10 additions & 0 deletions docs/contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Contrib Modules
===============

These modules implement various extra features, that may not be ready for
prime time.

SNI-support for Python 2
------------------------

.. automodule:: urllib3.contrib.pyopenssl
10 changes: 10 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ urllib3 Documentation
managers
helpers
collections
contrib


Highlights
Expand Down Expand Up @@ -144,6 +145,15 @@ but can also be used independently.

helpers

Contrib Modules
---------------

These modules implement various extra features, that may not be ready for
prime time.

.. toctree::

contrib

Contributing
============
Expand Down
15 changes: 9 additions & 6 deletions urllib3/contrib/pyopenssl.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
'''SSL with SNI-support for Python 2.
This is needs the following packages installed:
This needs the following packages installed:
ndg-httpsclient (tested with 0.3.2)
pyOpenSSL (tested with 0.13)
pyasn1 (tested with 0.1.6)
* pyOpenSSL (tested with 0.13)
* ndg-httpsclient (tested with 0.3.2)
* pyasn1 (tested with 0.1.6)
To activate it call :func:`inject_into_urllib3`. This can be done in a
sitecustomize module.
To activate it call :func:`urllib3.contrib.pyopenssl.inject_into_urllib3`.
This can be done in a ``sitecustomize`` module, or at any other time before
your application begins using ``urllib3``.
'''

from ndg.httpsclient.ssl_peer_verification import (ServerSSLCertVerification,
Expand All @@ -21,6 +22,8 @@
from .. import connectionpool
from .. import util

__all__ = ['inject_into_urllib3', 'extract_from_urllib3']

# SNI only *really* works if we can read the subjectAltName of certificates.
HAS_SNI = SUBJ_ALT_NAME_SUPPORT

Expand Down

0 comments on commit f41dccb

Please sign in to comment.