[Python-modules-commits] [python-service-identity] 01/15: Import python-service-identity_16.0.0.orig.tar.gz.

Tristan Seligmann mithrandi at moszumanska.debian.org
Sun Feb 21 21:34:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

mithrandi pushed a commit to branch master
in repository python-service-identity.

commit cc7e801a5bfb7e276585349cc878259d4cb71c56
Author: Tristan Seligmann <mithrandi at mithrandi.net>
Date:   Sun Feb 21 22:44:04 2016 +0200

    Import python-service-identity_16.0.0.orig.tar.gz.
---
 .coveragerc                                        |  12 +
 .travis.yml                                        |  85 +++
 AUTHORS.rst                                        |   8 +
 CHANGELOG.rst                                      | 101 ++++
 CODE_OF_CONDUCT.rst                                |  55 ++
 CONTRIBUTING.rst                                   |  43 ++
 LICENSE                                            |  19 +
 MANIFEST.in                                        |   5 +
 PKG-INFO                                           |  99 ++++
 README.rst                                         |  29 +
 docs-requirements.txt                              |   2 +
 docs/Makefile                                      | 177 ++++++
 docs/api.rst                                       |  56 ++
 docs/backward-compatibility.rst                    |  11 +
 docs/changelog.rst                                 |   1 +
 docs/conf.py                                       | 308 ++++++++++
 docs/contributing.rst                              |   5 +
 docs/implemented-standards.rst                     |  23 +
 docs/index.rst                                     |  36 ++
 docs/installation.rst                              |  37 ++
 docs/license.rst                                   |   7 +
 setup.cfg                                          |  14 +
 setup.py                                           | 113 ++++
 src/service_identity.egg-info/PKG-INFO             |  99 ++++
 src/service_identity.egg-info/SOURCES.txt          |  38 ++
 src/service_identity.egg-info/dependency_links.txt |   1 +
 src/service_identity.egg-info/not-zip-safe         |   1 +
 src/service_identity.egg-info/requires.txt         |   7 +
 src/service_identity.egg-info/top_level.txt        |   1 +
 src/service_identity/__init__.py                   |  33 ++
 src/service_identity/_common.py                    | 423 ++++++++++++++
 src/service_identity/_compat.py                    |  15 +
 src/service_identity/exceptions.py                 |  59 ++
 src/service_identity/pyopenssl.py                  | 108 ++++
 tests/__init__.py                                  |   0
 tests/test_common.py                               | 627 +++++++++++++++++++++
 tests/test_pyopenssl.py                            |  54 ++
 tests/util.py                                      | 116 ++++
 tox.ini                                            |  60 ++
 39 files changed, 2888 insertions(+)

diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..ba6c0d6
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,12 @@
+[run]
+branch = True
+source = service_identity
+
+[paths]
+source =
+   src/service_identity
+   .tox/*/lib/python*/site-packages/service_identity
+   .tox/pypy*/site-packages/service_identity
+
+[report]
+show_missing = True
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..3555766
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,85 @@
+sudo: false
+cache:
+  directories:
+    - $HOME/.cache/pip
+
+language: python
+
+
+matrix:
+  include:
+    - python: "2.7"
+      env: TOXENV=py27-pyopenssl015-idna
+    - python: "2.7"
+      env: TOXENV=py27-pyopenssl015-noidna
+    - python: "2.7"
+      env: TOXENV=py27-pyopenssl014-idna
+    - python: "2.7"
+      env: TOXENV=py27-pyopenssl014-noidna
+    - python: "3.4"
+      env: TOXENV=py34-pyopenssl015-idna
+    - python: "3.4"
+      env: TOXENV=py34-pyopenssl015-noidna
+    - python: "3.4"
+      env: TOXENV=py34-pyopenssl014-idna
+    - python: "3.4"
+      env: TOXENV=py34-pyopenssl014-noidna
+    - python: "3.5"
+      env: TOXENV=py35-pyopenssl015-idna
+    - python: "3.5"
+      env: TOXENV=py35-pyopenssl015-noidna
+    - python: "3.5"
+      env: TOXENV=py35-pyopenssl014-idna
+    - python: "3.5"
+      env: TOXENV=py35-pyopenssl014-noidna
+    - python: "pypy"
+      env: TOXENV=pypy-pyopenssl015-idna
+    - python: "pypy"
+      env: TOXENV=pypy-pyopenssl015-noidna
+    - python: "pypy"
+      env: TOXENV=pypy-pyopenssl014-idna
+    - python: "pypy"
+      env: TOXENV=pypy-pyopenssl014-noidna
+
+    # Meta
+    - python: "3.5"
+      env: TOXENV=flake8
+    - python: "3.5"
+      env: TOXENV=manifest
+    - python: "3.5"
+      env: TOXENV=docs
+    - python: "3.5"
+      env: TOXENV=readme
+
+
+install:
+  - |
+    if [[ "${TOXENV}" = pypy* ]]; then
+        git clone --depth 1 https://github.com/yyuu/pyenv.git ~/.pyenv
+        PYENV_ROOT="$HOME/.pyenv"
+        PATH="$PYENV_ROOT/bin:$PATH"
+        eval "$(pyenv init -)"
+        pyenv install pypy-4.0.1
+        pyenv global pypy-4.0.1
+    fi
+  - pip install tox
+
+
+script:
+  - |
+    # activate the pypy env we installed via our custom pyenv in the install stage
+    if [[ "${TOXENV}" == "pypy" ]]; then
+        PYENV_ROOT="$HOME/.pyenv"
+        PATH="$PYENV_ROOT/bin:$PATH"
+        eval "$(pyenv init -)"
+    fi
+  - tox
+
+
+before_install:
+  - pip install codecov
+
+
+after_success:
+  - tox -e coverage-report
+  - codecov
diff --git a/AUTHORS.rst b/AUTHORS.rst
new file mode 100644
index 0000000..c8447d1
--- /dev/null
+++ b/AUTHORS.rst
@@ -0,0 +1,8 @@
+Authors
+=======
+
+``service_identity`` is written and maintained by `Hynek Schlawack <https://hynek.me/>`_.
+
+The development is kindly supported by `Variomedia AG <https://www.variomedia.de/>`_.
+
+Other contributors can be found in `GitHub's overview <https://github.com/pyca/service_identity/graphs/contributors>`_.
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 0000000..8bb91a1
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,101 @@
+.. :changelog:
+
+History
+=======
+
+Versions are year-based with a strict backwards-compatibility policy.
+The third digit is only for regressions.
+
+
+16.0.0 (2016-02-18)
+-------------------
+
+Backward-incompatible changes:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Python 3.3 and 2.6 aren't supported anymore.
+  They may work by chance but any effort to keep them working has ceased.
+
+  The last Python 2.6 release was on October 29, 2013 and isn't supported by the CPython core team anymore.
+  Major Python packages like Django and Twisted dropped Python 2.6 a while ago already.
+
+  Python 3.3 never had a significant user base and wasn't part of any distribution's LTS release.
+- pyOpenSSL versions older than 0.14 are not tested anymore.
+  They don't even build with recent OpenSSL versions.
+
+Changes:
+^^^^^^^^
+
+- Officially support Python 3.5.
+- ``service_identity.SubjectAltNameWarning`` is now raised if the server certicate lacks a proper ``SubjectAltName``.
+  [`#9 <https://github.com/pyca/service_identity/issues/9>`_]
+- Add a ``__str__`` method to ``VerificationError``.
+- Port from ``characteristic`` to its spiritual successor `attrs <https://attrs.readthedocs.org/>`_.
+
+
+----
+
+
+14.0.0 (2014-08-22)
+-------------------
+
+Changes:
+^^^^^^^^
+
+- Switch to year-based version numbers.
+- Port to ``characteristic`` 14.0 (get rid of deprecation warnings).
+- Package docs with sdist.
+
+
+----
+
+
+1.0.0 (2014-06-15)
+------------------
+
+Backward-incompatible changes:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Drop support for Python 3.2.
+  There is no justification to add complexity and unnecessary function calls for a Python version that `nobody uses <https://alexgaynor.net/2014/jan/03/pypi-download-statistics/>`_.
+
+Changes:
+^^^^^^^^
+
+- Move into the `Python Cryptography Authority’s GitHub account <https://github.com/pyca/>`_.
+- Move exceptions into ``service_identity.exceptions`` so tracebacks don’t contain private module names.
+- Promoting to stable since Twisted 14.0 is optionally depending on ``service_identity`` now.
+- Use `characteristic <https://characteristic.readthedocs.org/>`_ instead of a home-grown solution.
+- ``idna`` 0.6 did some backward-incompatible fixes that broke Python 3 support.
+  This has been fixed now therefore ``service_identity`` only works with ``idna`` 0.6 and later.
+  Unfortunately since ``idna`` doesn’t offer version introspection, ``service_identity`` can’t warn about it.
+
+
+----
+
+
+0.2.0 (2014-04-06)
+------------------
+
+Backward-incompatible changes:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Refactor into a multi-module package.
+  Most notably, ``verify_hostname`` and ``extract_ids`` live in the ``service_identity.pyopenssl`` module now.
+- ``verify_hostname`` now takes an ``OpenSSL.SSL.Connection`` for the first argument.
+
+Changes:
+^^^^^^^^
+
+- Less false positives in IP address detection.
+- Officially support Python 3.4 too.
+- More strict checks for URI_IDs.
+
+
+----
+
+
+0.1.0 (2014-03-03)
+------------------
+
+Initial release.
diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst
new file mode 100644
index 0000000..fa8b5bb
--- /dev/null
+++ b/CODE_OF_CONDUCT.rst
@@ -0,0 +1,55 @@
+Contributor Covenant Code of Conduct
+====================================
+
+Our Pledge
+----------
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+Our Standards
+-------------
+
+Examples of behavior that contributes to creating a positive environment include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
+
+Our Responsibilities
+--------------------
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+Scope
+-----
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
+Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
+Representation of a project may be further defined and clarified by project maintainers.
+
+Enforcement
+-----------
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hs at ox.cx.
+all complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
+The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
+
+Attribution
+-----------
+
+This Code of Conduct is adapted from the `Contributor Covenant <http://contributor-covenant.org>`_, version 1.4, available at http://contributor-covenant.org/version/1/4.
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
new file mode 100644
index 0000000..cb5fc77
--- /dev/null
+++ b/CONTRIBUTING.rst
@@ -0,0 +1,43 @@
+How To Contribute
+=================
+
+Every open source project lives from the generous help by contributors that sacrifice their time and ``service_identity`` is no different.
+
+Here are a few guidelines to get you started:
+
+- Try to limit each pull request to one change only.
+- To run the test suite, all you need is a recent tox_.
+  It will ensure the test suite runs with all dependencies against all Python versions just as it will on `Travis CI`_.
+  If you lack some Python version, you can can always limit the environments like ``tox -e py27,py35`` (in that case you may want to look into pyenv_ that makes it very easy to install many different Python versions in parallel).
+- Make sure your changes pass our CI_.
+  You won't get any feedback until it's green unless you ask for it.
+- If your change is noteworthy, add an entry to the changelog_.
+- No contribution is too small; please submit as many fixes for typos and grammar bloopers as you can!
+- Don’t break `backward compatibility`_.
+- *Always* add tests and docs for your code.
+  This is a hard rule; patches with missing tests or documentation won’t be merged.
+- Write `good test docstrings`_.
+- Obey `PEP 8`_ and `PEP 257`_.
+- If you address review feedback, make sure to bump the pull request.
+  Maintainers don’t receive notifications if you push new commits.
+
+Please note that this project is released with a Contributor `Code of Conduct`_.
+By participating in this project you agree to abide by its terms.
+Please report any harm to `Hynek Schlawack <me>`_ in any way you find appropriate.
+We can usually be found in the ``#cryptography-dev`` channel on freenode_.
+
+Thank you for considering to contribute to ``service_identity``!
+
+
+.. _me: https://hynek.me/about/
+.. _`PEP 8`: https://www.python.org/dev/peps/pep-0008/
+.. _`PEP 257`: https://www.python.org/dev/peps/pep-0257/
+.. _`good test docstrings`: https://jml.io/pages/test-docstrings.html
+.. _`Code of Conduct`: https://github.com/pyca/service_identity/blob/master/CODE_OF_CONDUCT.rst
+.. _changelog: https://github.com/pyca/service_identity/blob/master/CHANGELOG.rst
+.. _`backward compatibility`: https://service-identity.readthedocs.org/en/latest/backward-compatibility.html
+.. _`tox`: https://testrun.org/tox/
+.. _`Travis CI`: https://travis-ci.org/
+.. _pyenv: https://github.com/yyuu/pyenv
+.. _CI: https://travis-ci.org/pyca/service_identity
+.. _freenode: http://webchat.freenode.net
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..64c8a6f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Hynek Schlawack
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 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.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..1a070e7
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,5 @@
+include LICENSE .coveragerc .travis.yml tox.ini
+include docs/Makefile docs/conf.py
+include *.rst *.txt
+recursive-include tests *.py
+recursive-include docs *.rst
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..0e8d846
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,99 @@
+Metadata-Version: 1.1
+Name: service_identity
+Version: 16.0.0
+Summary: Service identity verification for pyOpenSSL.
+Home-page: https://service-identity.readthedocs.org/
+Author: Hynek Schlawack
+Author-email: hs at ox.cx
+License: MIT
+Description: ===========================================
+        Service Identity Verification for pyOpenSSL
+        ===========================================
+        
+        .. image:: https://travis-ci.org/pyca/service_identity.svg?branch=master
+          :target: https://travis-ci.org/pyca/service_identity
+        
+        .. image:: https://codecov.io/github/pyca/service_identity/coverage.svg?branch=master
+          :target: https://codecov.io/github/pyca/service_identity
+        
+        .. image:: https://www.irccloud.com/invite-svg?channel=%23cryptography-dev&hostname=irc.freenode.net&port=6697&ssl=1
+            :target: https://www.irccloud.com/invite?channel=%23cryptography-dev&hostname=irc.freenode.net&port=6697&ssl=1
+        
+        .. begin
+        
+        **TL;DR**: Use this package if you use pyOpenSSL_ and don’t want to be MITM_\ ed.
+        
+        ``service_identity`` aspires to give you all the tools you need for verifying whether a certificate is valid for the intended purposes.
+        
+        In the simplest case, this means *host name verification*.
+        However, ``service_identity`` implements `RFC 6125`_ fully and plans to add other relevant RFCs too.
+        
+        ``service_identity``\ ’s documentation lives at `Read the Docs <https://service-identity.readthedocs.org/>`_, the code on `GitHub <https://github.com/pyca/service_identity>`_.
+        
+        
+        .. _Twisted: https://twistedmatrix.com/
+        .. _pyOpenSSL: https://pypi.python.org/pypi/pyOpenSSL/
+        .. _MITM: https://en.wikipedia.org/wiki/Man-in-the-middle_attack
+        .. _`RFC 6125`: http://www.rfc-editor.org/info/rfc6125
+        
+        
+        Release Information
+        ===================
+        
+        16.0.0 (2016-02-18)
+        -------------------
+        
+        Backward-incompatible changes:
+        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+        
+        - Python 3.3 and 2.6 aren't supported anymore.
+          They may work by chance but any effort to keep them working has ceased.
+        
+          The last Python 2.6 release was on October 29, 2013 and isn't supported by the CPython core team anymore.
+          Major Python packages like Django and Twisted dropped Python 2.6 a while ago already.
+        
+          Python 3.3 never had a significant user base and wasn't part of any distribution's LTS release.
+        - pyOpenSSL versions older than 0.14 are not tested anymore.
+          They don't even build with recent OpenSSL versions.
+        
+        Changes:
+        ^^^^^^^^
+        
+        - Officially support Python 3.5.
+        - ``service_identity.SubjectAltNameWarning`` is now raised if the server certicate lacks a proper ``SubjectAltName``.
+          [`#9 <https://github.com/pyca/service_identity/issues/9>`_]
+        - Add a ``__str__`` method to ``VerificationError``.
+        - Port from ``characteristic`` to its spiritual successor `attrs <https://attrs.readthedocs.org/>`_.
+        
+        `Full changelog <https://service-identity.readthedocs.org/en/stable/changelog.html>`_.
+        
+        Authors
+        =======
+        
+        ``service_identity`` is written and maintained by `Hynek Schlawack <https://hynek.me/>`_.
+        
+        The development is kindly supported by `Variomedia AG <https://www.variomedia.de/>`_.
+        
+        Other contributors can be found in `GitHub's overview <https://github.com/pyca/service_identity/graphs/contributors>`_.
+        
+Keywords: cryptography,openssl,pyopenssl
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Natural Language :: English
+Classifier: Operating System :: MacOS :: MacOS X
+Classifier: Operating System :: Microsoft :: Windows
+Classifier: Operating System :: POSIX :: BSD
+Classifier: Operating System :: POSIX :: Linux
+Classifier: Operating System :: POSIX
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Programming Language :: Python
+Classifier: Topic :: Security :: Cryptography
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..7e6bdde
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,29 @@
+===========================================
+Service Identity Verification for pyOpenSSL
+===========================================
+
+.. image:: https://travis-ci.org/pyca/service_identity.svg?branch=master
+  :target: https://travis-ci.org/pyca/service_identity
+
+.. image:: https://codecov.io/github/pyca/service_identity/coverage.svg?branch=master
+  :target: https://codecov.io/github/pyca/service_identity
+
+.. image:: https://www.irccloud.com/invite-svg?channel=%23cryptography-dev&hostname=irc.freenode.net&port=6697&ssl=1
+    :target: https://www.irccloud.com/invite?channel=%23cryptography-dev&hostname=irc.freenode.net&port=6697&ssl=1
+
+.. begin
+
+**TL;DR**: Use this package if you use pyOpenSSL_ and don’t want to be MITM_\ ed.
+
+``service_identity`` aspires to give you all the tools you need for verifying whether a certificate is valid for the intended purposes.
+
+In the simplest case, this means *host name verification*.
+However, ``service_identity`` implements `RFC 6125`_ fully and plans to add other relevant RFCs too.
+
+``service_identity``\ ’s documentation lives at `Read the Docs <https://service-identity.readthedocs.org/>`_, the code on `GitHub <https://github.com/pyca/service_identity>`_.
+
+
+.. _Twisted: https://twistedmatrix.com/
+.. _pyOpenSSL: https://pypi.python.org/pypi/pyOpenSSL/
+.. _MITM: https://en.wikipedia.org/wiki/Man-in-the-middle_attack
+.. _`RFC 6125`: http://www.rfc-editor.org/info/rfc6125
diff --git a/docs-requirements.txt b/docs-requirements.txt
new file mode 100644
index 0000000..96c342c
--- /dev/null
+++ b/docs-requirements.txt
@@ -0,0 +1,2 @@
+-e .
+sphinx
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..524d37a
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,177 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  xml        to make Docutils-native XML files"
+	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/service_identity.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/service_identity.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/service_identity"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/service_identity"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through platex and dvipdfmx..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
+
+xml:
+	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+	@echo
+	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+pseudoxml:
+	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+	@echo
+	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
diff --git a/docs/api.rst b/docs/api.rst
new file mode 100644
index 0000000..f80ea7f
--- /dev/null
+++ b/docs/api.rst
@@ -0,0 +1,56 @@
+===
+API
+===
+
+.. note::
+
+   The APIs for RFC 6125 verification beyond DNS-IDs (i.e. hostnames) aren't public yet.
+   They are in place and used by the documented high-level APIs though.
+   Eventually they will become public.
+   If you'd like to play with them and provide feedback have a look at the ``verify_service_identity`` function in the `_common module <https://github.com/pyca/service_identity/blob/master/src/service_identity/_common.py>`_.
+
+
+.. currentmodule:: service_identity.pyopenssl
+
+
+.. autofunction:: verify_hostname(connection, hostname)
+
+   In practice, this may look like the following::
+
+      from __future__ import absolute_import, division, print_function
+
+      import socket
+
+      from OpenSSL import SSL
+      from service_identity import VerificationError
+      from service_identity.pyopenssl import verify_hostname
+
+
+      ctx = SSL.Context(SSL.SSLv23_METHOD)
+      ctx.set_verify(SSL.VERIFY_PEER, lambda conn, cert, errno, depth, ok: ok)
+      ctx.set_default_verify_paths()
+
+      hostname = u"twistedmatrix.com"
+      conn = SSL.Connection(ctx, socket.socket(socket.AF_INET, socket.SOCK_STREAM))
+      conn.connect((hostname, 443))
+
+      try:
+         conn.do_handshake()
+         verify_hostname(conn, hostname)
+         # Do your super-secure stuff here.
+      except SSL.Error as e:
+         print("TLS Handshake failed: {0!r}.".format(e.args[0]))
+      except VerificationError:
+         print("Presented certificate is not valid for {0}.".format(hostname))
+      finally:
+         conn.shutdown()
+         conn.close()
+
+
+.. currentmodule:: service_identity
+
+.. autoexception:: VerificationError
+
+.. autoexception:: CertificateError
+
+.. autoexception:: SubjectAltNameWarning
\ No newline at end of file
diff --git a/docs/backward-compatibility.rst b/docs/backward-compatibility.rst
new file mode 100644
index 0000000..1ff5ed6
--- /dev/null
+++ b/docs/backward-compatibility.rst
@@ -0,0 +1,11 @@
+Backward Compatibility
+======================
+
+``service_identity`` has a very strong backward compatibility policy.
+Generally speaking, you shouldn't ever be afraid of updating.
+
+If breaking changes are needed do be done, they are:
+
+#. …announced in the :doc:`changelog`.
+#. …the old behavior raises a :exc:`DeprecationWarning` for a year.
+#. …are done with another announcement in the :doc:`changelog`.
diff --git a/docs/changelog.rst b/docs/changelog.rst
new file mode 100644
index 0000000..4d7817a
--- /dev/null
+++ b/docs/changelog.rst
@@ -0,0 +1 @@
+.. include:: ../CHANGELOG.rst
\ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000..d9bf349
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,308 @@
+# -*- coding: utf-8 -*-
+#
+# service_identity documentation build configuration file, created by
+# sphinx-quickstart on Mon Jun  2 16:32:11 2014.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import codecs
+import datetime
+import os
+import re
+
+try:
+    import sphinx_rtd_theme
+except ImportError:
+    sphinx_rtd_theme = None
+
+
+def read(*parts):
+    """
+    Build an absolute path from *parts* and and return the contents of the
+    resulting file.  Assume UTF-8 encoding.
+    """
+    here = os.path.abspath(os.path.dirname(__file__))
+    with codecs.open(os.path.join(here, *parts), "rb", "utf-8") as f:
+        return f.read()
+
+
+def find_version(*file_paths):
+    """
+    Build a path from *file_paths* and search for a ``__version__``
+    string inside.
+    """
+    version_file = read(*file_paths)
+    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
+                              version_file, re.M)
+    if version_match:
+        return version_match.group(1)
+    raise RuntimeError("Unable to find version string.")
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+    'sphinx.ext.doctest',
+    'sphinx.ext.autodoc',
+    'sphinx.ext.intersphinx',
+    'sphinx.ext.todo',
+    'sphinx.ext.coverage',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'service_identity'
+year = datetime.date.today().year
+copyright = u'2014{0}, Hynek Schlawack'.format(
+    u'-{0}'.format(year) if year != 2014 else u""
+)
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+release = find_version("..", "src", "service_identity", "__init__.py")
+version = release.rsplit(u".", 1)[0]
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+
+if sphinx_rtd_theme:
+    html_theme = "sphinx_rtd_theme"
+    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+else:
+    html_theme = "default"
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
... 2169 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-service-identity.git



More information about the Python-modules-commits mailing list