com.googler.python 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -0
- package/python3 +6 -0
- package/python3.4.2/bin/2to3 +5 -0
- package/python3.4.2/bin/2to3-3.4 +5 -0
- package/python3.4.2/bin/android-debian-builder +10 -0
- package/python3.4.2/bin/easy_install-3.4 +11 -0
- package/python3.4.2/bin/idle3 +5 -0
- package/python3.4.2/bin/idle3.4 +5 -0
- package/python3.4.2/bin/pip3 +11 -0
- package/python3.4.2/bin/pip3.4 +11 -0
- package/python3.4.2/bin/pydoc3 +5 -0
- package/python3.4.2/bin/pydoc3.4 +5 -0
- package/python3.4.2/bin/python3-config +111 -0
- package/python3.4.2/bin/python3.4 +0 -0
- package/python3.4.2/bin/python3.4-config +111 -0
- package/python3.4.2/bin/python3.4m-config +111 -0
- package/python3.4.2/bin/pyvenv +11 -0
- package/python3.4.2/bin/pyvenv-3.4 +11 -0
- package/python3.4.2/include/python3.4m/Python-ast.h +569 -0
- package/python3.4.2/include/python3.4m/Python.h +133 -0
- package/python3.4.2/include/python3.4m/abstract.h +1267 -0
- package/python3.4.2/include/python3.4m/accu.h +37 -0
- package/python3.4.2/include/python3.4m/asdl.h +45 -0
- package/python3.4.2/include/python3.4m/ast.h +22 -0
- package/python3.4.2/include/python3.4m/bitset.h +32 -0
- package/python3.4.2/include/python3.4m/bltinmodule.h +14 -0
- package/python3.4.2/include/python3.4m/boolobject.h +34 -0
- package/python3.4.2/include/python3.4m/bytearrayobject.h +62 -0
- package/python3.4.2/include/python3.4m/bytes_methods.h +46 -0
- package/python3.4.2/include/python3.4m/bytesobject.h +128 -0
- package/python3.4.2/include/python3.4m/cellobject.h +29 -0
- package/python3.4.2/include/python3.4m/ceval.h +205 -0
- package/python3.4.2/include/python3.4m/classobject.h +58 -0
- package/python3.4.2/include/python3.4m/code.h +115 -0
- package/python3.4.2/include/python3.4m/codecs.h +233 -0
- package/python3.4.2/include/python3.4m/compile.h +72 -0
- package/python3.4.2/include/python3.4m/complexobject.h +77 -0
- package/python3.4.2/include/python3.4m/datetime.h +243 -0
- package/python3.4.2/include/python3.4m/descrobject.h +105 -0
- package/python3.4.2/include/python3.4m/dictobject.h +126 -0
- package/python3.4.2/include/python3.4m/dtoa.h +19 -0
- package/python3.4.2/include/python3.4m/dynamic_annotations.h +499 -0
- package/python3.4.2/include/python3.4m/enumobject.h +17 -0
- package/python3.4.2/include/python3.4m/errcode.h +38 -0
- package/python3.4.2/include/python3.4m/eval.h +27 -0
- package/python3.4.2/include/python3.4m/fileobject.h +58 -0
- package/python3.4.2/include/python3.4m/fileutils.h +79 -0
- package/python3.4.2/include/python3.4m/floatobject.h +128 -0
- package/python3.4.2/include/python3.4m/frameobject.h +95 -0
- package/python3.4.2/include/python3.4m/funcobject.h +89 -0
- package/python3.4.2/include/python3.4m/genobject.h +46 -0
- package/python3.4.2/include/python3.4m/graminit.h +84 -0
- package/python3.4.2/include/python3.4m/grammar.h +93 -0
- package/python3.4.2/include/python3.4m/import.h +130 -0
- package/python3.4.2/include/python3.4m/intrcheck.h +21 -0
- package/python3.4.2/include/python3.4m/iterobject.h +25 -0
- package/python3.4.2/include/python3.4m/listobject.h +80 -0
- package/python3.4.2/include/python3.4m/longintrepr.h +103 -0
- package/python3.4.2/include/python3.4m/longobject.h +204 -0
- package/python3.4.2/include/python3.4m/marshal.h +28 -0
- package/python3.4.2/include/python3.4m/memoryobject.h +74 -0
- package/python3.4.2/include/python3.4m/metagrammar.h +18 -0
- package/python3.4.2/include/python3.4m/methodobject.h +93 -0
- package/python3.4.2/include/python3.4m/modsupport.h +132 -0
- package/python3.4.2/include/python3.4m/moduleobject.h +63 -0
- package/python3.4.2/include/python3.4m/namespaceobject.h +17 -0
- package/python3.4.2/include/python3.4m/node.h +44 -0
- package/python3.4.2/include/python3.4m/object.h +1015 -0
- package/python3.4.2/include/python3.4m/objimpl.h +361 -0
- package/python3.4.2/include/python3.4m/opcode.h +159 -0
- package/python3.4.2/include/python3.4m/osdefs.h +50 -0
- package/python3.4.2/include/python3.4m/parsetok.h +108 -0
- package/python3.4.2/include/python3.4m/patchlevel.h +35 -0
- package/python3.4.2/include/python3.4m/pgen.h +18 -0
- package/python3.4.2/include/python3.4m/pgenheaders.h +42 -0
- package/python3.4.2/include/python3.4m/py_curses.h +177 -0
- package/python3.4.2/include/python3.4m/pyarena.h +64 -0
- package/python3.4.2/include/python3.4m/pyatomic.h +184 -0
- package/python3.4.2/include/python3.4m/pycapsule.h +59 -0
- package/python3.4.2/include/python3.4m/pyconfig.h +1503 -0
- package/python3.4.2/include/python3.4m/pyctype.h +33 -0
- package/python3.4.2/include/python3.4m/pydebug.h +34 -0
- package/python3.4.2/include/python3.4m/pyerrors.h +464 -0
- package/python3.4.2/include/python3.4m/pyexpat.h +53 -0
- package/python3.4.2/include/python3.4m/pyfpe.h +176 -0
- package/python3.4.2/include/python3.4m/pygetopt.h +21 -0
- package/python3.4.2/include/python3.4m/pyhash.h +149 -0
- package/python3.4.2/include/python3.4m/pymacconfig.h +102 -0
- package/python3.4.2/include/python3.4m/pymacro.h +78 -0
- package/python3.4.2/include/python3.4m/pymath.h +190 -0
- package/python3.4.2/include/python3.4m/pymem.h +183 -0
- package/python3.4.2/include/python3.4m/pyport.h +883 -0
- package/python3.4.2/include/python3.4m/pystate.h +271 -0
- package/python3.4.2/include/python3.4m/pystrcmp.h +23 -0
- package/python3.4.2/include/python3.4m/pystrtod.h +41 -0
- package/python3.4.2/include/python3.4m/pythonrun.h +304 -0
- package/python3.4.2/include/python3.4m/pythread.h +93 -0
- package/python3.4.2/include/python3.4m/pytime.h +105 -0
- package/python3.4.2/include/python3.4m/rangeobject.h +27 -0
- package/python3.4.2/include/python3.4m/setobject.h +113 -0
- package/python3.4.2/include/python3.4m/sliceobject.h +50 -0
- package/python3.4.2/include/python3.4m/structmember.h +76 -0
- package/python3.4.2/include/python3.4m/structseq.h +49 -0
- package/python3.4.2/include/python3.4m/symtable.h +122 -0
- package/python3.4.2/include/python3.4m/sysmodule.h +43 -0
- package/python3.4.2/include/python3.4m/token.h +87 -0
- package/python3.4.2/include/python3.4m/traceback.h +72 -0
- package/python3.4.2/include/python3.4m/tupleobject.h +73 -0
- package/python3.4.2/include/python3.4m/typeslots.h +76 -0
- package/python3.4.2/include/python3.4m/ucnhash.h +36 -0
- package/python3.4.2/include/python3.4m/unicodeobject.h +2271 -0
- package/python3.4.2/include/python3.4m/warnings.h +54 -0
- package/python3.4.2/include/python3.4m/weakrefobject.h +86 -0
- package/python3.4.2/lib/pkgconfig/python-3.4.pc +13 -0
- package/python3.4.2/lib/pkgconfig/python-3.4m.pc +13 -0
- package/python3.4.2/lib/pkgconfig/python3.pc +13 -0
- package/python3.4.2/lib/python3.4/LICENSE.txt +254 -0
- package/python3.4.2/lib/python3.4/__future__.py +134 -0
- package/python3.4.2/lib/python3.4/__phello__.foo.py +1 -0
- package/python3.4.2/lib/python3.4/__pycache__/_bootlocale.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_collections_abc.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_sitebuiltins.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_sysconfigdata.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/_weakrefset.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/abc.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/codecs.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/genericpath.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/io.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/os.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/posixpath.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/rlcompleter.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/site.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/stat.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/__pycache__/sysconfig.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/_bootlocale.py +34 -0
- package/python3.4.2/lib/python3.4/_collections_abc.py +753 -0
- package/python3.4.2/lib/python3.4/_compat_pickle.py +137 -0
- package/python3.4.2/lib/python3.4/_dummy_thread.py +155 -0
- package/python3.4.2/lib/python3.4/_markupbase.py +395 -0
- package/python3.4.2/lib/python3.4/_osx_support.py +502 -0
- package/python3.4.2/lib/python3.4/_pyio.py +2105 -0
- package/python3.4.2/lib/python3.4/_sitebuiltins.py +103 -0
- package/python3.4.2/lib/python3.4/_strptime.py +511 -0
- package/python3.4.2/lib/python3.4/_sysconfigdata.py +710 -0
- package/python3.4.2/lib/python3.4/_threading_local.py +246 -0
- package/python3.4.2/lib/python3.4/_weakrefset.py +196 -0
- package/python3.4.2/lib/python3.4/abc.py +248 -0
- package/python3.4.2/lib/python3.4/aifc.py +918 -0
- package/python3.4.2/lib/python3.4/antigravity.py +17 -0
- package/python3.4.2/lib/python3.4/argparse.py +2379 -0
- package/python3.4.2/lib/python3.4/ast.py +315 -0
- package/python3.4.2/lib/python3.4/asynchat.py +333 -0
- package/python3.4.2/lib/python3.4/asyncio/__init__.py +48 -0
- package/python3.4.2/lib/python3.4/asyncio/base_events.py +1055 -0
- package/python3.4.2/lib/python3.4/asyncio/base_subprocess.py +197 -0
- package/python3.4.2/lib/python3.4/asyncio/constants.py +7 -0
- package/python3.4.2/lib/python3.4/asyncio/coroutines.py +195 -0
- package/python3.4.2/lib/python3.4/asyncio/events.py +586 -0
- package/python3.4.2/lib/python3.4/asyncio/futures.py +411 -0
- package/python3.4.2/lib/python3.4/asyncio/locks.py +469 -0
- package/python3.4.2/lib/python3.4/asyncio/log.py +7 -0
- package/python3.4.2/lib/python3.4/asyncio/proactor_events.py +499 -0
- package/python3.4.2/lib/python3.4/asyncio/protocols.py +129 -0
- package/python3.4.2/lib/python3.4/asyncio/queues.py +288 -0
- package/python3.4.2/lib/python3.4/asyncio/selector_events.py +996 -0
- package/python3.4.2/lib/python3.4/asyncio/streams.py +485 -0
- package/python3.4.2/lib/python3.4/asyncio/subprocess.py +228 -0
- package/python3.4.2/lib/python3.4/asyncio/tasks.py +658 -0
- package/python3.4.2/lib/python3.4/asyncio/test_utils.py +425 -0
- package/python3.4.2/lib/python3.4/asyncio/transports.py +298 -0
- package/python3.4.2/lib/python3.4/asyncio/unix_events.py +922 -0
- package/python3.4.2/lib/python3.4/asyncio/windows_events.py +634 -0
- package/python3.4.2/lib/python3.4/asyncio/windows_utils.py +207 -0
- package/python3.4.2/lib/python3.4/asyncore.py +666 -0
- package/python3.4.2/lib/python3.4/base64.py +602 -0
- package/python3.4.2/lib/python3.4/bdb.py +673 -0
- package/python3.4.2/lib/python3.4/binhex.py +471 -0
- package/python3.4.2/lib/python3.4/bisect.py +92 -0
- package/python3.4.2/lib/python3.4/bz2.py +521 -0
- package/python3.4.2/lib/python3.4/cProfile.py +160 -0
- package/python3.4.2/lib/python3.4/calendar.py +703 -0
- package/python3.4.2/lib/python3.4/cgi.py +1061 -0
- package/python3.4.2/lib/python3.4/cgitb.py +320 -0
- package/python3.4.2/lib/python3.4/chunk.py +167 -0
- package/python3.4.2/lib/python3.4/cmd.py +401 -0
- package/python3.4.2/lib/python3.4/code.py +302 -0
- package/python3.4.2/lib/python3.4/codecs.py +1110 -0
- package/python3.4.2/lib/python3.4/codeop.py +168 -0
- package/python3.4.2/lib/python3.4/collections/__init__.py +1132 -0
- package/python3.4.2/lib/python3.4/collections/__main__.py +38 -0
- package/python3.4.2/lib/python3.4/collections/abc.py +2 -0
- package/python3.4.2/lib/python3.4/colorsys.py +164 -0
- package/python3.4.2/lib/python3.4/compileall.py +241 -0
- package/python3.4.2/lib/python3.4/concurrent/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/__init__.py +18 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/_base.py +575 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/process.py +427 -0
- package/python3.4.2/lib/python3.4/concurrent/futures/thread.py +132 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Makefile +1835 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Setup +466 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Setup.config +13 -0
- package/python3.4.2/lib/python3.4/config-3.4m/Setup.local +1 -0
- package/python3.4.2/lib/python3.4/config-3.4m/config.c +234 -0
- package/python3.4.2/lib/python3.4/config-3.4m/config.c.in +67 -0
- package/python3.4.2/lib/python3.4/config-3.4m/install-sh +294 -0
- package/python3.4.2/lib/python3.4/config-3.4m/makesetup +293 -0
- package/python3.4.2/lib/python3.4/config-3.4m/python-config.py +68 -0
- package/python3.4.2/lib/python3.4/configparser.py +1254 -0
- package/python3.4.2/lib/python3.4/contextlib.py +340 -0
- package/python3.4.2/lib/python3.4/copy.py +333 -0
- package/python3.4.2/lib/python3.4/copyreg.py +202 -0
- package/python3.4.2/lib/python3.4/crypt.py +62 -0
- package/python3.4.2/lib/python3.4/csv.py +449 -0
- package/python3.4.2/lib/python3.4/ctypes/__init__.py +541 -0
- package/python3.4.2/lib/python3.4/ctypes/_endian.py +59 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/README.ctypes +7 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/__init__.py +9 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/dyld.py +158 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/dylib.py +63 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/fetch_macholib +2 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/fetch_macholib.bat +1 -0
- package/python3.4.2/lib/python3.4/ctypes/macholib/framework.py +65 -0
- package/python3.4.2/lib/python3.4/ctypes/test/__init__.py +14 -0
- package/python3.4.2/lib/python3.4/ctypes/test/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_anon.py +60 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_array_in_pointer.py +64 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_arrays.py +181 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_as_parameter.py +226 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_bitfields.py +263 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_buffers.py +64 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_bytes.py +65 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_byteswap.py +295 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_callbacks.py +247 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_cast.py +86 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_cfuncs.py +212 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_checkretval.py +36 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_delattr.py +21 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_errno.py +79 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_find.py +81 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_frombuffer.py +81 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_funcptr.py +127 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_functions.py +402 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_incomplete.py +42 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_init.py +40 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_internals.py +100 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_keeprefs.py +153 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_libc.py +33 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_loading.py +119 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_macholib.py +63 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_memfunctions.py +79 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_numbers.py +290 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_objects.py +67 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_parameters.py +176 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_pep3118.py +206 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_pickling.py +83 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_pointers.py +192 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_prototypes.py +219 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_python_api.py +89 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_random_things.py +74 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_refcounts.py +101 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_repr.py +29 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_returnfuncptrs.py +67 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_simplesubclasses.py +55 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_sizes.py +34 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_slicing.py +167 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_stringptr.py +77 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_strings.py +225 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_struct_fields.py +50 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_structures.py +468 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_unaligned_structures.py +45 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_unicode.py +56 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_values.py +95 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_varsize_struct.py +50 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_win32.py +119 -0
- package/python3.4.2/lib/python3.4/ctypes/test/test_wintypes.py +41 -0
- package/python3.4.2/lib/python3.4/ctypes/util.py +267 -0
- package/python3.4.2/lib/python3.4/ctypes/wintypes.py +202 -0
- package/python3.4.2/lib/python3.4/curses/__init__.py +101 -0
- package/python3.4.2/lib/python3.4/curses/ascii.py +99 -0
- package/python3.4.2/lib/python3.4/curses/has_key.py +192 -0
- package/python3.4.2/lib/python3.4/curses/panel.py +6 -0
- package/python3.4.2/lib/python3.4/curses/textpad.py +188 -0
- package/python3.4.2/lib/python3.4/datetime.py +2136 -0
- package/python3.4.2/lib/python3.4/dbm/__init__.py +188 -0
- package/python3.4.2/lib/python3.4/dbm/dumb.py +291 -0
- package/python3.4.2/lib/python3.4/dbm/gnu.py +3 -0
- package/python3.4.2/lib/python3.4/dbm/ndbm.py +3 -0
- package/python3.4.2/lib/python3.4/decimal.py +6414 -0
- package/python3.4.2/lib/python3.4/difflib.py +2039 -0
- package/python3.4.2/lib/python3.4/dis.py +475 -0
- package/python3.4.2/lib/python3.4/distutils/README +13 -0
- package/python3.4.2/lib/python3.4/distutils/__init__.py +17 -0
- package/python3.4.2/lib/python3.4/distutils/archive_util.py +245 -0
- package/python3.4.2/lib/python3.4/distutils/bcppcompiler.py +393 -0
- package/python3.4.2/lib/python3.4/distutils/ccompiler.py +1115 -0
- package/python3.4.2/lib/python3.4/distutils/cmd.py +435 -0
- package/python3.4.2/lib/python3.4/distutils/command/__init__.py +31 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist.py +142 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_dumb.py +122 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_msi.py +741 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_rpm.py +582 -0
- package/python3.4.2/lib/python3.4/distutils/command/bdist_wininst.py +349 -0
- package/python3.4.2/lib/python3.4/distutils/command/build.py +148 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_clib.py +209 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_ext.py +735 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_py.py +416 -0
- package/python3.4.2/lib/python3.4/distutils/command/build_scripts.py +160 -0
- package/python3.4.2/lib/python3.4/distutils/command/check.py +145 -0
- package/python3.4.2/lib/python3.4/distutils/command/clean.py +76 -0
- package/python3.4.2/lib/python3.4/distutils/command/command_template +33 -0
- package/python3.4.2/lib/python3.4/distutils/command/config.py +347 -0
- package/python3.4.2/lib/python3.4/distutils/command/install.py +650 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_data.py +79 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_egg_info.py +77 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_headers.py +47 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_lib.py +217 -0
- package/python3.4.2/lib/python3.4/distutils/command/install_scripts.py +60 -0
- package/python3.4.2/lib/python3.4/distutils/command/register.py +304 -0
- package/python3.4.2/lib/python3.4/distutils/command/sdist.py +467 -0
- package/python3.4.2/lib/python3.4/distutils/command/upload.py +202 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-10.0-amd64.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-10.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-6.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-7.1.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-8.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-9.0-amd64.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/command/wininst-9.0.exe +0 -0
- package/python3.4.2/lib/python3.4/distutils/config.py +131 -0
- package/python3.4.2/lib/python3.4/distutils/core.py +237 -0
- package/python3.4.2/lib/python3.4/distutils/cygwinccompiler.py +405 -0
- package/python3.4.2/lib/python3.4/distutils/debug.py +5 -0
- package/python3.4.2/lib/python3.4/distutils/dep_util.py +92 -0
- package/python3.4.2/lib/python3.4/distutils/dir_util.py +210 -0
- package/python3.4.2/lib/python3.4/distutils/dist.py +1238 -0
- package/python3.4.2/lib/python3.4/distutils/errors.py +97 -0
- package/python3.4.2/lib/python3.4/distutils/extension.py +233 -0
- package/python3.4.2/lib/python3.4/distutils/fancy_getopt.py +457 -0
- package/python3.4.2/lib/python3.4/distutils/file_util.py +230 -0
- package/python3.4.2/lib/python3.4/distutils/filelist.py +328 -0
- package/python3.4.2/lib/python3.4/distutils/log.py +75 -0
- package/python3.4.2/lib/python3.4/distutils/msvc9compiler.py +788 -0
- package/python3.4.2/lib/python3.4/distutils/msvccompiler.py +640 -0
- package/python3.4.2/lib/python3.4/distutils/spawn.py +195 -0
- package/python3.4.2/lib/python3.4/distutils/sysconfig.py +562 -0
- package/python3.4.2/lib/python3.4/distutils/tests/Setup.sample +67 -0
- package/python3.4.2/lib/python3.4/distutils/tests/__init__.py +36 -0
- package/python3.4.2/lib/python3.4/distutils/tests/support.py +210 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_archive_util.py +341 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist.py +50 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_dumb.py +97 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_msi.py +25 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_rpm.py +134 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_bdist_wininst.py +31 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build.py +55 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_clib.py +143 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_ext.py +488 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_py.py +178 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_build_scripts.py +112 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_check.py +106 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_clean.py +51 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_cmd.py +126 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_config.py +120 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_config_cmd.py +89 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_core.py +108 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_cygwinccompiler.py +155 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_dep_util.py +81 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_dir_util.py +139 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_dist.py +454 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_extension.py +69 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_file_util.py +85 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_filelist.py +299 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install.py +246 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_data.py +77 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_headers.py +41 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_lib.py +115 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_install_scripts.py +82 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_log.py +37 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_msvc9compiler.py +184 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_register.py +309 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_sdist.py +484 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_spawn.py +58 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_sysconfig.py +207 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_text_file.py +107 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_unixccompiler.py +150 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_upload.py +151 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_util.py +300 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_version.py +71 -0
- package/python3.4.2/lib/python3.4/distutils/tests/test_versionpredicate.py +13 -0
- package/python3.4.2/lib/python3.4/distutils/tests/xxmodule.c +396 -0
- package/python3.4.2/lib/python3.4/distutils/text_file.py +285 -0
- package/python3.4.2/lib/python3.4/distutils/unixccompiler.py +298 -0
- package/python3.4.2/lib/python3.4/distutils/util.py +553 -0
- package/python3.4.2/lib/python3.4/distutils/version.py +349 -0
- package/python3.4.2/lib/python3.4/distutils/versionpredicate.py +166 -0
- package/python3.4.2/lib/python3.4/doctest.py +2793 -0
- package/python3.4.2/lib/python3.4/dummy_threading.py +78 -0
- package/python3.4.2/lib/python3.4/email/__init__.py +64 -0
- package/python3.4.2/lib/python3.4/email/_encoded_words.py +221 -0
- package/python3.4.2/lib/python3.4/email/_header_value_parser.py +2947 -0
- package/python3.4.2/lib/python3.4/email/_parseaddr.py +540 -0
- package/python3.4.2/lib/python3.4/email/_policybase.py +358 -0
- package/python3.4.2/lib/python3.4/email/architecture.rst +216 -0
- package/python3.4.2/lib/python3.4/email/base64mime.py +119 -0
- package/python3.4.2/lib/python3.4/email/charset.py +409 -0
- package/python3.4.2/lib/python3.4/email/contentmanager.py +249 -0
- package/python3.4.2/lib/python3.4/email/encoders.py +69 -0
- package/python3.4.2/lib/python3.4/email/errors.py +107 -0
- package/python3.4.2/lib/python3.4/email/feedparser.py +526 -0
- package/python3.4.2/lib/python3.4/email/generator.py +507 -0
- package/python3.4.2/lib/python3.4/email/header.py +581 -0
- package/python3.4.2/lib/python3.4/email/headerregistry.py +583 -0
- package/python3.4.2/lib/python3.4/email/iterators.py +71 -0
- package/python3.4.2/lib/python3.4/email/message.py +1147 -0
- package/python3.4.2/lib/python3.4/email/mime/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/email/mime/application.py +36 -0
- package/python3.4.2/lib/python3.4/email/mime/audio.py +73 -0
- package/python3.4.2/lib/python3.4/email/mime/base.py +26 -0
- package/python3.4.2/lib/python3.4/email/mime/image.py +46 -0
- package/python3.4.2/lib/python3.4/email/mime/message.py +34 -0
- package/python3.4.2/lib/python3.4/email/mime/multipart.py +47 -0
- package/python3.4.2/lib/python3.4/email/mime/nonmultipart.py +22 -0
- package/python3.4.2/lib/python3.4/email/mime/text.py +41 -0
- package/python3.4.2/lib/python3.4/email/parser.py +132 -0
- package/python3.4.2/lib/python3.4/email/policy.py +201 -0
- package/python3.4.2/lib/python3.4/email/quoprimime.py +299 -0
- package/python3.4.2/lib/python3.4/email/utils.py +399 -0
- package/python3.4.2/lib/python3.4/encodings/__init__.py +152 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/__init__.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/aliases.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/ascii.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/latin_1.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/__pycache__/utf_8.cpython-34.pyc +0 -0
- package/python3.4.2/lib/python3.4/encodings/aliases.py +544 -0
- package/python3.4.2/lib/python3.4/encodings/ascii.py +50 -0
- package/python3.4.2/lib/python3.4/encodings/base64_codec.py +55 -0
- package/python3.4.2/lib/python3.4/encodings/big5.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/big5hkscs.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/bz2_codec.py +78 -0
- package/python3.4.2/lib/python3.4/encodings/charmap.py +69 -0
- package/python3.4.2/lib/python3.4/encodings/cp037.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1006.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1026.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1125.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp1140.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1250.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1251.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1252.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1253.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1254.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1255.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1256.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1257.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp1258.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp273.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp424.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp437.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp500.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp65001.py +40 -0
- package/python3.4.2/lib/python3.4/encodings/cp720.py +309 -0
- package/python3.4.2/lib/python3.4/encodings/cp737.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp775.py +697 -0
- package/python3.4.2/lib/python3.4/encodings/cp850.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp852.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp855.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp856.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp857.py +694 -0
- package/python3.4.2/lib/python3.4/encodings/cp858.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp860.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp861.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp862.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp863.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp864.py +690 -0
- package/python3.4.2/lib/python3.4/encodings/cp865.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp866.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/cp869.py +689 -0
- package/python3.4.2/lib/python3.4/encodings/cp874.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp875.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/cp932.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/cp949.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/cp950.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_jis_2004.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_jisx0213.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_jp.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/euc_kr.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/gb18030.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/gb2312.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/gbk.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/hex_codec.py +55 -0
- package/python3.4.2/lib/python3.4/encodings/hp_roman8.py +312 -0
- package/python3.4.2/lib/python3.4/encodings/hz.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/idna.py +309 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_1.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_2.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_2004.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_3.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_jp_ext.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso2022_kr.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_1.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_10.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_11.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_13.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_14.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_15.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_16.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_2.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_3.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_4.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_5.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_6.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_7.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_8.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/iso8859_9.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/johab.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/koi8_r.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/koi8_u.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/latin_1.py +50 -0
- package/python3.4.2/lib/python3.4/encodings/mac_arabic.py +698 -0
- package/python3.4.2/lib/python3.4/encodings/mac_centeuro.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_croatian.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_cyrillic.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_farsi.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_greek.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_iceland.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_latin2.py +312 -0
- package/python3.4.2/lib/python3.4/encodings/mac_roman.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_romanian.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mac_turkish.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/mbcs.py +47 -0
- package/python3.4.2/lib/python3.4/encodings/palmos.py +308 -0
- package/python3.4.2/lib/python3.4/encodings/ptcp154.py +312 -0
- package/python3.4.2/lib/python3.4/encodings/punycode.py +237 -0
- package/python3.4.2/lib/python3.4/encodings/quopri_codec.py +56 -0
- package/python3.4.2/lib/python3.4/encodings/raw_unicode_escape.py +45 -0
- package/python3.4.2/lib/python3.4/encodings/rot_13.py +113 -0
- package/python3.4.2/lib/python3.4/encodings/shift_jis.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/shift_jis_2004.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/shift_jisx0213.py +39 -0
- package/python3.4.2/lib/python3.4/encodings/tis_620.py +307 -0
- package/python3.4.2/lib/python3.4/encodings/undefined.py +49 -0
- package/python3.4.2/lib/python3.4/encodings/unicode_escape.py +45 -0
- package/python3.4.2/lib/python3.4/encodings/unicode_internal.py +45 -0
- package/python3.4.2/lib/python3.4/encodings/utf_16.py +155 -0
- package/python3.4.2/lib/python3.4/encodings/utf_16_be.py +42 -0
- package/python3.4.2/lib/python3.4/encodings/utf_16_le.py +42 -0
- package/python3.4.2/lib/python3.4/encodings/utf_32.py +150 -0
- package/python3.4.2/lib/python3.4/encodings/utf_32_be.py +37 -0
- package/python3.4.2/lib/python3.4/encodings/utf_32_le.py +37 -0
- package/python3.4.2/lib/python3.4/encodings/utf_7.py +38 -0
- package/python3.4.2/lib/python3.4/encodings/utf_8.py +42 -0
- package/python3.4.2/lib/python3.4/encodings/utf_8_sig.py +130 -0
- package/python3.4.2/lib/python3.4/encodings/uu_codec.py +99 -0
- package/python3.4.2/lib/python3.4/encodings/zlib_codec.py +77 -0
- package/python3.4.2/lib/python3.4/ensurepip/__init__.py +210 -0
- package/python3.4.2/lib/python3.4/ensurepip/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/ensurepip/_bundled/pip-1.5.6-py2.py3-none-any.whl +0 -0
- package/python3.4.2/lib/python3.4/ensurepip/_bundled/setuptools-2.1-py2.py3-none-any.whl +0 -0
- package/python3.4.2/lib/python3.4/ensurepip/_uninstall.py +30 -0
- package/python3.4.2/lib/python3.4/enum.py +525 -0
- package/python3.4.2/lib/python3.4/filecmp.py +305 -0
- package/python3.4.2/lib/python3.4/fileinput.py +429 -0
- package/python3.4.2/lib/python3.4/fnmatch.py +109 -0
- package/python3.4.2/lib/python3.4/formatter.py +448 -0
- package/python3.4.2/lib/python3.4/fractions.py +630 -0
- package/python3.4.2/lib/python3.4/ftplib.py +1088 -0
- package/python3.4.2/lib/python3.4/functools.py +721 -0
- package/python3.4.2/lib/python3.4/genericpath.py +132 -0
- package/python3.4.2/lib/python3.4/getopt.py +215 -0
- package/python3.4.2/lib/python3.4/getpass.py +186 -0
- package/python3.4.2/lib/python3.4/gettext.py +523 -0
- package/python3.4.2/lib/python3.4/glob.py +110 -0
- package/python3.4.2/lib/python3.4/gzip.py +674 -0
- package/python3.4.2/lib/python3.4/hashlib.py +217 -0
- package/python3.4.2/lib/python3.4/heapq.py +476 -0
- package/python3.4.2/lib/python3.4/hmac.py +144 -0
- package/python3.4.2/lib/python3.4/html/__init__.py +132 -0
- package/python3.4.2/lib/python3.4/html/entities.py +2506 -0
- package/python3.4.2/lib/python3.4/html/parser.py +550 -0
- package/python3.4.2/lib/python3.4/http/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/http/client.py +1302 -0
- package/python3.4.2/lib/python3.4/http/cookiejar.py +2080 -0
- package/python3.4.2/lib/python3.4/http/cookies.py +578 -0
- package/python3.4.2/lib/python3.4/http/server.py +1241 -0
- package/python3.4.2/lib/python3.4/idlelib/AutoComplete.py +233 -0
- package/python3.4.2/lib/python3.4/idlelib/AutoCompleteWindow.py +415 -0
- package/python3.4.2/lib/python3.4/idlelib/AutoExpand.py +104 -0
- package/python3.4.2/lib/python3.4/idlelib/Bindings.py +94 -0
- package/python3.4.2/lib/python3.4/idlelib/CREDITS.txt +37 -0
- package/python3.4.2/lib/python3.4/idlelib/CallTipWindow.py +170 -0
- package/python3.4.2/lib/python3.4/idlelib/CallTips.py +175 -0
- package/python3.4.2/lib/python3.4/idlelib/ChangeLog +1591 -0
- package/python3.4.2/lib/python3.4/idlelib/ClassBrowser.py +229 -0
- package/python3.4.2/lib/python3.4/idlelib/CodeContext.py +176 -0
- package/python3.4.2/lib/python3.4/idlelib/ColorDelegator.py +254 -0
- package/python3.4.2/lib/python3.4/idlelib/Debugger.py +490 -0
- package/python3.4.2/lib/python3.4/idlelib/Delegator.py +25 -0
- package/python3.4.2/lib/python3.4/idlelib/EditorWindow.py +1729 -0
- package/python3.4.2/lib/python3.4/idlelib/FileList.py +129 -0
- package/python3.4.2/lib/python3.4/idlelib/FormatParagraph.py +193 -0
- package/python3.4.2/lib/python3.4/idlelib/GrepDialog.py +159 -0
- package/python3.4.2/lib/python3.4/idlelib/HISTORY.txt +296 -0
- package/python3.4.2/lib/python3.4/idlelib/HyperParser.py +313 -0
- package/python3.4.2/lib/python3.4/idlelib/IOBinding.py +555 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/folder.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle.icns +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle.ico +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_16.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_16.png +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_32.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_32.png +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_48.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/idle_48.png +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/minusnode.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/openfolder.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/plusnode.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/python.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/Icons/tk.gif +0 -0
- package/python3.4.2/lib/python3.4/idlelib/IdleHistory.py +104 -0
- package/python3.4.2/lib/python3.4/idlelib/MultiCall.py +453 -0
- package/python3.4.2/lib/python3.4/idlelib/MultiStatusBar.py +45 -0
- package/python3.4.2/lib/python3.4/idlelib/NEWS.txt +877 -0
- package/python3.4.2/lib/python3.4/idlelib/ObjectBrowser.py +143 -0
- package/python3.4.2/lib/python3.4/idlelib/OutputWindow.py +144 -0
- package/python3.4.2/lib/python3.4/idlelib/ParenMatch.py +178 -0
- package/python3.4.2/lib/python3.4/idlelib/PathBrowser.py +106 -0
- package/python3.4.2/lib/python3.4/idlelib/Percolator.py +104 -0
- package/python3.4.2/lib/python3.4/idlelib/PyParse.py +618 -0
- package/python3.4.2/lib/python3.4/idlelib/PyShell.py +1619 -0
- package/python3.4.2/lib/python3.4/idlelib/README.txt +60 -0
- package/python3.4.2/lib/python3.4/idlelib/RemoteDebugger.py +389 -0
- package/python3.4.2/lib/python3.4/idlelib/RemoteObjectBrowser.py +36 -0
- package/python3.4.2/lib/python3.4/idlelib/ReplaceDialog.py +221 -0
- package/python3.4.2/lib/python3.4/idlelib/RstripExtension.py +33 -0
- package/python3.4.2/lib/python3.4/idlelib/ScriptBinding.py +207 -0
- package/python3.4.2/lib/python3.4/idlelib/ScrolledList.py +140 -0
- package/python3.4.2/lib/python3.4/idlelib/SearchDialog.py +89 -0
- package/python3.4.2/lib/python3.4/idlelib/SearchDialogBase.py +184 -0
- package/python3.4.2/lib/python3.4/idlelib/SearchEngine.py +233 -0
- package/python3.4.2/lib/python3.4/idlelib/StackViewer.py +152 -0
- package/python3.4.2/lib/python3.4/idlelib/TODO.txt +210 -0
- package/python3.4.2/lib/python3.4/idlelib/ToolTip.py +97 -0
- package/python3.4.2/lib/python3.4/idlelib/TreeWidget.py +465 -0
- package/python3.4.2/lib/python3.4/idlelib/UndoDelegator.py +365 -0
- package/python3.4.2/lib/python3.4/idlelib/WidgetRedirector.py +174 -0
- package/python3.4.2/lib/python3.4/idlelib/WindowList.py +90 -0
- package/python3.4.2/lib/python3.4/idlelib/ZoomHeight.py +51 -0
- package/python3.4.2/lib/python3.4/idlelib/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/idlelib/__main__.py +9 -0
- package/python3.4.2/lib/python3.4/idlelib/aboutDialog.py +145 -0
- package/python3.4.2/lib/python3.4/idlelib/config-extensions.def +96 -0
- package/python3.4.2/lib/python3.4/idlelib/config-highlight.def +64 -0
- package/python3.4.2/lib/python3.4/idlelib/config-keys.def +214 -0
- package/python3.4.2/lib/python3.4/idlelib/config-main.def +79 -0
- package/python3.4.2/lib/python3.4/idlelib/configDialog.py +1195 -0
- package/python3.4.2/lib/python3.4/idlelib/configHandler.py +722 -0
- package/python3.4.2/lib/python3.4/idlelib/configHelpSourceEdit.py +166 -0
- package/python3.4.2/lib/python3.4/idlelib/configSectionNameDialog.py +98 -0
- package/python3.4.2/lib/python3.4/idlelib/dynOptionMenuWidget.py +57 -0
- package/python3.4.2/lib/python3.4/idlelib/extend.txt +83 -0
- package/python3.4.2/lib/python3.4/idlelib/help.txt +368 -0
- package/python3.4.2/lib/python3.4/idlelib/idle.bat +4 -0
- package/python3.4.2/lib/python3.4/idlelib/idle.py +11 -0
- package/python3.4.2/lib/python3.4/idlelib/idle.pyw +21 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/README.txt +115 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/__init__.py +9 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/htest.py +369 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/mock_idle.py +55 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/mock_tk.py +298 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_autocomplete.py +143 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_autoexpand.py +141 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_calltips.py +172 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_config_name.py +75 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_configdialog.py +32 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_delegator.py +37 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_formatparagraph.py +377 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_grep.py +80 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_hyperparser.py +273 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_idlehistory.py +167 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_parenmatch.py +109 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_pathbrowser.py +12 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_rstrip.py +49 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_searchdialogbase.py +165 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_searchengine.py +329 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_text.py +228 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_textview.py +97 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_warning.py +73 -0
- package/python3.4.2/lib/python3.4/idlelib/idle_test/test_widgetredir.py +122 -0
- package/python3.4.2/lib/python3.4/idlelib/idlever.py +1 -0
- package/python3.4.2/lib/python3.4/idlelib/keybindingDialog.py +266 -0
- package/python3.4.2/lib/python3.4/idlelib/macosxSupport.py +239 -0
- package/python3.4.2/lib/python3.4/idlelib/rpc.py +624 -0
- package/python3.4.2/lib/python3.4/idlelib/run.py +404 -0
- package/python3.4.2/lib/python3.4/idlelib/tabbedpages.py +498 -0
- package/python3.4.2/lib/python3.4/idlelib/testcode.py +31 -0
- package/python3.4.2/lib/python3.4/idlelib/textView.py +86 -0
- package/python3.4.2/lib/python3.4/imaplib.py +1549 -0
- package/python3.4.2/lib/python3.4/imghdr.py +154 -0
- package/python3.4.2/lib/python3.4/imp.py +315 -0
- package/python3.4.2/lib/python3.4/importlib/__init__.py +156 -0
- package/python3.4.2/lib/python3.4/importlib/_bootstrap.py +2461 -0
- package/python3.4.2/lib/python3.4/importlib/abc.py +323 -0
- package/python3.4.2/lib/python3.4/importlib/machinery.py +21 -0
- package/python3.4.2/lib/python3.4/importlib/util.py +202 -0
- package/python3.4.2/lib/python3.4/inspect.py +2759 -0
- package/python3.4.2/lib/python3.4/io.py +92 -0
- package/python3.4.2/lib/python3.4/ipaddress.py +2183 -0
- package/python3.4.2/lib/python3.4/json/__init__.py +331 -0
- package/python3.4.2/lib/python3.4/json/decoder.py +362 -0
- package/python3.4.2/lib/python3.4/json/encoder.py +433 -0
- package/python3.4.2/lib/python3.4/json/scanner.py +73 -0
- package/python3.4.2/lib/python3.4/json/tool.py +39 -0
- package/python3.4.2/lib/python3.4/keyword.py +94 -0
- package/python3.4.2/lib/python3.4/lib2to3/Grammar.txt +159 -0
- package/python3.4.2/lib/python3.4/lib2to3/Grammar3.4.2.final.0.pickle +0 -0
- package/python3.4.2/lib/python3.4/lib2to3/PatternGrammar.txt +28 -0
- package/python3.4.2/lib/python3.4/lib2to3/PatternGrammar3.4.2.final.0.pickle +0 -0
- package/python3.4.2/lib/python3.4/lib2to3/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/lib2to3/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/lib2to3/btm_matcher.py +168 -0
- package/python3.4.2/lib/python3.4/lib2to3/btm_utils.py +281 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixer_base.py +187 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixer_util.py +455 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_apply.py +59 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_asserts.py +34 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_basestring.py +14 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_buffer.py +22 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_callable.py +37 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_dict.py +107 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_except.py +93 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_exec.py +40 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_execfile.py +52 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_exitfunc.py +72 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_filter.py +76 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_funcattrs.py +21 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_future.py +22 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_getcwdu.py +19 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_has_key.py +110 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_idioms.py +152 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_import.py +99 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_imports.py +145 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_imports2.py +16 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_input.py +26 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_intern.py +31 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_isinstance.py +52 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_itertools.py +43 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_itertools_imports.py +57 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_long.py +19 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_map.py +91 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_metaclass.py +228 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_methodattrs.py +24 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_ne.py +23 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_next.py +103 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_nonzero.py +21 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_numliterals.py +28 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_operator.py +98 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_paren.py +44 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_print.py +87 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_raise.py +90 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_raw_input.py +17 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_reduce.py +35 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_reload.py +28 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_renames.py +70 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_repr.py +23 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_set_literal.py +53 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_standarderror.py +18 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_sys_exc.py +30 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_throw.py +56 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_tuple_params.py +175 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_types.py +62 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_unicode.py +42 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_urllib.py +197 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_ws_comma.py +39 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_xrange.py +73 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_xreadlines.py +25 -0
- package/python3.4.2/lib/python3.4/lib2to3/fixes/fix_zip.py +35 -0
- package/python3.4.2/lib/python3.4/lib2to3/main.py +268 -0
- package/python3.4.2/lib/python3.4/lib2to3/patcomp.py +205 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/conv.py +257 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/driver.py +157 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/grammar.py +183 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/literals.py +60 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/parse.py +201 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/pgen.py +386 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/token.py +83 -0
- package/python3.4.2/lib/python3.4/lib2to3/pgen2/tokenize.py +502 -0
- package/python3.4.2/lib/python3.4/lib2to3/pygram.py +40 -0
- package/python3.4.2/lib/python3.4/lib2to3/pytree.py +864 -0
- package/python3.4.2/lib/python3.4/lib2to3/refactor.py +747 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/__init__.py +24 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/README +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/bom.py +2 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/crlf.py +3 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/different_encoding.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/false_encoding.py +2 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/bad_order.py +5 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_explicit.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_first.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_last.py +7 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_parrot.py +13 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/myfixes/fix_preorder.py +6 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/no_fixer_cls.py +1 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/fixers/parrot_example.py +2 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/infinite_recursion.py +2669 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/py2_test_grammar.py +974 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/data/py3_test_grammar.py +923 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/pytree_idempotency.py +92 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/support.py +54 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_all_fixers.py +23 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_fixers.py +4687 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_main.py +139 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_parser.py +249 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_pytree.py +477 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_refactor.py +321 -0
- package/python3.4.2/lib/python3.4/lib2to3/tests/test_util.py +594 -0
- package/python3.4.2/lib/python3.4/linecache.py +134 -0
- package/python3.4.2/lib/python3.4/locale.py +1559 -0
- package/python3.4.2/lib/python3.4/logging/__init__.py +1950 -0
- package/python3.4.2/lib/python3.4/logging/config.py +927 -0
- package/python3.4.2/lib/python3.4/logging/handlers.py +1452 -0
- package/python3.4.2/lib/python3.4/lzma.py +511 -0
- package/python3.4.2/lib/python3.4/macpath.py +205 -0
- package/python3.4.2/lib/python3.4/macurl2path.py +77 -0
- package/python3.4.2/lib/python3.4/mailbox.py +2136 -0
- package/python3.4.2/lib/python3.4/mailcap.py +253 -0
- package/python3.4.2/lib/python3.4/mimetypes.py +592 -0
- package/python3.4.2/lib/python3.4/modulefinder.py +642 -0
- package/python3.4.2/lib/python3.4/multiprocessing/__init__.py +38 -0
- package/python3.4.2/lib/python3.4/multiprocessing/connection.py +954 -0
- package/python3.4.2/lib/python3.4/multiprocessing/context.py +348 -0
- package/python3.4.2/lib/python3.4/multiprocessing/dummy/__init__.py +119 -0
- package/python3.4.2/lib/python3.4/multiprocessing/dummy/connection.py +74 -0
- package/python3.4.2/lib/python3.4/multiprocessing/forkserver.py +267 -0
- package/python3.4.2/lib/python3.4/multiprocessing/heap.py +249 -0
- package/python3.4.2/lib/python3.4/multiprocessing/managers.py +1131 -0
- package/python3.4.2/lib/python3.4/multiprocessing/pool.py +769 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_fork.py +83 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_forkserver.py +69 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_spawn_posix.py +69 -0
- package/python3.4.2/lib/python3.4/multiprocessing/popen_spawn_win32.py +99 -0
- package/python3.4.2/lib/python3.4/multiprocessing/process.py +332 -0
- package/python3.4.2/lib/python3.4/multiprocessing/queues.py +367 -0
- package/python3.4.2/lib/python3.4/multiprocessing/reduction.py +240 -0
- package/python3.4.2/lib/python3.4/multiprocessing/resource_sharer.py +158 -0
- package/python3.4.2/lib/python3.4/multiprocessing/semaphore_tracker.py +143 -0
- package/python3.4.2/lib/python3.4/multiprocessing/sharedctypes.py +245 -0
- package/python3.4.2/lib/python3.4/multiprocessing/spawn.py +287 -0
- package/python3.4.2/lib/python3.4/multiprocessing/synchronize.py +418 -0
- package/python3.4.2/lib/python3.4/multiprocessing/util.py +367 -0
- package/python3.4.2/lib/python3.4/netrc.py +142 -0
- package/python3.4.2/lib/python3.4/nntplib.py +1134 -0
- package/python3.4.2/lib/python3.4/ntpath.py +625 -0
- package/python3.4.2/lib/python3.4/nturl2path.py +66 -0
- package/python3.4.2/lib/python3.4/numbers.py +394 -0
- package/python3.4.2/lib/python3.4/opcode.py +200 -0
- package/python3.4.2/lib/python3.4/operator.py +411 -0
- package/python3.4.2/lib/python3.4/optparse.py +1680 -0
- package/python3.4.2/lib/python3.4/os.py +980 -0
- package/python3.4.2/lib/python3.4/pathlib.py +1291 -0
- package/python3.4.2/lib/python3.4/pdb.py +1685 -0
- package/python3.4.2/lib/python3.4/pickle.py +1599 -0
- package/python3.4.2/lib/python3.4/pickletools.py +2818 -0
- package/python3.4.2/lib/python3.4/pipes.py +247 -0
- package/python3.4.2/lib/python3.4/pkgutil.py +629 -0
- package/python3.4.2/lib/python3.4/plat-linux/CDROM.py +207 -0
- package/python3.4.2/lib/python3.4/plat-linux/DLFCN.py +83 -0
- package/python3.4.2/lib/python3.4/plat-linux/IN.py +615 -0
- package/python3.4.2/lib/python3.4/plat-linux/TYPES.py +170 -0
- package/python3.4.2/lib/python3.4/plat-linux/regen +8 -0
- package/python3.4.2/lib/python3.4/platform.py +1476 -0
- package/python3.4.2/lib/python3.4/plistlib.py +1025 -0
- package/python3.4.2/lib/python3.4/poplib.py +461 -0
- package/python3.4.2/lib/python3.4/posixpath.py +457 -0
- package/python3.4.2/lib/python3.4/pprint.py +416 -0
- package/python3.4.2/lib/python3.4/profile.py +589 -0
- package/python3.4.2/lib/python3.4/pstats.py +691 -0
- package/python3.4.2/lib/python3.4/pty.py +170 -0
- package/python3.4.2/lib/python3.4/py_compile.py +185 -0
- package/python3.4.2/lib/python3.4/pyclbr.py +351 -0
- package/python3.4.2/lib/python3.4/pydoc.py +2622 -0
- package/python3.4.2/lib/python3.4/pydoc_data/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/pydoc_data/_pydoc.css +6 -0
- package/python3.4.2/lib/python3.4/pydoc_data/topics.py +79 -0
- package/python3.4.2/lib/python3.4/queue.py +249 -0
- package/python3.4.2/lib/python3.4/quopri.py +242 -0
- package/python3.4.2/lib/python3.4/random.py +742 -0
- package/python3.4.2/lib/python3.4/re.py +368 -0
- package/python3.4.2/lib/python3.4/reprlib.py +157 -0
- package/python3.4.2/lib/python3.4/rlcompleter.py +165 -0
- package/python3.4.2/lib/python3.4/runpy.py +271 -0
- package/python3.4.2/lib/python3.4/sched.py +167 -0
- package/python3.4.2/lib/python3.4/selectors.py +525 -0
- package/python3.4.2/lib/python3.4/shelve.py +239 -0
- package/python3.4.2/lib/python3.4/shlex.py +304 -0
- package/python3.4.2/lib/python3.4/shutil.py +1127 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/PKG-INFO +55 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/SOURCES.txt +126 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/entry_points.txt +4 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/requires.txt +4 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/EGG-INFO/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/__init__.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/_compat.py +150 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/_stringdefs.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/bccache.py +344 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/compiler.py +1640 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/constants.py +32 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/debug.py +337 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/defaults.py +43 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/environment.py +1191 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/exceptions.py +146 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/ext.py +636 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/filters.py +987 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/lexer.py +733 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/loaders.py +471 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/meta.py +103 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/nodes.py +914 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/optimizer.py +68 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/parser.py +895 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/runtime.py +581 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/sandbox.py +368 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/tests.py +149 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/__init__.py +156 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/api.py +261 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/bytecode_cache.py +37 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/core_tags.py +305 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/debug.py +58 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/doctests.py +29 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/ext.py +459 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/filters.py +515 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/imports.py +141 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/inheritance.py +250 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/lexnparse.py +593 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/loader.py +226 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/regression.py +279 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/broken.html +3 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/foo/test.html +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/syntaxerror.html +4 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/res/templates/test.html +1 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/security.py +166 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/tests.py +93 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/testsuite/utils.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/utils.py +520 -0
- package/python3.4.2/lib/python3.4/site-packages/Jinja2-2.7.3-py3.4.egg/jinja2/visitor.py +87 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/PKG-INFO +119 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/SOURCES.txt +17 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/EGG-INFO/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/__init__.py +298 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_compat.py +26 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_constants.py +267 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_native.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/_speedups.c +239 -0
- package/python3.4.2/lib/python3.4/site-packages/MarkupSafe-0.23-py3.4.egg/markupsafe/tests.py +179 -0
- package/python3.4.2/lib/python3.4/site-packages/README +2 -0
- package/python3.4.2/lib/python3.4/site-packages/_markerlib/__init__.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/_markerlib/markers.py +119 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/PKG-INFO +68 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/SOURCES.txt +23 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/dependency_links.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/entry_points.txt +3 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/not-zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/requires.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/scripts/android-debian-builder +6 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/EGG-INFO/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/__main__.py +26 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/build.py +63 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/config.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/deb.sh +106 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/default-config +42 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/first-time-setup.sh +94 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/data/init.sh +27 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/examples/jessie-armhf.cfg +26 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/run_tests.py +38 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/script.py +110 -0
- package/python3.4.2/lib/python3.4/site-packages/android_debian_builder-1.0-py3.4.egg/android_debian_builder/util.py +177 -0
- package/python3.4.2/lib/python3.4/site-packages/easy-install.pth +4 -0
- package/python3.4.2/lib/python3.4/site-packages/easy_install.py +5 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/__init__.py +277 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/__main__.py +7 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/__init__.py +8 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/__init__.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/markers.py +119 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/__init__.py +7 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansi.py +50 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansitowin32.py +190 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/initialise.py +56 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/win32.py +137 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/winterm.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py +761 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +788 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/compat.py +1064 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/database.py +1301 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/index.py +488 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/locators.py +1194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/manifest.py +364 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py +190 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/metadata.py +1026 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/resources.py +317 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/scripts.py +323 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/util.py +1575 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/version.py +721 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/wheel.py +958 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/constants.py +3104 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/_base.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +20 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +65 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +205 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/html5parser.py +2713 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/ihatexml.py +285 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/inputstream.py +881 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py +271 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py +320 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/tokenizer.py +1731 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +76 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/_base.py +377 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +227 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +337 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +369 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +57 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/_base.py +200 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +138 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py +208 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py +63 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/__init__.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/_base.py +37 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/datrie.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/trie/py.py +67 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/utils.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py +2762 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/re-vendor.py +34 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__init__.py +77 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/adapters.py +388 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/api.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/auth.py +193 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cacert.pem +5026 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/certs.py +24 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/compat.py +115 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cookies.py +454 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/exceptions.py +75 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/hooks.py +45 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/models.py +803 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/__init__.py +32 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py +925 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py +231 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py +106 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py +62 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py +61 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/compat.py +34 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py +39 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py +86 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py +242 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py +90 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py +596 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py +428 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py +472 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py +283 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py +569 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py +219 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py +229 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py +329 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py +225 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py +201 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py +225 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py +200 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py +139 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py +86 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py +575 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py +91 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py +170 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py +76 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py +58 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py +205 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py +204 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py +710 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py +422 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py +126 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/fields.py +177 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py +100 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py +260 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py +385 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py +13 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py +105 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py +258 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/request.py +141 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py +308 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py +27 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py +45 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py +68 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py +13 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py +133 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py +234 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py +162 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/sessions.py +637 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/status_codes.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/structures.py +127 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/utils.py +673 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/six.py +646 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/backwardcompat/__init__.py +138 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/basecommand.py +201 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/baseparser.py +224 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/cmdoptions.py +371 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/__init__.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/bundle.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/completion.py +59 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/freeze.py +114 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/help.py +33 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/install.py +314 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/list.py +162 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/search.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/show.py +80 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/uninstall.py +59 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/unzip.py +7 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/wheel.py +195 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/zip.py +351 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/download.py +644 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/exceptions.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/index.py +990 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/locations.py +172 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/log.py +276 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/pep425tags.py +102 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/req.py +1931 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/runner.py +18 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/status_codes.py +6 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/util.py +720 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/__init__.py +251 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/bazaar.py +131 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/git.py +194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/mercurial.py +151 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/subversion.py +273 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/wheel.py +560 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/DESCRIPTION.rst +71 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/METADATA +98 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/RECORD +373 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/WHEEL +6 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/entry_points.txt +5 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/metadata.json +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/top_level.txt +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pkg_resources.py +2719 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/__init__.py +98 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/archive_util.py +210 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli-arm-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/cli.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/__init__.py +17 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/alias.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_egg.py +553 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_rpm.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/bdist_wininst.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/build_ext.py +298 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/build_py.py +221 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/develop.py +167 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/easy_install.py +1915 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/egg_info.py +392 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install.py +103 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_egg_info.py +125 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_lib.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/install_scripts.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/launcher manifest.xml +15 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/register.py +10 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/rotate.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/saveopts.py +24 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/sdist.py +238 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/setopt.py +164 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/test.py +198 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/command/upload_docs.py +193 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/compat.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/depends.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/dist.py +796 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/extension.py +46 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui-arm-32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/gui.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/lib2to3_ex.py +58 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/package_index.py +1057 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/py26compat.py +19 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/py27compat.py +15 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/py31compat.py +11 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/sandbox.py +322 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/script template (dev).py +11 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/script template.py +4 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/site-patch.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/ssl_support.py +234 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/svn_utils.py +564 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/__init__.py +352 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/doctest.py +2683 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/environment.py +165 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/py26compat.py +14 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/script-with-bom.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/server.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_bdist_egg.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_build_ext.py +20 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_develop.py +122 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_dist_info.py +83 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_easy_install.py +394 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_egg_info.py +173 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_markerlib.py +68 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_packageindex.py +203 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_resources.py +620 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_sandbox.py +79 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_sdist.py +535 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_svn.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_test.py +124 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/tests/test_upload_docs.py +72 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools/version.py +1 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/DESCRIPTION.rst +1742 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/METADATA +1772 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/RECORD +149 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/WHEEL +6 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/dependency_links.txt +2 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/entry_points.txt +62 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/entry_points.txt.orig +62 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/pydist.json +1 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/requires.txt.orig +7 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/top_level.txt +4 -0
- package/python3.4.2/lib/python3.4/site-packages/setuptools-2.1.dist-info/zip-safe +1 -0
- package/python3.4.2/lib/python3.4/site.py +616 -0
- package/python3.4.2/lib/python3.4/smtpd.py +861 -0
- package/python3.4.2/lib/python3.4/smtplib.py +999 -0
- package/python3.4.2/lib/python3.4/sndhdr.py +240 -0
- package/python3.4.2/lib/python3.4/socket.py +535 -0
- package/python3.4.2/lib/python3.4/socketserver.py +748 -0
- package/python3.4.2/lib/python3.4/sqlite3/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/sqlite3/dbapi2.py +89 -0
- package/python3.4.2/lib/python3.4/sqlite3/dump.py +70 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/dbapi.py +911 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/dump.py +81 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/factory.py +253 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/hooks.py +258 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/regression.py +358 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/transactions.py +204 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/types.py +403 -0
- package/python3.4.2/lib/python3.4/sqlite3/test/userfunctions.py +468 -0
- package/python3.4.2/lib/python3.4/sre_compile.py +489 -0
- package/python3.4.2/lib/python3.4/sre_constants.py +261 -0
- package/python3.4.2/lib/python3.4/sre_parse.py +859 -0
- package/python3.4.2/lib/python3.4/ssl.py +945 -0
- package/python3.4.2/lib/python3.4/stat.py +155 -0
- package/python3.4.2/lib/python3.4/statistics.py +595 -0
- package/python3.4.2/lib/python3.4/string.py +282 -0
- package/python3.4.2/lib/python3.4/stringprep.py +272 -0
- package/python3.4.2/lib/python3.4/struct.py +15 -0
- package/python3.4.2/lib/python3.4/subprocess.py +1690 -0
- package/python3.4.2/lib/python3.4/sunau.py +525 -0
- package/python3.4.2/lib/python3.4/symbol.py +111 -0
- package/python3.4.2/lib/python3.4/symtable.py +240 -0
- package/python3.4.2/lib/python3.4/sysconfig.py +709 -0
- package/python3.4.2/lib/python3.4/tabnanny.py +332 -0
- package/python3.4.2/lib/python3.4/tarfile.py +2519 -0
- package/python3.4.2/lib/python3.4/telnetlib.py +672 -0
- package/python3.4.2/lib/python3.4/tempfile.py +698 -0
- package/python3.4.2/lib/python3.4/test/185test.db +0 -0
- package/python3.4.2/lib/python3.4/test/Sine-1000Hz-300ms.aif +0 -0
- package/python3.4.2/lib/python3.4/test/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/test/__main__.py +3 -0
- package/python3.4.2/lib/python3.4/test/_test_multiprocessing.py +3841 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-alaw.aifc +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm16.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm24.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm32.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-pcm8.wav +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-ulaw.aifc +0 -0
- package/python3.4.2/lib/python3.4/test/audiodata/pluck-ulaw.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiotest.au +0 -0
- package/python3.4.2/lib/python3.4/test/audiotests.py +329 -0
- package/python3.4.2/lib/python3.4/test/autotest.py +6 -0
- package/python3.4.2/lib/python3.4/test/bad_coding.py +1 -0
- package/python3.4.2/lib/python3.4/test/bad_coding2.py +2 -0
- package/python3.4.2/lib/python3.4/test/badcert.pem +36 -0
- package/python3.4.2/lib/python3.4/test/badkey.pem +40 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_3131.py +2 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future10.py +3 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future3.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future4.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future5.py +12 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future6.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future7.py +11 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future8.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_future9.py +10 -0
- package/python3.4.2/lib/python3.4/test/badsyntax_pep3120.py +1 -0
- package/python3.4.2/lib/python3.4/test/buffer_tests.py +218 -0
- package/python3.4.2/lib/python3.4/test/bytecode_helper.py +41 -0
- package/python3.4.2/lib/python3.4/test/capath/4e1295a3.0 +14 -0
- package/python3.4.2/lib/python3.4/test/capath/5ed36f99.0 +41 -0
- package/python3.4.2/lib/python3.4/test/capath/6e88d7b8.0 +14 -0
- package/python3.4.2/lib/python3.4/test/capath/99d0fa06.0 +41 -0
- package/python3.4.2/lib/python3.4/test/cfgparser.1 +2 -0
- package/python3.4.2/lib/python3.4/test/cfgparser.2 +537 -0
- package/python3.4.2/lib/python3.4/test/cfgparser.3 +69 -0
- package/python3.4.2/lib/python3.4/test/check_soundcard.vbs +13 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5-utf8.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5hkscs-utf8.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/big5hkscs.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/cp949-utf8.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/cp949.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jisx0213-utf8.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jisx0213.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jp-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_jp.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_kr-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/euc_kr.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb18030-utf8.txt +15 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb18030.txt +15 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb2312-utf8.txt +6 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gb2312.txt +6 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gbk-utf8.txt +14 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/gbk.txt +14 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/hz-utf8.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/hz.txt +2 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_jp-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_jp.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_kr-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/iso2022_kr.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/johab-utf8.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/johab.txt +9 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jis-utf8.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jis.txt +7 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jisx0213-utf8.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cjkencodings/shift_jisx0213.txt +8 -0
- package/python3.4.2/lib/python3.4/test/cmath_testcases.txt +2370 -0
- package/python3.4.2/lib/python3.4/test/coding20731.py +4 -0
- package/python3.4.2/lib/python3.4/test/curses_tests.py +46 -0
- package/python3.4.2/lib/python3.4/test/data/README +2 -0
- package/python3.4.2/lib/python3.4/test/datetimetester.py +3786 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/abs.decTest +161 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/add.decTest +2716 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/and.decTest +338 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/base.decTest +1411 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/clamp.decTest +211 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/class.decTest +131 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/compare.decTest +758 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/comparetotal.decTest +798 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/comparetotmag.decTest +790 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copy.decTest +86 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copyabs.decTest +86 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copynegate.decTest +86 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/copysign.decTest +177 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAbs.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAdd.decTest +1328 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddAnd.decTest +347 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddBase.decTest +1104 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCanonical.decTest +357 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddClass.decTest +76 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompare.decTest +744 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareSig.decTest +647 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareTotal.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCompareTotalMag.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopy.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopyAbs.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopyNegate.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddCopySign.decTest +175 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddDivide.decTest +863 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddDivideInt.decTest +449 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddEncode.decTest +495 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddFMA.decTest +1698 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddInvert.decTest +202 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddLogB.decTest +159 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMax.decTest +322 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMaxMag.decTest +304 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMin.decTest +309 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMinMag.decTest +293 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMinus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddMultiply.decTest +553 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextMinus.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextPlus.decTest +124 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddNextToward.decTest +374 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddOr.decTest +292 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddPlus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddQuantize.decTest +833 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddReduce.decTest +182 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRemainder.decTest +600 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRemainderNear.decTest +629 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddRotate.decTest +262 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddSameQuantum.decTest +389 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddScaleB.decTest +243 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddShift.decTest +262 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddSubtract.decTest +629 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddToIntegral.decTest +257 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ddXor.decTest +337 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/decDouble.decTest +65 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/decQuad.decTest +65 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/decSingle.decTest +25 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/divide.decTest +854 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/divideint.decTest +486 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAbs.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAdd.decTest +1215 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqAnd.decTest +420 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqBase.decTest +1081 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCanonical.decTest +372 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqClass.decTest +77 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompare.decTest +753 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareSig.decTest +647 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareTotal.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCompareTotalMag.decTest +706 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopy.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopyAbs.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopyNegate.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqCopySign.decTest +175 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqDivide.decTest +808 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqDivideInt.decTest +453 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqEncode.decTest +477 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqFMA.decTest +1786 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqInvert.decTest +245 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqLogB.decTest +160 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMax.decTest +322 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMaxMag.decTest +304 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMin.decTest +309 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMinMag.decTest +293 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMinus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqMultiply.decTest +589 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextMinus.decTest +126 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextPlus.decTest +124 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqNextToward.decTest +375 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqOr.decTest +401 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqPlus.decTest +88 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqQuantize.decTest +836 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqReduce.decTest +183 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRemainder.decTest +597 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRemainderNear.decTest +631 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqRotate.decTest +298 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqSameQuantum.decTest +389 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqScaleB.decTest +260 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqShift.decTest +298 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqSubtract.decTest +635 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqToIntegral.decTest +257 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dqXor.decTest +410 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dsBase.decTest +1062 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/dsEncode.decTest +372 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/exp.decTest +674 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/extra.decTest +2830 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/fma.decTest +3426 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/inexact.decTest +215 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/invert.decTest +176 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/ln.decTest +611 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/log10.decTest +551 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/logb.decTest +188 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/max.decTest +424 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/maxmag.decTest +404 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/min.decTest +407 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/minmag.decTest +390 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/minus.decTest +182 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/multiply.decTest +731 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/nextminus.decTest +148 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/nextplus.decTest +150 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/nexttoward.decTest +426 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/or.decTest +334 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/plus.decTest +195 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/power.decTest +1624 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/powersqrt.decTest +2970 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/quantize.decTest +948 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/randomBound32.decTest +2443 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/randoms.decTest +4030 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/reduce.decTest +234 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/remainder.decTest +640 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/remainderNear.decTest +572 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/rescale.decTest +764 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/rotate.decTest +247 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/rounding.decTest +1303 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/samequantum.decTest +389 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/scaleb.decTest +209 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/shift.decTest +250 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/squareroot.decTest +3834 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/subtract.decTest +873 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/testall.decTest +87 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/tointegral.decTest +241 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/tointegralx.decTest +255 -0
- package/python3.4.2/lib/python3.4/test/decimaltestdata/xor.decTest +335 -0
- package/python3.4.2/lib/python3.4/test/dh512.pem +9 -0
- package/python3.4.2/lib/python3.4/test/dis_module.py +5 -0
- package/python3.4.2/lib/python3.4/test/doctest_aliases.py +13 -0
- package/python3.4.2/lib/python3.4/test/double_const.py +30 -0
- package/python3.4.2/lib/python3.4/test/empty.vbs +1 -0
- package/python3.4.2/lib/python3.4/test/encoded_modules/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/test/encoded_modules/module_iso_8859_1.py +5 -0
- package/python3.4.2/lib/python3.4/test/encoded_modules/module_koi8_r.py +3 -0
- package/python3.4.2/lib/python3.4/test/exception_hierarchy.txt +61 -0
- package/python3.4.2/lib/python3.4/test/final_a.py +19 -0
- package/python3.4.2/lib/python3.4/test/final_b.py +19 -0
- package/python3.4.2/lib/python3.4/test/floating_points.txt +1028 -0
- package/python3.4.2/lib/python3.4/test/fork_wait.py +77 -0
- package/python3.4.2/lib/python3.4/test/formatfloat_testcases.txt +355 -0
- package/python3.4.2/lib/python3.4/test/future_test1.py +11 -0
- package/python3.4.2/lib/python3.4/test/future_test2.py +10 -0
- package/python3.4.2/lib/python3.4/test/gdb_sample.py +12 -0
- package/python3.4.2/lib/python3.4/test/https_svn_python_org_root.pem +41 -0
- package/python3.4.2/lib/python3.4/test/ieee754.txt +185 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.bmp +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.gif +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.jpg +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.pbm +3 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.pgm +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.png +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.ppm +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.ras +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.sgi +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.tiff +0 -0
- package/python3.4.2/lib/python3.4/test/imghdrdata/python.xbm +6 -0
- package/python3.4.2/lib/python3.4/test/inspect_fodder.py +58 -0
- package/python3.4.2/lib/python3.4/test/inspect_fodder2.py +111 -0
- package/python3.4.2/lib/python3.4/test/keycert.passwd.pem +33 -0
- package/python3.4.2/lib/python3.4/test/keycert.pem +31 -0
- package/python3.4.2/lib/python3.4/test/keycert2.pem +31 -0
- package/python3.4.2/lib/python3.4/test/keycert3.pem +73 -0
- package/python3.4.2/lib/python3.4/test/keycert4.pem +73 -0
- package/python3.4.2/lib/python3.4/test/list_tests.py +585 -0
- package/python3.4.2/lib/python3.4/test/lock_tests.py +896 -0
- package/python3.4.2/lib/python3.4/test/mailcap.txt +39 -0
- package/python3.4.2/lib/python3.4/test/make_ssl_certs.py +176 -0
- package/python3.4.2/lib/python3.4/test/mapping_tests.py +657 -0
- package/python3.4.2/lib/python3.4/test/math_testcases.txt +633 -0
- package/python3.4.2/lib/python3.4/test/memory_watchdog.py +28 -0
- package/python3.4.2/lib/python3.4/test/mime.types +1445 -0
- package/python3.4.2/lib/python3.4/test/mock_socket.py +156 -0
- package/python3.4.2/lib/python3.4/test/mp_fork_bomb.py +18 -0
- package/python3.4.2/lib/python3.4/test/multibytecodec_support.py +377 -0
- package/python3.4.2/lib/python3.4/test/nokia.pem +31 -0
- package/python3.4.2/lib/python3.4/test/nullbytecert.pem +90 -0
- package/python3.4.2/lib/python3.4/test/nullcert.pem +0 -0
- package/python3.4.2/lib/python3.4/test/outstanding_bugs.py +18 -0
- package/python3.4.2/lib/python3.4/test/pickletester.py +2253 -0
- package/python3.4.2/lib/python3.4/test/profilee.py +115 -0
- package/python3.4.2/lib/python3.4/test/pstats.pck +0 -0
- package/python3.4.2/lib/python3.4/test/pycacert.pem +78 -0
- package/python3.4.2/lib/python3.4/test/pycakey.pem +28 -0
- package/python3.4.2/lib/python3.4/test/pyclbr_input.py +33 -0
- package/python3.4.2/lib/python3.4/test/pydoc_mod.py +37 -0
- package/python3.4.2/lib/python3.4/test/pydocfodder.py +216 -0
- package/python3.4.2/lib/python3.4/test/pystone.py +277 -0
- package/python3.4.2/lib/python3.4/test/randv2_32.pck +633 -0
- package/python3.4.2/lib/python3.4/test/randv2_64.pck +633 -0
- package/python3.4.2/lib/python3.4/test/randv3.pck +633 -0
- package/python3.4.2/lib/python3.4/test/re_tests.py +670 -0
- package/python3.4.2/lib/python3.4/test/regrtest.py +1589 -0
- package/python3.4.2/lib/python3.4/test/relimport.py +1 -0
- package/python3.4.2/lib/python3.4/test/reperf.py +23 -0
- package/python3.4.2/lib/python3.4/test/revocation.crl +11 -0
- package/python3.4.2/lib/python3.4/test/sample_doctest.py +76 -0
- package/python3.4.2/lib/python3.4/test/sample_doctest_no_docstrings.py +12 -0
- package/python3.4.2/lib/python3.4/test/sample_doctest_no_doctests.py +15 -0
- package/python3.4.2/lib/python3.4/test/script_helper.py +178 -0
- package/python3.4.2/lib/python3.4/test/seq_tests.py +397 -0
- package/python3.4.2/lib/python3.4/test/sgml_input.html +212 -0
- package/python3.4.2/lib/python3.4/test/sha256.pem +128 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/README +12 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.8svx +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.aifc +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.aiff +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.au +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.hcom +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.sndt +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.voc +0 -0
- package/python3.4.2/lib/python3.4/test/sndhdrdata/sndhdr.wav +0 -0
- package/python3.4.2/lib/python3.4/test/sortperf.py +169 -0
- package/python3.4.2/lib/python3.4/test/ssl_cert.pem +15 -0
- package/python3.4.2/lib/python3.4/test/ssl_key.passwd.pem +18 -0
- package/python3.4.2/lib/python3.4/test/ssl_key.pem +16 -0
- package/python3.4.2/lib/python3.4/test/ssl_servers.py +205 -0
- package/python3.4.2/lib/python3.4/test/ssltests.py +22 -0
- package/python3.4.2/lib/python3.4/test/string_tests.py +1385 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/fd_status.py +34 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/input_reader.py +7 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/qcat.py +7 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/qgrep.py +10 -0
- package/python3.4.2/lib/python3.4/test/subprocessdata/sigchild_ignore.py +15 -0
- package/python3.4.2/lib/python3.4/test/support/__init__.py +2241 -0
- package/python3.4.2/lib/python3.4/test/test___all__.py +117 -0
- package/python3.4.2/lib/python3.4/test/test___future__.py +65 -0
- package/python3.4.2/lib/python3.4/test/test__locale.py +170 -0
- package/python3.4.2/lib/python3.4/test/test__opcode.py +23 -0
- package/python3.4.2/lib/python3.4/test/test__osx_support.py +281 -0
- package/python3.4.2/lib/python3.4/test/test_abc.py +408 -0
- package/python3.4.2/lib/python3.4/test/test_abstract_numbers.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_aifc.py +384 -0
- package/python3.4.2/lib/python3.4/test/test_argparse.py +4979 -0
- package/python3.4.2/lib/python3.4/test/test_array.py +1323 -0
- package/python3.4.2/lib/python3.4/test/test_ast.py +1038 -0
- package/python3.4.2/lib/python3.4/test/test_asynchat.py +333 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/__init__.py +10 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/echo.py +8 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/echo2.py +6 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/echo3.py +11 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/keycert3.pem +73 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/pycacert.pem +78 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/ssl_cert.pem +15 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/ssl_key.pem +16 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_base_events.py +1064 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_events.py +2240 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_futures.py +442 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_locks.py +858 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_proactor_events.py +492 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_queues.py +476 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_selector_events.py +1737 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_streams.py +628 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_subprocess.py +217 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_tasks.py +1977 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_transports.py +90 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_unix_events.py +1582 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_windows_events.py +141 -0
- package/python3.4.2/lib/python3.4/test/test_asyncio/test_windows_utils.py +171 -0
- package/python3.4.2/lib/python3.4/test/test_asyncore.py +859 -0
- package/python3.4.2/lib/python3.4/test/test_atexit.py +185 -0
- package/python3.4.2/lib/python3.4/test/test_audioop.py +534 -0
- package/python3.4.2/lib/python3.4/test/test_augassign.py +315 -0
- package/python3.4.2/lib/python3.4/test/test_base64.py +666 -0
- package/python3.4.2/lib/python3.4/test/test_bigaddrspace.py +101 -0
- package/python3.4.2/lib/python3.4/test/test_bigmem.py +1257 -0
- package/python3.4.2/lib/python3.4/test/test_binascii.py +270 -0
- package/python3.4.2/lib/python3.4/test/test_binhex.py +56 -0
- package/python3.4.2/lib/python3.4/test/test_binop.py +380 -0
- package/python3.4.2/lib/python3.4/test/test_bisect.py +328 -0
- package/python3.4.2/lib/python3.4/test/test_bool.py +347 -0
- package/python3.4.2/lib/python3.4/test/test_buffer.py +4294 -0
- package/python3.4.2/lib/python3.4/test/test_bufio.py +73 -0
- package/python3.4.2/lib/python3.4/test/test_builtin.py +1637 -0
- package/python3.4.2/lib/python3.4/test/test_bytes.py +1433 -0
- package/python3.4.2/lib/python3.4/test/test_bz2.py +880 -0
- package/python3.4.2/lib/python3.4/test/test_calendar.py +714 -0
- package/python3.4.2/lib/python3.4/test/test_call.py +131 -0
- package/python3.4.2/lib/python3.4/test/test_capi.py +469 -0
- package/python3.4.2/lib/python3.4/test/test_cgi.py +489 -0
- package/python3.4.2/lib/python3.4/test/test_cgitb.py +70 -0
- package/python3.4.2/lib/python3.4/test/test_charmapcodec.py +56 -0
- package/python3.4.2/lib/python3.4/test/test_class.py +552 -0
- package/python3.4.2/lib/python3.4/test/test_cmath.py +536 -0
- package/python3.4.2/lib/python3.4/test/test_cmd.py +243 -0
- package/python3.4.2/lib/python3.4/test/test_cmd_line.py +473 -0
- package/python3.4.2/lib/python3.4/test/test_cmd_line_script.py +481 -0
- package/python3.4.2/lib/python3.4/test/test_code.py +170 -0
- package/python3.4.2/lib/python3.4/test/test_code_module.py +86 -0
- package/python3.4.2/lib/python3.4/test/test_codeccallbacks.py +880 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_cn.py +90 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_hk.py +26 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_iso2022.py +45 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_jp.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_kr.py +73 -0
- package/python3.4.2/lib/python3.4/test/test_codecencodings_tw.py +26 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_cn.py +29 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_hk.py +16 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_jp.py +63 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_kr.py +40 -0
- package/python3.4.2/lib/python3.4/test/test_codecmaps_tw.py +30 -0
- package/python3.4.2/lib/python3.4/test/test_codecs.py +2901 -0
- package/python3.4.2/lib/python3.4/test/test_codeop.py +304 -0
- package/python3.4.2/lib/python3.4/test/test_collections.py +1552 -0
- package/python3.4.2/lib/python3.4/test/test_colorsys.py +100 -0
- package/python3.4.2/lib/python3.4/test/test_compare.py +67 -0
- package/python3.4.2/lib/python3.4/test/test_compile.py +561 -0
- package/python3.4.2/lib/python3.4/test/test_compileall.py +384 -0
- package/python3.4.2/lib/python3.4/test/test_complex.py +638 -0
- package/python3.4.2/lib/python3.4/test/test_concurrent_futures.py +685 -0
- package/python3.4.2/lib/python3.4/test/test_configparser.py +1768 -0
- package/python3.4.2/lib/python3.4/test/test_contains.py +93 -0
- package/python3.4.2/lib/python3.4/test/test_contextlib.py +828 -0
- package/python3.4.2/lib/python3.4/test/test_copy.py +759 -0
- package/python3.4.2/lib/python3.4/test/test_copyreg.py +121 -0
- package/python3.4.2/lib/python3.4/test/test_cprofile.py +98 -0
- package/python3.4.2/lib/python3.4/test/test_crashers.py +38 -0
- package/python3.4.2/lib/python3.4/test/test_crypt.py +33 -0
- package/python3.4.2/lib/python3.4/test/test_csv.py +1074 -0
- package/python3.4.2/lib/python3.4/test/test_ctypes.py +6 -0
- package/python3.4.2/lib/python3.4/test/test_curses.py +395 -0
- package/python3.4.2/lib/python3.4/test/test_datetime.py +48 -0
- package/python3.4.2/lib/python3.4/test/test_dbm.py +193 -0
- package/python3.4.2/lib/python3.4/test/test_dbm_dumb.py +228 -0
- package/python3.4.2/lib/python3.4/test/test_dbm_gnu.py +97 -0
- package/python3.4.2/lib/python3.4/test/test_dbm_ndbm.py +54 -0
- package/python3.4.2/lib/python3.4/test/test_decimal.py +5504 -0
- package/python3.4.2/lib/python3.4/test/test_decorators.py +309 -0
- package/python3.4.2/lib/python3.4/test/test_defaultdict.py +190 -0
- package/python3.4.2/lib/python3.4/test/test_deque.py +817 -0
- package/python3.4.2/lib/python3.4/test/test_descr.py +5006 -0
- package/python3.4.2/lib/python3.4/test/test_descrtut.py +485 -0
- package/python3.4.2/lib/python3.4/test/test_devpoll.py +146 -0
- package/python3.4.2/lib/python3.4/test/test_dict.py +928 -0
- package/python3.4.2/lib/python3.4/test/test_dictcomps.py +88 -0
- package/python3.4.2/lib/python3.4/test/test_dictviews.py +206 -0
- package/python3.4.2/lib/python3.4/test/test_difflib.py +298 -0
- package/python3.4.2/lib/python3.4/test/test_difflib_expect.html +526 -0
- package/python3.4.2/lib/python3.4/test/test_dis.py +832 -0
- package/python3.4.2/lib/python3.4/test/test_distutils.py +18 -0
- package/python3.4.2/lib/python3.4/test/test_doctest.py +2921 -0
- package/python3.4.2/lib/python3.4/test/test_doctest.txt +17 -0
- package/python3.4.2/lib/python3.4/test/test_doctest2.py +123 -0
- package/python3.4.2/lib/python3.4/test/test_doctest2.txt +14 -0
- package/python3.4.2/lib/python3.4/test/test_doctest3.txt +5 -0
- package/python3.4.2/lib/python3.4/test/test_doctest4.txt +11 -0
- package/python3.4.2/lib/python3.4/test/test_docxmlrpc.py +219 -0
- package/python3.4.2/lib/python3.4/test/test_dummy_thread.py +182 -0
- package/python3.4.2/lib/python3.4/test/test_dummy_threading.py +64 -0
- package/python3.4.2/lib/python3.4/test/test_dynamic.py +143 -0
- package/python3.4.2/lib/python3.4/test/test_dynamicclassattribute.py +304 -0
- package/python3.4.2/lib/python3.4/test/test_email/__init__.py +159 -0
- package/python3.4.2/lib/python3.4/test/test_email/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/PyBanner048.gif +0 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/audiotest.au +0 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_01.txt +19 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_02.txt +136 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_03.txt +16 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_04.txt +37 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_05.txt +28 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_06.txt +33 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_07.txt +83 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_08.txt +24 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_09.txt +24 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_10.txt +39 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_11.txt +7 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_12.txt +36 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_12a.txt +38 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_13.txt +94 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_14.txt +23 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_15.txt +52 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_16.txt +123 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_17.txt +12 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_18.txt +6 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_19.txt +43 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_20.txt +22 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_21.txt +20 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_22.txt +46 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_23.txt +8 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_24.txt +10 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_25.txt +117 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_26.txt +46 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_27.txt +15 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_28.txt +25 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_29.txt +22 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_30.txt +23 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_31.txt +15 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_32.txt +14 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_33.txt +29 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_34.txt +19 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_35.txt +4 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_36.txt +40 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_37.txt +22 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_38.txt +101 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_39.txt +83 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_40.txt +10 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_41.txt +8 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_42.txt +20 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_43.txt +217 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_44.txt +33 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_45.txt +33 -0
- package/python3.4.2/lib/python3.4/test/test_email/data/msg_46.txt +23 -0
- package/python3.4.2/lib/python3.4/test/test_email/test__encoded_words.py +192 -0
- package/python3.4.2/lib/python3.4/test/test_email/test__header_value_parser.py +2606 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_asian_codecs.py +82 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_contentmanager.py +796 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_defect_handling.py +320 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_email.py +5289 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_generator.py +199 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_headerregistry.py +1594 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_inversion.py +49 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_message.py +783 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_parser.py +36 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_pickleable.py +74 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_policy.py +332 -0
- package/python3.4.2/lib/python3.4/test/test_email/test_utils.py +140 -0
- package/python3.4.2/lib/python3.4/test/test_email/torture_test.py +136 -0
- package/python3.4.2/lib/python3.4/test/test_ensurepip.py +345 -0
- package/python3.4.2/lib/python3.4/test/test_enum.py +1592 -0
- package/python3.4.2/lib/python3.4/test/test_enumerate.py +272 -0
- package/python3.4.2/lib/python3.4/test/test_eof.py +31 -0
- package/python3.4.2/lib/python3.4/test/test_epoll.py +259 -0
- package/python3.4.2/lib/python3.4/test/test_errno.py +40 -0
- package/python3.4.2/lib/python3.4/test/test_exception_variations.py +180 -0
- package/python3.4.2/lib/python3.4/test/test_exceptions.py +978 -0
- package/python3.4.2/lib/python3.4/test/test_extcall.py +349 -0
- package/python3.4.2/lib/python3.4/test/test_faulthandler.py +623 -0
- package/python3.4.2/lib/python3.4/test/test_fcntl.py +152 -0
- package/python3.4.2/lib/python3.4/test/test_file.py +329 -0
- package/python3.4.2/lib/python3.4/test/test_file_eintr.py +236 -0
- package/python3.4.2/lib/python3.4/test/test_filecmp.py +217 -0
- package/python3.4.2/lib/python3.4/test/test_fileinput.py +891 -0
- package/python3.4.2/lib/python3.4/test/test_fileio.py +480 -0
- package/python3.4.2/lib/python3.4/test/test_finalization.py +522 -0
- package/python3.4.2/lib/python3.4/test/test_float.py +1312 -0
- package/python3.4.2/lib/python3.4/test/test_flufl.py +27 -0
- package/python3.4.2/lib/python3.4/test/test_fnmatch.py +89 -0
- package/python3.4.2/lib/python3.4/test/test_fork1.py +111 -0
- package/python3.4.2/lib/python3.4/test/test_format.py +362 -0
- package/python3.4.2/lib/python3.4/test/test_fractions.py +612 -0
- package/python3.4.2/lib/python3.4/test/test_frame.py +168 -0
- package/python3.4.2/lib/python3.4/test/test_ftplib.py +1080 -0
- package/python3.4.2/lib/python3.4/test/test_funcattrs.py +385 -0
- package/python3.4.2/lib/python3.4/test/test_functools.py +1584 -0
- package/python3.4.2/lib/python3.4/test/test_future.py +125 -0
- package/python3.4.2/lib/python3.4/test/test_future3.py +26 -0
- package/python3.4.2/lib/python3.4/test/test_future4.py +6 -0
- package/python3.4.2/lib/python3.4/test/test_future5.py +21 -0
- package/python3.4.2/lib/python3.4/test/test_gc.py +1013 -0
- package/python3.4.2/lib/python3.4/test/test_gdb.py +870 -0
- package/python3.4.2/lib/python3.4/test/test_generators.py +1940 -0
- package/python3.4.2/lib/python3.4/test/test_genericpath.py +439 -0
- package/python3.4.2/lib/python3.4/test/test_genexps.py +285 -0
- package/python3.4.2/lib/python3.4/test/test_getargs2.py +615 -0
- package/python3.4.2/lib/python3.4/test/test_getopt.py +187 -0
- package/python3.4.2/lib/python3.4/test/test_getpass.py +163 -0
- package/python3.4.2/lib/python3.4/test/test_gettext.py +467 -0
- package/python3.4.2/lib/python3.4/test/test_glob.py +200 -0
- package/python3.4.2/lib/python3.4/test/test_global.py +61 -0
- package/python3.4.2/lib/python3.4/test/test_grammar.py +1024 -0
- package/python3.4.2/lib/python3.4/test/test_grp.py +99 -0
- package/python3.4.2/lib/python3.4/test/test_gzip.py +561 -0
- package/python3.4.2/lib/python3.4/test/test_hash.py +346 -0
- package/python3.4.2/lib/python3.4/test/test_hashlib.py +533 -0
- package/python3.4.2/lib/python3.4/test/test_heapq.py +417 -0
- package/python3.4.2/lib/python3.4/test/test_hmac.py +506 -0
- package/python3.4.2/lib/python3.4/test/test_html.py +104 -0
- package/python3.4.2/lib/python3.4/test/test_htmlparser.py +832 -0
- package/python3.4.2/lib/python3.4/test/test_http_cookiejar.py +1714 -0
- package/python3.4.2/lib/python3.4/test/test_http_cookies.py +243 -0
- package/python3.4.2/lib/python3.4/test/test_httplib.py +1025 -0
- package/python3.4.2/lib/python3.4/test/test_httpservers.py +770 -0
- package/python3.4.2/lib/python3.4/test/test_idle.py +16 -0
- package/python3.4.2/lib/python3.4/test/test_imaplib.py +504 -0
- package/python3.4.2/lib/python3.4/test/test_imghdr.py +131 -0
- package/python3.4.2/lib/python3.4/test/test_imp.py +485 -0
- package/python3.4.2/lib/python3.4/test/test_import.py +1072 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/abc.py +94 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/test_finder.py +85 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/test_loader.py +106 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/builtin/util.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_case_sensitivity.py +51 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_finder.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_loader.py +86 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/test_path_hook.py +32 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/extension/util.py +19 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/test_finder.py +80 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/frozen/test_loader.py +222 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test___loader__.py +70 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test___package__.py +133 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_api.py +94 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_caching.py +92 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_fromlist.py +129 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_meta_path.py +119 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_packages.py +110 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_path.py +144 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/test_relative_imports.py +216 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/import_/util.py +20 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/both_portions/foo/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/both_portions/foo/two.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/missing_directory.zip +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test/empty +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/nested_portion1.zip +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/portion1/foo/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/portion2/foo/two.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project1/parent/child/one.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project2/parent/child/two.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/project3/parent/child/three.py +1 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/namespace_pkgs/top_level_portion1.zip +0 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/regrtest.py +17 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/__init__.py +5 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_case_sensitivity.py +83 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_file_loader.py +588 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_finder.py +232 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_path_hook.py +30 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/test_source_encoding.py +165 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/source/util.py +96 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_abc.py +951 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_api.py +437 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_locks.py +156 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_namespace_pkgs.py +293 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_spec.py +957 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_util.py +592 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/test_windows.py +29 -0
- package/python3.4.2/lib/python3.4/test/test_importlib/util.py +225 -0
- package/python3.4.2/lib/python3.4/test/test_index.py +275 -0
- package/python3.4.2/lib/python3.4/test/test_inspect.py +3103 -0
- package/python3.4.2/lib/python3.4/test/test_int.py +458 -0
- package/python3.4.2/lib/python3.4/test/test_int_literal.py +147 -0
- package/python3.4.2/lib/python3.4/test/test_io.py +3481 -0
- package/python3.4.2/lib/python3.4/test/test_ioctl.py +91 -0
- package/python3.4.2/lib/python3.4/test/test_ipaddress.py +1693 -0
- package/python3.4.2/lib/python3.4/test/test_isinstance.py +289 -0
- package/python3.4.2/lib/python3.4/test/test_iter.py +927 -0
- package/python3.4.2/lib/python3.4/test/test_iterlen.py +229 -0
- package/python3.4.2/lib/python3.4/test/test_itertools.py +2142 -0
- package/python3.4.2/lib/python3.4/test/test_json/__init__.py +53 -0
- package/python3.4.2/lib/python3.4/test/test_json/__main__.py +4 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_decode.py +99 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_default.py +12 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_dump.py +49 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_encode_basestring_ascii.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_enum.py +120 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_fail.py +194 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_float.py +33 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_indent.py +67 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_pass1.py +75 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_pass2.py +18 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_pass3.py +24 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_recursion.py +100 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_scanstring.py +141 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_separators.py +44 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_speedups.py +24 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_tool.py +69 -0
- package/python3.4.2/lib/python3.4/test/test_json/test_unicode.py +75 -0
- package/python3.4.2/lib/python3.4/test/test_keyword.py +138 -0
- package/python3.4.2/lib/python3.4/test/test_keywordonlyarg.py +193 -0
- package/python3.4.2/lib/python3.4/test/test_kqueue.py +219 -0
- package/python3.4.2/lib/python3.4/test/test_largefile.py +180 -0
- package/python3.4.2/lib/python3.4/test/test_lib2to3.py +22 -0
- package/python3.4.2/lib/python3.4/test/test_linecache.py +133 -0
- package/python3.4.2/lib/python3.4/test/test_list.py +125 -0
- package/python3.4.2/lib/python3.4/test/test_listcomps.py +148 -0
- package/python3.4.2/lib/python3.4/test/test_locale.py +528 -0
- package/python3.4.2/lib/python3.4/test/test_logging.py +4179 -0
- package/python3.4.2/lib/python3.4/test/test_long.py +1250 -0
- package/python3.4.2/lib/python3.4/test/test_longexp.py +14 -0
- package/python3.4.2/lib/python3.4/test/test_lzma.py +1592 -0
- package/python3.4.2/lib/python3.4/test/test_macpath.py +123 -0
- package/python3.4.2/lib/python3.4/test/test_macurl2path.py +31 -0
- package/python3.4.2/lib/python3.4/test/test_mailbox.py +2287 -0
- package/python3.4.2/lib/python3.4/test/test_mailcap.py +221 -0
- package/python3.4.2/lib/python3.4/test/test_marshal.py +451 -0
- package/python3.4.2/lib/python3.4/test/test_math.py +1107 -0
- package/python3.4.2/lib/python3.4/test/test_memoryio.py +784 -0
- package/python3.4.2/lib/python3.4/test/test_memoryview.py +478 -0
- package/python3.4.2/lib/python3.4/test/test_metaclass.py +265 -0
- package/python3.4.2/lib/python3.4/test/test_mimetypes.py +111 -0
- package/python3.4.2/lib/python3.4/test/test_minidom.py +1545 -0
- package/python3.4.2/lib/python3.4/test/test_mmap.py +774 -0
- package/python3.4.2/lib/python3.4/test/test_module.py +222 -0
- package/python3.4.2/lib/python3.4/test/test_modulefinder.py +324 -0
- package/python3.4.2/lib/python3.4/test/test_msilib.py +46 -0
- package/python3.4.2/lib/python3.4/test/test_multibytecodec.py +263 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_fork.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_forkserver.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_main_handling.py +289 -0
- package/python3.4.2/lib/python3.4/test/test_multiprocessing_spawn.py +7 -0
- package/python3.4.2/lib/python3.4/test/test_netrc.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_nis.py +43 -0
- package/python3.4.2/lib/python3.4/test/test_nntplib.py +1429 -0
- package/python3.4.2/lib/python3.4/test/test_normalization.py +104 -0
- package/python3.4.2/lib/python3.4/test/test_ntpath.py +385 -0
- package/python3.4.2/lib/python3.4/test/test_numeric_tower.py +206 -0
- package/python3.4.2/lib/python3.4/test/test_opcodes.py +112 -0
- package/python3.4.2/lib/python3.4/test/test_openpty.py +25 -0
- package/python3.4.2/lib/python3.4/test/test_operator.py +484 -0
- package/python3.4.2/lib/python3.4/test/test_optparse.py +1657 -0
- package/python3.4.2/lib/python3.4/test/test_os.py +2550 -0
- package/python3.4.2/lib/python3.4/test/test_ossaudiodev.py +202 -0
- package/python3.4.2/lib/python3.4/test/test_osx_env.py +34 -0
- package/python3.4.2/lib/python3.4/test/test_parser.py +745 -0
- package/python3.4.2/lib/python3.4/test/test_pathlib.py +1884 -0
- package/python3.4.2/lib/python3.4/test/test_pdb.py +1052 -0
- package/python3.4.2/lib/python3.4/test/test_peepholer.py +339 -0
- package/python3.4.2/lib/python3.4/test/test_pep247.py +70 -0
- package/python3.4.2/lib/python3.4/test/test_pep277.py +201 -0
- package/python3.4.2/lib/python3.4/test/test_pep292.py +247 -0
- package/python3.4.2/lib/python3.4/test/test_pep3120.py +47 -0
- package/python3.4.2/lib/python3.4/test/test_pep3131.py +35 -0
- package/python3.4.2/lib/python3.4/test/test_pep3151.py +209 -0
- package/python3.4.2/lib/python3.4/test/test_pep352.py +184 -0
- package/python3.4.2/lib/python3.4/test/test_pep380.py +1023 -0
- package/python3.4.2/lib/python3.4/test/test_pickle.py +156 -0
- package/python3.4.2/lib/python3.4/test/test_pickletools.py +25 -0
- package/python3.4.2/lib/python3.4/test/test_pipes.py +196 -0
- package/python3.4.2/lib/python3.4/test/test_pkg.py +299 -0
- package/python3.4.2/lib/python3.4/test/test_pkgimport.py +84 -0
- package/python3.4.2/lib/python3.4/test/test_pkgutil.py +410 -0
- package/python3.4.2/lib/python3.4/test/test_platform.py +320 -0
- package/python3.4.2/lib/python3.4/test/test_plistlib.py +526 -0
- package/python3.4.2/lib/python3.4/test/test_poll.py +215 -0
- package/python3.4.2/lib/python3.4/test/test_popen.py +64 -0
- package/python3.4.2/lib/python3.4/test/test_poplib.py +507 -0
- package/python3.4.2/lib/python3.4/test/test_posix.py +1183 -0
- package/python3.4.2/lib/python3.4/test/test_posixpath.py +544 -0
- package/python3.4.2/lib/python3.4/test/test_pow.py +129 -0
- package/python3.4.2/lib/python3.4/test/test_pprint.py +602 -0
- package/python3.4.2/lib/python3.4/test/test_print.py +132 -0
- package/python3.4.2/lib/python3.4/test/test_profile.py +187 -0
- package/python3.4.2/lib/python3.4/test/test_property.py +254 -0
- package/python3.4.2/lib/python3.4/test/test_pstats.py +45 -0
- package/python3.4.2/lib/python3.4/test/test_pty.py +302 -0
- package/python3.4.2/lib/python3.4/test/test_pulldom.py +347 -0
- package/python3.4.2/lib/python3.4/test/test_pwd.py +114 -0
- package/python3.4.2/lib/python3.4/test/test_py_compile.py +103 -0
- package/python3.4.2/lib/python3.4/test/test_pyclbr.py +181 -0
- package/python3.4.2/lib/python3.4/test/test_pydoc.py +1003 -0
- package/python3.4.2/lib/python3.4/test/test_pyexpat.py +708 -0
- package/python3.4.2/lib/python3.4/test/test_queue.py +363 -0
- package/python3.4.2/lib/python3.4/test/test_quopri.py +208 -0
- package/python3.4.2/lib/python3.4/test/test_raise.py +422 -0
- package/python3.4.2/lib/python3.4/test/test_random.py +759 -0
- package/python3.4.2/lib/python3.4/test/test_range.py +652 -0
- package/python3.4.2/lib/python3.4/test/test_re.py +1451 -0
- package/python3.4.2/lib/python3.4/test/test_readline.py +60 -0
- package/python3.4.2/lib/python3.4/test/test_regrtest.py +275 -0
- package/python3.4.2/lib/python3.4/test/test_reprlib.py +383 -0
- package/python3.4.2/lib/python3.4/test/test_resource.py +166 -0
- package/python3.4.2/lib/python3.4/test/test_richcmp.py +333 -0
- package/python3.4.2/lib/python3.4/test/test_rlcompleter.py +73 -0
- package/python3.4.2/lib/python3.4/test/test_robotparser.py +320 -0
- package/python3.4.2/lib/python3.4/test/test_runpy.py +691 -0
- package/python3.4.2/lib/python3.4/test/test_sax.py +1007 -0
- package/python3.4.2/lib/python3.4/test/test_sched.py +199 -0
- package/python3.4.2/lib/python3.4/test/test_scope.py +764 -0
- package/python3.4.2/lib/python3.4/test/test_select.py +83 -0
- package/python3.4.2/lib/python3.4/test/test_selectors.py +453 -0
- package/python3.4.2/lib/python3.4/test/test_set.py +1839 -0
- package/python3.4.2/lib/python3.4/test/test_setcomps.py +151 -0
- package/python3.4.2/lib/python3.4/test/test_shelve.py +224 -0
- package/python3.4.2/lib/python3.4/test/test_shlex.py +202 -0
- package/python3.4.2/lib/python3.4/test/test_shutil.py +1766 -0
- package/python3.4.2/lib/python3.4/test/test_signal.py +940 -0
- package/python3.4.2/lib/python3.4/test/test_site.py +468 -0
- package/python3.4.2/lib/python3.4/test/test_slice.py +247 -0
- package/python3.4.2/lib/python3.4/test/test_smtpd.py +557 -0
- package/python3.4.2/lib/python3.4/test/test_smtplib.py +950 -0
- package/python3.4.2/lib/python3.4/test/test_smtpnet.py +86 -0
- package/python3.4.2/lib/python3.4/test/test_sndhdr.py +23 -0
- package/python3.4.2/lib/python3.4/test/test_socket.py +5163 -0
- package/python3.4.2/lib/python3.4/test/test_socketserver.py +314 -0
- package/python3.4.2/lib/python3.4/test/test_sort.py +285 -0
- package/python3.4.2/lib/python3.4/test/test_source_encoding.py +145 -0
- package/python3.4.2/lib/python3.4/test/test_spwd.py +60 -0
- package/python3.4.2/lib/python3.4/test/test_sqlite.py +24 -0
- package/python3.4.2/lib/python3.4/test/test_ssl.py +2908 -0
- package/python3.4.2/lib/python3.4/test/test_startfile.py +37 -0
- package/python3.4.2/lib/python3.4/test/test_stat.py +202 -0
- package/python3.4.2/lib/python3.4/test/test_statistics.py +1574 -0
- package/python3.4.2/lib/python3.4/test/test_strftime.py +204 -0
- package/python3.4.2/lib/python3.4/test/test_string.py +174 -0
- package/python3.4.2/lib/python3.4/test/test_stringprep.py +96 -0
- package/python3.4.2/lib/python3.4/test/test_strlit.py +206 -0
- package/python3.4.2/lib/python3.4/test/test_strptime.py +577 -0
- package/python3.4.2/lib/python3.4/test/test_strtod.py +436 -0
- package/python3.4.2/lib/python3.4/test/test_struct.py +667 -0
- package/python3.4.2/lib/python3.4/test/test_structmembers.py +147 -0
- package/python3.4.2/lib/python3.4/test/test_structseq.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_subprocess.py +2474 -0
- package/python3.4.2/lib/python3.4/test/test_sunau.py +122 -0
- package/python3.4.2/lib/python3.4/test/test_sundry.py +59 -0
- package/python3.4.2/lib/python3.4/test/test_super.py +181 -0
- package/python3.4.2/lib/python3.4/test/test_support.py +315 -0
- package/python3.4.2/lib/python3.4/test/test_symtable.py +176 -0
- package/python3.4.2/lib/python3.4/test/test_syntax.py +593 -0
- package/python3.4.2/lib/python3.4/test/test_sys.py +1000 -0
- package/python3.4.2/lib/python3.4/test/test_sys_setprofile.py +386 -0
- package/python3.4.2/lib/python3.4/test/test_sys_settrace.py +834 -0
- package/python3.4.2/lib/python3.4/test/test_sysconfig.py +423 -0
- package/python3.4.2/lib/python3.4/test/test_syslog.py +43 -0
- package/python3.4.2/lib/python3.4/test/test_tarfile.py +2180 -0
- package/python3.4.2/lib/python3.4/test/test_tcl.py +642 -0
- package/python3.4.2/lib/python3.4/test/test_telnetlib.py +401 -0
- package/python3.4.2/lib/python3.4/test/test_tempfile.py +1248 -0
- package/python3.4.2/lib/python3.4/test/test_textwrap.py +929 -0
- package/python3.4.2/lib/python3.4/test/test_thread.py +260 -0
- package/python3.4.2/lib/python3.4/test/test_threaded_import.py +244 -0
- package/python3.4.2/lib/python3.4/test/test_threadedtempfile.py +78 -0
- package/python3.4.2/lib/python3.4/test/test_threading.py +1021 -0
- package/python3.4.2/lib/python3.4/test/test_threading_local.py +225 -0
- package/python3.4.2/lib/python3.4/test/test_threadsignals.py +227 -0
- package/python3.4.2/lib/python3.4/test/test_time.py +763 -0
- package/python3.4.2/lib/python3.4/test/test_timeit.py +306 -0
- package/python3.4.2/lib/python3.4/test/test_timeout.py +303 -0
- package/python3.4.2/lib/python3.4/test/test_tk.py +18 -0
- package/python3.4.2/lib/python3.4/test/test_tokenize.py +1233 -0
- package/python3.4.2/lib/python3.4/test/test_trace.py +415 -0
- package/python3.4.2/lib/python3.4/test/test_traceback.py +451 -0
- package/python3.4.2/lib/python3.4/test/test_tracemalloc.py +826 -0
- package/python3.4.2/lib/python3.4/test/test_ttk_guionly.py +37 -0
- package/python3.4.2/lib/python3.4/test/test_ttk_textonly.py +17 -0
- package/python3.4.2/lib/python3.4/test/test_tuple.py +208 -0
- package/python3.4.2/lib/python3.4/test/test_typechecks.py +76 -0
- package/python3.4.2/lib/python3.4/test/test_types.py +1178 -0
- package/python3.4.2/lib/python3.4/test/test_ucn.py +240 -0
- package/python3.4.2/lib/python3.4/test/test_unary.py +58 -0
- package/python3.4.2/lib/python3.4/test/test_unicode.py +2596 -0
- package/python3.4.2/lib/python3.4/test/test_unicode_file.py +144 -0
- package/python3.4.2/lib/python3.4/test/test_unicodedata.py +323 -0
- package/python3.4.2/lib/python3.4/test/test_unittest.py +16 -0
- package/python3.4.2/lib/python3.4/test/test_univnewlines.py +123 -0
- package/python3.4.2/lib/python3.4/test/test_unpack.py +130 -0
- package/python3.4.2/lib/python3.4/test/test_unpack_ex.py +174 -0
- package/python3.4.2/lib/python3.4/test/test_urllib.py +1486 -0
- package/python3.4.2/lib/python3.4/test/test_urllib2.py +1646 -0
- package/python3.4.2/lib/python3.4/test/test_urllib2_localnet.py +690 -0
- package/python3.4.2/lib/python3.4/test/test_urllib2net.py +342 -0
- package/python3.4.2/lib/python3.4/test/test_urllib_response.py +59 -0
- package/python3.4.2/lib/python3.4/test/test_urllibnet.py +212 -0
- package/python3.4.2/lib/python3.4/test/test_urlparse.py +879 -0
- package/python3.4.2/lib/python3.4/test/test_userdict.py +199 -0
- package/python3.4.2/lib/python3.4/test/test_userlist.py +65 -0
- package/python3.4.2/lib/python3.4/test/test_userstring.py +47 -0
- package/python3.4.2/lib/python3.4/test/test_uu.py +239 -0
- package/python3.4.2/lib/python3.4/test/test_uuid.py +498 -0
- package/python3.4.2/lib/python3.4/test/test_venv.py +406 -0
- package/python3.4.2/lib/python3.4/test/test_wait3.py +38 -0
- package/python3.4.2/lib/python3.4/test/test_wait4.py +38 -0
- package/python3.4.2/lib/python3.4/test/test_warnings.py +873 -0
- package/python3.4.2/lib/python3.4/test/test_wave.py +107 -0
- package/python3.4.2/lib/python3.4/test/test_weakref.py +1801 -0
- package/python3.4.2/lib/python3.4/test/test_weakset.py +450 -0
- package/python3.4.2/lib/python3.4/test/test_webbrowser.py +192 -0
- package/python3.4.2/lib/python3.4/test/test_winreg.py +485 -0
- package/python3.4.2/lib/python3.4/test/test_winsound.py +253 -0
- package/python3.4.2/lib/python3.4/test/test_with.py +750 -0
- package/python3.4.2/lib/python3.4/test/test_wsgiref.py +640 -0
- package/python3.4.2/lib/python3.4/test/test_xdrlib.py +58 -0
- package/python3.4.2/lib/python3.4/test/test_xml_dom_minicompat.py +101 -0
- package/python3.4.2/lib/python3.4/test/test_xml_etree.py +2587 -0
- package/python3.4.2/lib/python3.4/test/test_xml_etree_c.py +94 -0
- package/python3.4.2/lib/python3.4/test/test_xmlrpc.py +1114 -0
- package/python3.4.2/lib/python3.4/test/test_xmlrpc_net.py +33 -0
- package/python3.4.2/lib/python3.4/test/test_zipfile.py +1783 -0
- package/python3.4.2/lib/python3.4/test/test_zipfile64.py +118 -0
- package/python3.4.2/lib/python3.4/test/test_zipimport.py +507 -0
- package/python3.4.2/lib/python3.4/test/test_zipimport_support.py +246 -0
- package/python3.4.2/lib/python3.4/test/test_zlib.py +725 -0
- package/python3.4.2/lib/python3.4/test/testcodec.py +48 -0
- package/python3.4.2/lib/python3.4/test/testtar.tar +0 -0
- package/python3.4.2/lib/python3.4/test/tf_inherit_check.py +25 -0
- package/python3.4.2/lib/python3.4/test/threaded_import_hangers.py +45 -0
- package/python3.4.2/lib/python3.4/test/time_hashlib.py +87 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt +13 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt +11 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt +13 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt +12 -0
- package/python3.4.2/lib/python3.4/test/tokenize_tests.txt +189 -0
- package/python3.4.2/lib/python3.4/test/tracedmodules/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/test/tracedmodules/testmod.py +9 -0
- package/python3.4.2/lib/python3.4/test/warning_tests.py +9 -0
- package/python3.4.2/lib/python3.4/test/win_console_handler.py +49 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/simple-ns.xml +7 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/simple.xml +6 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/test.xml +115 -0
- package/python3.4.2/lib/python3.4/test/xmltestdata/test.xml.out +115 -0
- package/python3.4.2/lib/python3.4/test/xmltests.py +21 -0
- package/python3.4.2/lib/python3.4/test/zip_cp437_header.zip +0 -0
- package/python3.4.2/lib/python3.4/test/zipdir.zip +0 -0
- package/python3.4.2/lib/python3.4/textwrap.py +470 -0
- package/python3.4.2/lib/python3.4/this.py +28 -0
- package/python3.4.2/lib/python3.4/threading.py +1359 -0
- package/python3.4.2/lib/python3.4/timeit.py +322 -0
- package/python3.4.2/lib/python3.4/tkinter/__init__.py +3898 -0
- package/python3.4.2/lib/python3.4/tkinter/__main__.py +7 -0
- package/python3.4.2/lib/python3.4/tkinter/_fix.py +78 -0
- package/python3.4.2/lib/python3.4/tkinter/colorchooser.py +72 -0
- package/python3.4.2/lib/python3.4/tkinter/commondialog.py +60 -0
- package/python3.4.2/lib/python3.4/tkinter/constants.py +110 -0
- package/python3.4.2/lib/python3.4/tkinter/dialog.py +49 -0
- package/python3.4.2/lib/python3.4/tkinter/dnd.py +321 -0
- package/python3.4.2/lib/python3.4/tkinter/filedialog.py +479 -0
- package/python3.4.2/lib/python3.4/tkinter/font.py +234 -0
- package/python3.4.2/lib/python3.4/tkinter/messagebox.py +134 -0
- package/python3.4.2/lib/python3.4/tkinter/scrolledtext.py +54 -0
- package/python3.4.2/lib/python3.4/tkinter/simpledialog.py +423 -0
- package/python3.4.2/lib/python3.4/tkinter/test/README +14 -0
- package/python3.4.2/lib/python3.4/tkinter/test/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/tkinter/test/runtktests.py +71 -0
- package/python3.4.2/lib/python3.4/tkinter/test/support.py +104 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_font.py +27 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py +900 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_images.py +327 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_loadtk.py +46 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_misc.py +42 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_text.py +47 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_variables.py +186 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py +1193 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_extensions.py +291 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_functions.py +462 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_style.py +92 -0
- package/python3.4.2/lib/python3.4/tkinter/test/test_ttk/test_widgets.py +1598 -0
- package/python3.4.2/lib/python3.4/tkinter/test/widget_tests.py +521 -0
- package/python3.4.2/lib/python3.4/tkinter/tix.py +1944 -0
- package/python3.4.2/lib/python3.4/tkinter/ttk.py +1616 -0
- package/python3.4.2/lib/python3.4/token.py +140 -0
- package/python3.4.2/lib/python3.4/tokenize.py +691 -0
- package/python3.4.2/lib/python3.4/trace.py +858 -0
- package/python3.4.2/lib/python3.4/traceback.py +313 -0
- package/python3.4.2/lib/python3.4/tracemalloc.py +487 -0
- package/python3.4.2/lib/python3.4/tty.py +36 -0
- package/python3.4.2/lib/python3.4/turtle.py +4140 -0
- package/python3.4.2/lib/python3.4/turtledemo/__init__.py +14 -0
- package/python3.4.2/lib/python3.4/turtledemo/__main__.py +380 -0
- package/python3.4.2/lib/python3.4/turtledemo/bytedesign.py +162 -0
- package/python3.4.2/lib/python3.4/turtledemo/chaos.py +59 -0
- package/python3.4.2/lib/python3.4/turtledemo/clock.py +132 -0
- package/python3.4.2/lib/python3.4/turtledemo/colormixer.py +58 -0
- package/python3.4.2/lib/python3.4/turtledemo/forest.py +108 -0
- package/python3.4.2/lib/python3.4/turtledemo/fractalcurves.py +138 -0
- package/python3.4.2/lib/python3.4/turtledemo/lindenmayer.py +119 -0
- package/python3.4.2/lib/python3.4/turtledemo/minimal_hanoi.py +79 -0
- package/python3.4.2/lib/python3.4/turtledemo/nim.py +226 -0
- package/python3.4.2/lib/python3.4/turtledemo/paint.py +54 -0
- package/python3.4.2/lib/python3.4/turtledemo/peace.py +61 -0
- package/python3.4.2/lib/python3.4/turtledemo/penrose.py +181 -0
- package/python3.4.2/lib/python3.4/turtledemo/planet_and_moon.py +112 -0
- package/python3.4.2/lib/python3.4/turtledemo/round_dance.py +86 -0
- package/python3.4.2/lib/python3.4/turtledemo/tree.py +63 -0
- package/python3.4.2/lib/python3.4/turtledemo/turtle.cfg +10 -0
- package/python3.4.2/lib/python3.4/turtledemo/two_canvases.py +54 -0
- package/python3.4.2/lib/python3.4/turtledemo/wikipedia.py +65 -0
- package/python3.4.2/lib/python3.4/turtledemo/yinyang.py +49 -0
- package/python3.4.2/lib/python3.4/types.py +158 -0
- package/python3.4.2/lib/python3.4/unittest/__init__.py +69 -0
- package/python3.4.2/lib/python3.4/unittest/__main__.py +18 -0
- package/python3.4.2/lib/python3.4/unittest/case.py +1400 -0
- package/python3.4.2/lib/python3.4/unittest/loader.py +379 -0
- package/python3.4.2/lib/python3.4/unittest/main.py +248 -0
- package/python3.4.2/lib/python3.4/unittest/mock.py +2330 -0
- package/python3.4.2/lib/python3.4/unittest/result.py +212 -0
- package/python3.4.2/lib/python3.4/unittest/runner.py +213 -0
- package/python3.4.2/lib/python3.4/unittest/signals.py +71 -0
- package/python3.4.2/lib/python3.4/unittest/suite.py +324 -0
- package/python3.4.2/lib/python3.4/unittest/test/__init__.py +22 -0
- package/python3.4.2/lib/python3.4/unittest/test/__main__.py +18 -0
- package/python3.4.2/lib/python3.4/unittest/test/_test_warnings.py +73 -0
- package/python3.4.2/lib/python3.4/unittest/test/dummy.py +1 -0
- package/python3.4.2/lib/python3.4/unittest/test/support.py +142 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_assertions.py +398 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_break.py +288 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_case.py +1574 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_discovery.py +527 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_functiontestcase.py +148 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_loader.py +1312 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_program.py +396 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_result.py +660 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_runner.py +346 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_setups.py +506 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_skipping.py +227 -0
- package/python3.4.2/lib/python3.4/unittest/test/test_suite.py +447 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/__init__.py +17 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/__main__.py +18 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/support.py +23 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testcallable.py +151 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testhelpers.py +908 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testmagicmethods.py +428 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testmock.py +1412 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testpatch.py +1801 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testsentinel.py +28 -0
- package/python3.4.2/lib/python3.4/unittest/test/testmock/testwith.py +259 -0
- package/python3.4.2/lib/python3.4/unittest/util.py +177 -0
- package/python3.4.2/lib/python3.4/urllib/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/urllib/error.py +76 -0
- package/python3.4.2/lib/python3.4/urllib/parse.py +973 -0
- package/python3.4.2/lib/python3.4/urllib/request.py +2559 -0
- package/python3.4.2/lib/python3.4/urllib/response.py +76 -0
- package/python3.4.2/lib/python3.4/urllib/robotparser.py +212 -0
- package/python3.4.2/lib/python3.4/uu.py +199 -0
- package/python3.4.2/lib/python3.4/uuid.py +591 -0
- package/python3.4.2/lib/python3.4/venv/__init__.py +449 -0
- package/python3.4.2/lib/python3.4/venv/__main__.py +10 -0
- package/python3.4.2/lib/python3.4/venv/scripts/posix/activate +76 -0
- package/python3.4.2/lib/python3.4/venv/scripts/posix/activate.csh +37 -0
- package/python3.4.2/lib/python3.4/venv/scripts/posix/activate.fish +74 -0
- package/python3.4.2/lib/python3.4/warnings.py +407 -0
- package/python3.4.2/lib/python3.4/wave.py +503 -0
- package/python3.4.2/lib/python3.4/weakref.py +577 -0
- package/python3.4.2/lib/python3.4/webbrowser.py +651 -0
- package/python3.4.2/lib/python3.4/wsgiref/__init__.py +23 -0
- package/python3.4.2/lib/python3.4/wsgiref/handlers.py +547 -0
- package/python3.4.2/lib/python3.4/wsgiref/headers.py +184 -0
- package/python3.4.2/lib/python3.4/wsgiref/simple_server.py +165 -0
- package/python3.4.2/lib/python3.4/wsgiref/util.py +165 -0
- package/python3.4.2/lib/python3.4/wsgiref/validate.py +443 -0
- package/python3.4.2/lib/python3.4/xdrlib.py +224 -0
- package/python3.4.2/lib/python3.4/xml/__init__.py +20 -0
- package/python3.4.2/lib/python3.4/xml/dom/NodeFilter.py +27 -0
- package/python3.4.2/lib/python3.4/xml/dom/__init__.py +140 -0
- package/python3.4.2/lib/python3.4/xml/dom/domreg.py +97 -0
- package/python3.4.2/lib/python3.4/xml/dom/expatbuilder.py +965 -0
- package/python3.4.2/lib/python3.4/xml/dom/minicompat.py +109 -0
- package/python3.4.2/lib/python3.4/xml/dom/minidom.py +1983 -0
- package/python3.4.2/lib/python3.4/xml/dom/pulldom.py +342 -0
- package/python3.4.2/lib/python3.4/xml/dom/xmlbuilder.py +386 -0
- package/python3.4.2/lib/python3.4/xml/etree/ElementInclude.py +143 -0
- package/python3.4.2/lib/python3.4/xml/etree/ElementPath.py +308 -0
- package/python3.4.2/lib/python3.4/xml/etree/ElementTree.py +1667 -0
- package/python3.4.2/lib/python3.4/xml/etree/__init__.py +33 -0
- package/python3.4.2/lib/python3.4/xml/etree/cElementTree.py +3 -0
- package/python3.4.2/lib/python3.4/xml/parsers/__init__.py +8 -0
- package/python3.4.2/lib/python3.4/xml/parsers/expat.py +8 -0
- package/python3.4.2/lib/python3.4/xml/sax/__init__.py +105 -0
- package/python3.4.2/lib/python3.4/xml/sax/_exceptions.py +131 -0
- package/python3.4.2/lib/python3.4/xml/sax/expatreader.py +417 -0
- package/python3.4.2/lib/python3.4/xml/sax/handler.py +342 -0
- package/python3.4.2/lib/python3.4/xml/sax/saxutils.py +365 -0
- package/python3.4.2/lib/python3.4/xml/sax/xmlreader.py +378 -0
- package/python3.4.2/lib/python3.4/xmlrpc/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/xmlrpc/client.py +1479 -0
- package/python3.4.2/lib/python3.4/xmlrpc/server.py +986 -0
- package/python3.4.2/lib/python3.4/zipfile.py +1788 -0
- package/python3.4.2/share/man/man1/python3.1 +460 -0
- package/python3.4.2/share/man/man1/python3.4.1 +460 -0
|
@@ -0,0 +1,2908 @@
|
|
|
1
|
+
# Test the support for SSL and sockets
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
import unittest
|
|
5
|
+
from test import support
|
|
6
|
+
import socket
|
|
7
|
+
import select
|
|
8
|
+
import time
|
|
9
|
+
import datetime
|
|
10
|
+
import gc
|
|
11
|
+
import os
|
|
12
|
+
import errno
|
|
13
|
+
import pprint
|
|
14
|
+
import tempfile
|
|
15
|
+
import urllib.request
|
|
16
|
+
import traceback
|
|
17
|
+
import asyncore
|
|
18
|
+
import weakref
|
|
19
|
+
import platform
|
|
20
|
+
import functools
|
|
21
|
+
from unittest import mock
|
|
22
|
+
|
|
23
|
+
ssl = support.import_module("ssl")
|
|
24
|
+
|
|
25
|
+
PROTOCOLS = sorted(ssl._PROTOCOL_NAMES)
|
|
26
|
+
HOST = support.HOST
|
|
27
|
+
|
|
28
|
+
def data_file(*name):
|
|
29
|
+
return os.path.join(os.path.dirname(__file__), *name)
|
|
30
|
+
|
|
31
|
+
# The custom key and certificate files used in test_ssl are generated
|
|
32
|
+
# using Lib/test/make_ssl_certs.py.
|
|
33
|
+
# Other certificates are simply fetched from the Internet servers they
|
|
34
|
+
# are meant to authenticate.
|
|
35
|
+
|
|
36
|
+
CERTFILE = data_file("keycert.pem")
|
|
37
|
+
BYTES_CERTFILE = os.fsencode(CERTFILE)
|
|
38
|
+
ONLYCERT = data_file("ssl_cert.pem")
|
|
39
|
+
ONLYKEY = data_file("ssl_key.pem")
|
|
40
|
+
BYTES_ONLYCERT = os.fsencode(ONLYCERT)
|
|
41
|
+
BYTES_ONLYKEY = os.fsencode(ONLYKEY)
|
|
42
|
+
CERTFILE_PROTECTED = data_file("keycert.passwd.pem")
|
|
43
|
+
ONLYKEY_PROTECTED = data_file("ssl_key.passwd.pem")
|
|
44
|
+
KEY_PASSWORD = "somepass"
|
|
45
|
+
CAPATH = data_file("capath")
|
|
46
|
+
BYTES_CAPATH = os.fsencode(CAPATH)
|
|
47
|
+
CAFILE_NEURONIO = data_file("capath", "4e1295a3.0")
|
|
48
|
+
CAFILE_CACERT = data_file("capath", "5ed36f99.0")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# empty CRL
|
|
52
|
+
CRLFILE = data_file("revocation.crl")
|
|
53
|
+
|
|
54
|
+
# Two keys and certs signed by the same CA (for SNI tests)
|
|
55
|
+
SIGNED_CERTFILE = data_file("keycert3.pem")
|
|
56
|
+
SIGNED_CERTFILE2 = data_file("keycert4.pem")
|
|
57
|
+
SIGNING_CA = data_file("pycacert.pem")
|
|
58
|
+
|
|
59
|
+
SVN_PYTHON_ORG_ROOT_CERT = data_file("https_svn_python_org_root.pem")
|
|
60
|
+
|
|
61
|
+
EMPTYCERT = data_file("nullcert.pem")
|
|
62
|
+
BADCERT = data_file("badcert.pem")
|
|
63
|
+
WRONGCERT = data_file("XXXnonexisting.pem")
|
|
64
|
+
BADKEY = data_file("badkey.pem")
|
|
65
|
+
NOKIACERT = data_file("nokia.pem")
|
|
66
|
+
NULLBYTECERT = data_file("nullbytecert.pem")
|
|
67
|
+
|
|
68
|
+
DHFILE = data_file("dh512.pem")
|
|
69
|
+
BYTES_DHFILE = os.fsencode(DHFILE)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def handle_error(prefix):
|
|
73
|
+
exc_format = ' '.join(traceback.format_exception(*sys.exc_info()))
|
|
74
|
+
if support.verbose:
|
|
75
|
+
sys.stdout.write(prefix + exc_format)
|
|
76
|
+
|
|
77
|
+
def can_clear_options():
|
|
78
|
+
# 0.9.8m or higher
|
|
79
|
+
return ssl._OPENSSL_API_VERSION >= (0, 9, 8, 13, 15)
|
|
80
|
+
|
|
81
|
+
def no_sslv2_implies_sslv3_hello():
|
|
82
|
+
# 0.9.7h or higher
|
|
83
|
+
return ssl.OPENSSL_VERSION_INFO >= (0, 9, 7, 8, 15)
|
|
84
|
+
|
|
85
|
+
def have_verify_flags():
|
|
86
|
+
# 0.9.8 or higher
|
|
87
|
+
return ssl.OPENSSL_VERSION_INFO >= (0, 9, 8, 0, 15)
|
|
88
|
+
|
|
89
|
+
def asn1time(cert_time):
|
|
90
|
+
# Some versions of OpenSSL ignore seconds, see #18207
|
|
91
|
+
# 0.9.8.i
|
|
92
|
+
if ssl._OPENSSL_API_VERSION == (0, 9, 8, 9, 15):
|
|
93
|
+
fmt = "%b %d %H:%M:%S %Y GMT"
|
|
94
|
+
dt = datetime.datetime.strptime(cert_time, fmt)
|
|
95
|
+
dt = dt.replace(second=0)
|
|
96
|
+
cert_time = dt.strftime(fmt)
|
|
97
|
+
# %d adds leading zero but ASN1_TIME_print() uses leading space
|
|
98
|
+
if cert_time[4] == "0":
|
|
99
|
+
cert_time = cert_time[:4] + " " + cert_time[5:]
|
|
100
|
+
|
|
101
|
+
return cert_time
|
|
102
|
+
|
|
103
|
+
# Issue #9415: Ubuntu hijacks their OpenSSL and forcefully disables SSLv2
|
|
104
|
+
def skip_if_broken_ubuntu_ssl(func):
|
|
105
|
+
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
106
|
+
@functools.wraps(func)
|
|
107
|
+
def f(*args, **kwargs):
|
|
108
|
+
try:
|
|
109
|
+
ssl.SSLContext(ssl.PROTOCOL_SSLv2)
|
|
110
|
+
except ssl.SSLError:
|
|
111
|
+
if (ssl.OPENSSL_VERSION_INFO == (0, 9, 8, 15, 15) and
|
|
112
|
+
platform.linux_distribution() == ('debian', 'squeeze/sid', '')):
|
|
113
|
+
raise unittest.SkipTest("Patched Ubuntu OpenSSL breaks behaviour")
|
|
114
|
+
return func(*args, **kwargs)
|
|
115
|
+
return f
|
|
116
|
+
else:
|
|
117
|
+
return func
|
|
118
|
+
|
|
119
|
+
needs_sni = unittest.skipUnless(ssl.HAS_SNI, "SNI support needed for this test")
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class BasicSocketTests(unittest.TestCase):
|
|
123
|
+
|
|
124
|
+
def test_constants(self):
|
|
125
|
+
ssl.CERT_NONE
|
|
126
|
+
ssl.CERT_OPTIONAL
|
|
127
|
+
ssl.CERT_REQUIRED
|
|
128
|
+
ssl.OP_CIPHER_SERVER_PREFERENCE
|
|
129
|
+
ssl.OP_SINGLE_DH_USE
|
|
130
|
+
if ssl.HAS_ECDH:
|
|
131
|
+
ssl.OP_SINGLE_ECDH_USE
|
|
132
|
+
if ssl.OPENSSL_VERSION_INFO >= (1, 0):
|
|
133
|
+
ssl.OP_NO_COMPRESSION
|
|
134
|
+
self.assertIn(ssl.HAS_SNI, {True, False})
|
|
135
|
+
self.assertIn(ssl.HAS_ECDH, {True, False})
|
|
136
|
+
|
|
137
|
+
def test_random(self):
|
|
138
|
+
v = ssl.RAND_status()
|
|
139
|
+
if support.verbose:
|
|
140
|
+
sys.stdout.write("\n RAND_status is %d (%s)\n"
|
|
141
|
+
% (v, (v and "sufficient randomness") or
|
|
142
|
+
"insufficient randomness"))
|
|
143
|
+
|
|
144
|
+
data, is_cryptographic = ssl.RAND_pseudo_bytes(16)
|
|
145
|
+
self.assertEqual(len(data), 16)
|
|
146
|
+
self.assertEqual(is_cryptographic, v == 1)
|
|
147
|
+
if v:
|
|
148
|
+
data = ssl.RAND_bytes(16)
|
|
149
|
+
self.assertEqual(len(data), 16)
|
|
150
|
+
else:
|
|
151
|
+
self.assertRaises(ssl.SSLError, ssl.RAND_bytes, 16)
|
|
152
|
+
|
|
153
|
+
# negative num is invalid
|
|
154
|
+
self.assertRaises(ValueError, ssl.RAND_bytes, -5)
|
|
155
|
+
self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5)
|
|
156
|
+
|
|
157
|
+
self.assertRaises(TypeError, ssl.RAND_egd, 1)
|
|
158
|
+
self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
|
|
159
|
+
ssl.RAND_add("this is a random string", 75.0)
|
|
160
|
+
|
|
161
|
+
@unittest.skipUnless(os.name == 'posix', 'requires posix')
|
|
162
|
+
def test_random_fork(self):
|
|
163
|
+
status = ssl.RAND_status()
|
|
164
|
+
if not status:
|
|
165
|
+
self.fail("OpenSSL's PRNG has insufficient randomness")
|
|
166
|
+
|
|
167
|
+
rfd, wfd = os.pipe()
|
|
168
|
+
pid = os.fork()
|
|
169
|
+
if pid == 0:
|
|
170
|
+
try:
|
|
171
|
+
os.close(rfd)
|
|
172
|
+
child_random = ssl.RAND_pseudo_bytes(16)[0]
|
|
173
|
+
self.assertEqual(len(child_random), 16)
|
|
174
|
+
os.write(wfd, child_random)
|
|
175
|
+
os.close(wfd)
|
|
176
|
+
except BaseException:
|
|
177
|
+
os._exit(1)
|
|
178
|
+
else:
|
|
179
|
+
os._exit(0)
|
|
180
|
+
else:
|
|
181
|
+
os.close(wfd)
|
|
182
|
+
self.addCleanup(os.close, rfd)
|
|
183
|
+
_, status = os.waitpid(pid, 0)
|
|
184
|
+
self.assertEqual(status, 0)
|
|
185
|
+
|
|
186
|
+
child_random = os.read(rfd, 16)
|
|
187
|
+
self.assertEqual(len(child_random), 16)
|
|
188
|
+
parent_random = ssl.RAND_pseudo_bytes(16)[0]
|
|
189
|
+
self.assertEqual(len(parent_random), 16)
|
|
190
|
+
|
|
191
|
+
self.assertNotEqual(child_random, parent_random)
|
|
192
|
+
|
|
193
|
+
def test_parse_cert(self):
|
|
194
|
+
# note that this uses an 'unofficial' function in _ssl.c,
|
|
195
|
+
# provided solely for this test, to exercise the certificate
|
|
196
|
+
# parsing code
|
|
197
|
+
p = ssl._ssl._test_decode_cert(CERTFILE)
|
|
198
|
+
if support.verbose:
|
|
199
|
+
sys.stdout.write("\n" + pprint.pformat(p) + "\n")
|
|
200
|
+
self.assertEqual(p['issuer'],
|
|
201
|
+
((('countryName', 'XY'),),
|
|
202
|
+
(('localityName', 'Castle Anthrax'),),
|
|
203
|
+
(('organizationName', 'Python Software Foundation'),),
|
|
204
|
+
(('commonName', 'localhost'),))
|
|
205
|
+
)
|
|
206
|
+
# Note the next three asserts will fail if the keys are regenerated
|
|
207
|
+
self.assertEqual(p['notAfter'], asn1time('Oct 5 23:01:56 2020 GMT'))
|
|
208
|
+
self.assertEqual(p['notBefore'], asn1time('Oct 8 23:01:56 2010 GMT'))
|
|
209
|
+
self.assertEqual(p['serialNumber'], 'D7C7381919AFC24E')
|
|
210
|
+
self.assertEqual(p['subject'],
|
|
211
|
+
((('countryName', 'XY'),),
|
|
212
|
+
(('localityName', 'Castle Anthrax'),),
|
|
213
|
+
(('organizationName', 'Python Software Foundation'),),
|
|
214
|
+
(('commonName', 'localhost'),))
|
|
215
|
+
)
|
|
216
|
+
self.assertEqual(p['subjectAltName'], (('DNS', 'localhost'),))
|
|
217
|
+
# Issue #13034: the subjectAltName in some certificates
|
|
218
|
+
# (notably projects.developer.nokia.com:443) wasn't parsed
|
|
219
|
+
p = ssl._ssl._test_decode_cert(NOKIACERT)
|
|
220
|
+
if support.verbose:
|
|
221
|
+
sys.stdout.write("\n" + pprint.pformat(p) + "\n")
|
|
222
|
+
self.assertEqual(p['subjectAltName'],
|
|
223
|
+
(('DNS', 'projects.developer.nokia.com'),
|
|
224
|
+
('DNS', 'projects.forum.nokia.com'))
|
|
225
|
+
)
|
|
226
|
+
# extra OCSP and AIA fields
|
|
227
|
+
self.assertEqual(p['OCSP'], ('http://ocsp.verisign.com',))
|
|
228
|
+
self.assertEqual(p['caIssuers'],
|
|
229
|
+
('http://SVRIntl-G3-aia.verisign.com/SVRIntlG3.cer',))
|
|
230
|
+
self.assertEqual(p['crlDistributionPoints'],
|
|
231
|
+
('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',))
|
|
232
|
+
|
|
233
|
+
def test_parse_cert_CVE_2013_4238(self):
|
|
234
|
+
p = ssl._ssl._test_decode_cert(NULLBYTECERT)
|
|
235
|
+
if support.verbose:
|
|
236
|
+
sys.stdout.write("\n" + pprint.pformat(p) + "\n")
|
|
237
|
+
subject = ((('countryName', 'US'),),
|
|
238
|
+
(('stateOrProvinceName', 'Oregon'),),
|
|
239
|
+
(('localityName', 'Beaverton'),),
|
|
240
|
+
(('organizationName', 'Python Software Foundation'),),
|
|
241
|
+
(('organizationalUnitName', 'Python Core Development'),),
|
|
242
|
+
(('commonName', 'null.python.org\x00example.org'),),
|
|
243
|
+
(('emailAddress', 'python-dev@python.org'),))
|
|
244
|
+
self.assertEqual(p['subject'], subject)
|
|
245
|
+
self.assertEqual(p['issuer'], subject)
|
|
246
|
+
if ssl._OPENSSL_API_VERSION >= (0, 9, 8):
|
|
247
|
+
san = (('DNS', 'altnull.python.org\x00example.com'),
|
|
248
|
+
('email', 'null@python.org\x00user@example.org'),
|
|
249
|
+
('URI', 'http://null.python.org\x00http://example.org'),
|
|
250
|
+
('IP Address', '192.0.2.1'),
|
|
251
|
+
('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
|
|
252
|
+
else:
|
|
253
|
+
# OpenSSL 0.9.7 doesn't support IPv6 addresses in subjectAltName
|
|
254
|
+
san = (('DNS', 'altnull.python.org\x00example.com'),
|
|
255
|
+
('email', 'null@python.org\x00user@example.org'),
|
|
256
|
+
('URI', 'http://null.python.org\x00http://example.org'),
|
|
257
|
+
('IP Address', '192.0.2.1'),
|
|
258
|
+
('IP Address', '<invalid>'))
|
|
259
|
+
|
|
260
|
+
self.assertEqual(p['subjectAltName'], san)
|
|
261
|
+
|
|
262
|
+
def test_DER_to_PEM(self):
|
|
263
|
+
with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f:
|
|
264
|
+
pem = f.read()
|
|
265
|
+
d1 = ssl.PEM_cert_to_DER_cert(pem)
|
|
266
|
+
p2 = ssl.DER_cert_to_PEM_cert(d1)
|
|
267
|
+
d2 = ssl.PEM_cert_to_DER_cert(p2)
|
|
268
|
+
self.assertEqual(d1, d2)
|
|
269
|
+
if not p2.startswith(ssl.PEM_HEADER + '\n'):
|
|
270
|
+
self.fail("DER-to-PEM didn't include correct header:\n%r\n" % p2)
|
|
271
|
+
if not p2.endswith('\n' + ssl.PEM_FOOTER + '\n'):
|
|
272
|
+
self.fail("DER-to-PEM didn't include correct footer:\n%r\n" % p2)
|
|
273
|
+
|
|
274
|
+
def test_openssl_version(self):
|
|
275
|
+
n = ssl.OPENSSL_VERSION_NUMBER
|
|
276
|
+
t = ssl.OPENSSL_VERSION_INFO
|
|
277
|
+
s = ssl.OPENSSL_VERSION
|
|
278
|
+
self.assertIsInstance(n, int)
|
|
279
|
+
self.assertIsInstance(t, tuple)
|
|
280
|
+
self.assertIsInstance(s, str)
|
|
281
|
+
# Some sanity checks follow
|
|
282
|
+
# >= 0.9
|
|
283
|
+
self.assertGreaterEqual(n, 0x900000)
|
|
284
|
+
# < 3.0
|
|
285
|
+
self.assertLess(n, 0x30000000)
|
|
286
|
+
major, minor, fix, patch, status = t
|
|
287
|
+
self.assertGreaterEqual(major, 0)
|
|
288
|
+
self.assertLess(major, 3)
|
|
289
|
+
self.assertGreaterEqual(minor, 0)
|
|
290
|
+
self.assertLess(minor, 256)
|
|
291
|
+
self.assertGreaterEqual(fix, 0)
|
|
292
|
+
self.assertLess(fix, 256)
|
|
293
|
+
self.assertGreaterEqual(patch, 0)
|
|
294
|
+
self.assertLessEqual(patch, 26)
|
|
295
|
+
self.assertGreaterEqual(status, 0)
|
|
296
|
+
self.assertLessEqual(status, 15)
|
|
297
|
+
# Version string as returned by {Open,Libre}SSL, the format might change
|
|
298
|
+
if "LibreSSL" in s:
|
|
299
|
+
self.assertTrue(s.startswith("LibreSSL {:d}.{:d}".format(major, minor)),
|
|
300
|
+
(s, t))
|
|
301
|
+
else:
|
|
302
|
+
self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
|
|
303
|
+
(s, t))
|
|
304
|
+
|
|
305
|
+
@support.cpython_only
|
|
306
|
+
def test_refcycle(self):
|
|
307
|
+
# Issue #7943: an SSL object doesn't create reference cycles with
|
|
308
|
+
# itself.
|
|
309
|
+
s = socket.socket(socket.AF_INET)
|
|
310
|
+
ss = ssl.wrap_socket(s)
|
|
311
|
+
wr = weakref.ref(ss)
|
|
312
|
+
with support.check_warnings(("", ResourceWarning)):
|
|
313
|
+
del ss
|
|
314
|
+
self.assertEqual(wr(), None)
|
|
315
|
+
|
|
316
|
+
def test_wrapped_unconnected(self):
|
|
317
|
+
# Methods on an unconnected SSLSocket propagate the original
|
|
318
|
+
# OSError raise by the underlying socket object.
|
|
319
|
+
s = socket.socket(socket.AF_INET)
|
|
320
|
+
with ssl.wrap_socket(s) as ss:
|
|
321
|
+
self.assertRaises(OSError, ss.recv, 1)
|
|
322
|
+
self.assertRaises(OSError, ss.recv_into, bytearray(b'x'))
|
|
323
|
+
self.assertRaises(OSError, ss.recvfrom, 1)
|
|
324
|
+
self.assertRaises(OSError, ss.recvfrom_into, bytearray(b'x'), 1)
|
|
325
|
+
self.assertRaises(OSError, ss.send, b'x')
|
|
326
|
+
self.assertRaises(OSError, ss.sendto, b'x', ('0.0.0.0', 0))
|
|
327
|
+
|
|
328
|
+
def test_timeout(self):
|
|
329
|
+
# Issue #8524: when creating an SSL socket, the timeout of the
|
|
330
|
+
# original socket should be retained.
|
|
331
|
+
for timeout in (None, 0.0, 5.0):
|
|
332
|
+
s = socket.socket(socket.AF_INET)
|
|
333
|
+
s.settimeout(timeout)
|
|
334
|
+
with ssl.wrap_socket(s) as ss:
|
|
335
|
+
self.assertEqual(timeout, ss.gettimeout())
|
|
336
|
+
|
|
337
|
+
def test_errors(self):
|
|
338
|
+
sock = socket.socket()
|
|
339
|
+
self.assertRaisesRegex(ValueError,
|
|
340
|
+
"certfile must be specified",
|
|
341
|
+
ssl.wrap_socket, sock, keyfile=CERTFILE)
|
|
342
|
+
self.assertRaisesRegex(ValueError,
|
|
343
|
+
"certfile must be specified for server-side operations",
|
|
344
|
+
ssl.wrap_socket, sock, server_side=True)
|
|
345
|
+
self.assertRaisesRegex(ValueError,
|
|
346
|
+
"certfile must be specified for server-side operations",
|
|
347
|
+
ssl.wrap_socket, sock, server_side=True, certfile="")
|
|
348
|
+
with ssl.wrap_socket(sock, server_side=True, certfile=CERTFILE) as s:
|
|
349
|
+
self.assertRaisesRegex(ValueError, "can't connect in server-side mode",
|
|
350
|
+
s.connect, (HOST, 8080))
|
|
351
|
+
with self.assertRaises(OSError) as cm:
|
|
352
|
+
with socket.socket() as sock:
|
|
353
|
+
ssl.wrap_socket(sock, certfile=WRONGCERT)
|
|
354
|
+
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
355
|
+
with self.assertRaises(OSError) as cm:
|
|
356
|
+
with socket.socket() as sock:
|
|
357
|
+
ssl.wrap_socket(sock, certfile=CERTFILE, keyfile=WRONGCERT)
|
|
358
|
+
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
359
|
+
with self.assertRaises(OSError) as cm:
|
|
360
|
+
with socket.socket() as sock:
|
|
361
|
+
ssl.wrap_socket(sock, certfile=WRONGCERT, keyfile=WRONGCERT)
|
|
362
|
+
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
363
|
+
|
|
364
|
+
def test_match_hostname(self):
|
|
365
|
+
def ok(cert, hostname):
|
|
366
|
+
ssl.match_hostname(cert, hostname)
|
|
367
|
+
def fail(cert, hostname):
|
|
368
|
+
self.assertRaises(ssl.CertificateError,
|
|
369
|
+
ssl.match_hostname, cert, hostname)
|
|
370
|
+
|
|
371
|
+
cert = {'subject': ((('commonName', 'example.com'),),)}
|
|
372
|
+
ok(cert, 'example.com')
|
|
373
|
+
ok(cert, 'ExAmple.cOm')
|
|
374
|
+
fail(cert, 'www.example.com')
|
|
375
|
+
fail(cert, '.example.com')
|
|
376
|
+
fail(cert, 'example.org')
|
|
377
|
+
fail(cert, 'exampleXcom')
|
|
378
|
+
|
|
379
|
+
cert = {'subject': ((('commonName', '*.a.com'),),)}
|
|
380
|
+
ok(cert, 'foo.a.com')
|
|
381
|
+
fail(cert, 'bar.foo.a.com')
|
|
382
|
+
fail(cert, 'a.com')
|
|
383
|
+
fail(cert, 'Xa.com')
|
|
384
|
+
fail(cert, '.a.com')
|
|
385
|
+
|
|
386
|
+
# only match one left-most wildcard
|
|
387
|
+
cert = {'subject': ((('commonName', 'f*.com'),),)}
|
|
388
|
+
ok(cert, 'foo.com')
|
|
389
|
+
ok(cert, 'f.com')
|
|
390
|
+
fail(cert, 'bar.com')
|
|
391
|
+
fail(cert, 'foo.a.com')
|
|
392
|
+
fail(cert, 'bar.foo.com')
|
|
393
|
+
|
|
394
|
+
# NULL bytes are bad, CVE-2013-4073
|
|
395
|
+
cert = {'subject': ((('commonName',
|
|
396
|
+
'null.python.org\x00example.org'),),)}
|
|
397
|
+
ok(cert, 'null.python.org\x00example.org') # or raise an error?
|
|
398
|
+
fail(cert, 'example.org')
|
|
399
|
+
fail(cert, 'null.python.org')
|
|
400
|
+
|
|
401
|
+
# error cases with wildcards
|
|
402
|
+
cert = {'subject': ((('commonName', '*.*.a.com'),),)}
|
|
403
|
+
fail(cert, 'bar.foo.a.com')
|
|
404
|
+
fail(cert, 'a.com')
|
|
405
|
+
fail(cert, 'Xa.com')
|
|
406
|
+
fail(cert, '.a.com')
|
|
407
|
+
|
|
408
|
+
cert = {'subject': ((('commonName', 'a.*.com'),),)}
|
|
409
|
+
fail(cert, 'a.foo.com')
|
|
410
|
+
fail(cert, 'a..com')
|
|
411
|
+
fail(cert, 'a.com')
|
|
412
|
+
|
|
413
|
+
# wildcard doesn't match IDNA prefix 'xn--'
|
|
414
|
+
idna = 'püthon.python.org'.encode("idna").decode("ascii")
|
|
415
|
+
cert = {'subject': ((('commonName', idna),),)}
|
|
416
|
+
ok(cert, idna)
|
|
417
|
+
cert = {'subject': ((('commonName', 'x*.python.org'),),)}
|
|
418
|
+
fail(cert, idna)
|
|
419
|
+
cert = {'subject': ((('commonName', 'xn--p*.python.org'),),)}
|
|
420
|
+
fail(cert, idna)
|
|
421
|
+
|
|
422
|
+
# wildcard in first fragment and IDNA A-labels in sequent fragments
|
|
423
|
+
# are supported.
|
|
424
|
+
idna = 'www*.pythön.org'.encode("idna").decode("ascii")
|
|
425
|
+
cert = {'subject': ((('commonName', idna),),)}
|
|
426
|
+
ok(cert, 'www.pythön.org'.encode("idna").decode("ascii"))
|
|
427
|
+
ok(cert, 'www1.pythön.org'.encode("idna").decode("ascii"))
|
|
428
|
+
fail(cert, 'ftp.pythön.org'.encode("idna").decode("ascii"))
|
|
429
|
+
fail(cert, 'pythön.org'.encode("idna").decode("ascii"))
|
|
430
|
+
|
|
431
|
+
# Slightly fake real-world example
|
|
432
|
+
cert = {'notAfter': 'Jun 26 21:41:46 2011 GMT',
|
|
433
|
+
'subject': ((('commonName', 'linuxfrz.org'),),),
|
|
434
|
+
'subjectAltName': (('DNS', 'linuxfr.org'),
|
|
435
|
+
('DNS', 'linuxfr.com'),
|
|
436
|
+
('othername', '<unsupported>'))}
|
|
437
|
+
ok(cert, 'linuxfr.org')
|
|
438
|
+
ok(cert, 'linuxfr.com')
|
|
439
|
+
# Not a "DNS" entry
|
|
440
|
+
fail(cert, '<unsupported>')
|
|
441
|
+
# When there is a subjectAltName, commonName isn't used
|
|
442
|
+
fail(cert, 'linuxfrz.org')
|
|
443
|
+
|
|
444
|
+
# A pristine real-world example
|
|
445
|
+
cert = {'notAfter': 'Dec 18 23:59:59 2011 GMT',
|
|
446
|
+
'subject': ((('countryName', 'US'),),
|
|
447
|
+
(('stateOrProvinceName', 'California'),),
|
|
448
|
+
(('localityName', 'Mountain View'),),
|
|
449
|
+
(('organizationName', 'Google Inc'),),
|
|
450
|
+
(('commonName', 'mail.google.com'),))}
|
|
451
|
+
ok(cert, 'mail.google.com')
|
|
452
|
+
fail(cert, 'gmail.com')
|
|
453
|
+
# Only commonName is considered
|
|
454
|
+
fail(cert, 'California')
|
|
455
|
+
|
|
456
|
+
# Neither commonName nor subjectAltName
|
|
457
|
+
cert = {'notAfter': 'Dec 18 23:59:59 2011 GMT',
|
|
458
|
+
'subject': ((('countryName', 'US'),),
|
|
459
|
+
(('stateOrProvinceName', 'California'),),
|
|
460
|
+
(('localityName', 'Mountain View'),),
|
|
461
|
+
(('organizationName', 'Google Inc'),))}
|
|
462
|
+
fail(cert, 'mail.google.com')
|
|
463
|
+
|
|
464
|
+
# No DNS entry in subjectAltName but a commonName
|
|
465
|
+
cert = {'notAfter': 'Dec 18 23:59:59 2099 GMT',
|
|
466
|
+
'subject': ((('countryName', 'US'),),
|
|
467
|
+
(('stateOrProvinceName', 'California'),),
|
|
468
|
+
(('localityName', 'Mountain View'),),
|
|
469
|
+
(('commonName', 'mail.google.com'),)),
|
|
470
|
+
'subjectAltName': (('othername', 'blabla'), )}
|
|
471
|
+
ok(cert, 'mail.google.com')
|
|
472
|
+
|
|
473
|
+
# No DNS entry subjectAltName and no commonName
|
|
474
|
+
cert = {'notAfter': 'Dec 18 23:59:59 2099 GMT',
|
|
475
|
+
'subject': ((('countryName', 'US'),),
|
|
476
|
+
(('stateOrProvinceName', 'California'),),
|
|
477
|
+
(('localityName', 'Mountain View'),),
|
|
478
|
+
(('organizationName', 'Google Inc'),)),
|
|
479
|
+
'subjectAltName': (('othername', 'blabla'),)}
|
|
480
|
+
fail(cert, 'google.com')
|
|
481
|
+
|
|
482
|
+
# Empty cert / no cert
|
|
483
|
+
self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com')
|
|
484
|
+
self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com')
|
|
485
|
+
|
|
486
|
+
# Issue #17980: avoid denials of service by refusing more than one
|
|
487
|
+
# wildcard per fragment.
|
|
488
|
+
cert = {'subject': ((('commonName', 'a*b.com'),),)}
|
|
489
|
+
ok(cert, 'axxb.com')
|
|
490
|
+
cert = {'subject': ((('commonName', 'a*b.co*'),),)}
|
|
491
|
+
fail(cert, 'axxb.com')
|
|
492
|
+
cert = {'subject': ((('commonName', 'a*b*.com'),),)}
|
|
493
|
+
with self.assertRaises(ssl.CertificateError) as cm:
|
|
494
|
+
ssl.match_hostname(cert, 'axxbxxc.com')
|
|
495
|
+
self.assertIn("too many wildcards", str(cm.exception))
|
|
496
|
+
|
|
497
|
+
def test_server_side(self):
|
|
498
|
+
# server_hostname doesn't work for server sockets
|
|
499
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
500
|
+
with socket.socket() as sock:
|
|
501
|
+
self.assertRaises(ValueError, ctx.wrap_socket, sock, True,
|
|
502
|
+
server_hostname="some.hostname")
|
|
503
|
+
|
|
504
|
+
def test_unknown_channel_binding(self):
|
|
505
|
+
# should raise ValueError for unknown type
|
|
506
|
+
s = socket.socket(socket.AF_INET)
|
|
507
|
+
with ssl.wrap_socket(s) as ss:
|
|
508
|
+
with self.assertRaises(ValueError):
|
|
509
|
+
ss.get_channel_binding("unknown-type")
|
|
510
|
+
|
|
511
|
+
@unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
|
|
512
|
+
"'tls-unique' channel binding not available")
|
|
513
|
+
def test_tls_unique_channel_binding(self):
|
|
514
|
+
# unconnected should return None for known type
|
|
515
|
+
s = socket.socket(socket.AF_INET)
|
|
516
|
+
with ssl.wrap_socket(s) as ss:
|
|
517
|
+
self.assertIsNone(ss.get_channel_binding("tls-unique"))
|
|
518
|
+
# the same for server-side
|
|
519
|
+
s = socket.socket(socket.AF_INET)
|
|
520
|
+
with ssl.wrap_socket(s, server_side=True, certfile=CERTFILE) as ss:
|
|
521
|
+
self.assertIsNone(ss.get_channel_binding("tls-unique"))
|
|
522
|
+
|
|
523
|
+
def test_dealloc_warn(self):
|
|
524
|
+
ss = ssl.wrap_socket(socket.socket(socket.AF_INET))
|
|
525
|
+
r = repr(ss)
|
|
526
|
+
with self.assertWarns(ResourceWarning) as cm:
|
|
527
|
+
ss = None
|
|
528
|
+
support.gc_collect()
|
|
529
|
+
self.assertIn(r, str(cm.warning.args[0]))
|
|
530
|
+
|
|
531
|
+
def test_get_default_verify_paths(self):
|
|
532
|
+
paths = ssl.get_default_verify_paths()
|
|
533
|
+
self.assertEqual(len(paths), 6)
|
|
534
|
+
self.assertIsInstance(paths, ssl.DefaultVerifyPaths)
|
|
535
|
+
|
|
536
|
+
with support.EnvironmentVarGuard() as env:
|
|
537
|
+
env["SSL_CERT_DIR"] = CAPATH
|
|
538
|
+
env["SSL_CERT_FILE"] = CERTFILE
|
|
539
|
+
paths = ssl.get_default_verify_paths()
|
|
540
|
+
self.assertEqual(paths.cafile, CERTFILE)
|
|
541
|
+
self.assertEqual(paths.capath, CAPATH)
|
|
542
|
+
|
|
543
|
+
@unittest.skipUnless(sys.platform == "win32", "Windows specific")
|
|
544
|
+
def test_enum_certificates(self):
|
|
545
|
+
self.assertTrue(ssl.enum_certificates("CA"))
|
|
546
|
+
self.assertTrue(ssl.enum_certificates("ROOT"))
|
|
547
|
+
|
|
548
|
+
self.assertRaises(TypeError, ssl.enum_certificates)
|
|
549
|
+
self.assertRaises(WindowsError, ssl.enum_certificates, "")
|
|
550
|
+
|
|
551
|
+
trust_oids = set()
|
|
552
|
+
for storename in ("CA", "ROOT"):
|
|
553
|
+
store = ssl.enum_certificates(storename)
|
|
554
|
+
self.assertIsInstance(store, list)
|
|
555
|
+
for element in store:
|
|
556
|
+
self.assertIsInstance(element, tuple)
|
|
557
|
+
self.assertEqual(len(element), 3)
|
|
558
|
+
cert, enc, trust = element
|
|
559
|
+
self.assertIsInstance(cert, bytes)
|
|
560
|
+
self.assertIn(enc, {"x509_asn", "pkcs_7_asn"})
|
|
561
|
+
self.assertIsInstance(trust, (set, bool))
|
|
562
|
+
if isinstance(trust, set):
|
|
563
|
+
trust_oids.update(trust)
|
|
564
|
+
|
|
565
|
+
serverAuth = "1.3.6.1.5.5.7.3.1"
|
|
566
|
+
self.assertIn(serverAuth, trust_oids)
|
|
567
|
+
|
|
568
|
+
@unittest.skipUnless(sys.platform == "win32", "Windows specific")
|
|
569
|
+
def test_enum_crls(self):
|
|
570
|
+
self.assertTrue(ssl.enum_crls("CA"))
|
|
571
|
+
self.assertRaises(TypeError, ssl.enum_crls)
|
|
572
|
+
self.assertRaises(WindowsError, ssl.enum_crls, "")
|
|
573
|
+
|
|
574
|
+
crls = ssl.enum_crls("CA")
|
|
575
|
+
self.assertIsInstance(crls, list)
|
|
576
|
+
for element in crls:
|
|
577
|
+
self.assertIsInstance(element, tuple)
|
|
578
|
+
self.assertEqual(len(element), 2)
|
|
579
|
+
self.assertIsInstance(element[0], bytes)
|
|
580
|
+
self.assertIn(element[1], {"x509_asn", "pkcs_7_asn"})
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
def test_asn1object(self):
|
|
584
|
+
expected = (129, 'serverAuth', 'TLS Web Server Authentication',
|
|
585
|
+
'1.3.6.1.5.5.7.3.1')
|
|
586
|
+
|
|
587
|
+
val = ssl._ASN1Object('1.3.6.1.5.5.7.3.1')
|
|
588
|
+
self.assertEqual(val, expected)
|
|
589
|
+
self.assertEqual(val.nid, 129)
|
|
590
|
+
self.assertEqual(val.shortname, 'serverAuth')
|
|
591
|
+
self.assertEqual(val.longname, 'TLS Web Server Authentication')
|
|
592
|
+
self.assertEqual(val.oid, '1.3.6.1.5.5.7.3.1')
|
|
593
|
+
self.assertIsInstance(val, ssl._ASN1Object)
|
|
594
|
+
self.assertRaises(ValueError, ssl._ASN1Object, 'serverAuth')
|
|
595
|
+
|
|
596
|
+
val = ssl._ASN1Object.fromnid(129)
|
|
597
|
+
self.assertEqual(val, expected)
|
|
598
|
+
self.assertIsInstance(val, ssl._ASN1Object)
|
|
599
|
+
self.assertRaises(ValueError, ssl._ASN1Object.fromnid, -1)
|
|
600
|
+
with self.assertRaisesRegex(ValueError, "unknown NID 100000"):
|
|
601
|
+
ssl._ASN1Object.fromnid(100000)
|
|
602
|
+
for i in range(1000):
|
|
603
|
+
try:
|
|
604
|
+
obj = ssl._ASN1Object.fromnid(i)
|
|
605
|
+
except ValueError:
|
|
606
|
+
pass
|
|
607
|
+
else:
|
|
608
|
+
self.assertIsInstance(obj.nid, int)
|
|
609
|
+
self.assertIsInstance(obj.shortname, str)
|
|
610
|
+
self.assertIsInstance(obj.longname, str)
|
|
611
|
+
self.assertIsInstance(obj.oid, (str, type(None)))
|
|
612
|
+
|
|
613
|
+
val = ssl._ASN1Object.fromname('TLS Web Server Authentication')
|
|
614
|
+
self.assertEqual(val, expected)
|
|
615
|
+
self.assertIsInstance(val, ssl._ASN1Object)
|
|
616
|
+
self.assertEqual(ssl._ASN1Object.fromname('serverAuth'), expected)
|
|
617
|
+
self.assertEqual(ssl._ASN1Object.fromname('1.3.6.1.5.5.7.3.1'),
|
|
618
|
+
expected)
|
|
619
|
+
with self.assertRaisesRegex(ValueError, "unknown object 'serverauth'"):
|
|
620
|
+
ssl._ASN1Object.fromname('serverauth')
|
|
621
|
+
|
|
622
|
+
def test_purpose_enum(self):
|
|
623
|
+
val = ssl._ASN1Object('1.3.6.1.5.5.7.3.1')
|
|
624
|
+
self.assertIsInstance(ssl.Purpose.SERVER_AUTH, ssl._ASN1Object)
|
|
625
|
+
self.assertEqual(ssl.Purpose.SERVER_AUTH, val)
|
|
626
|
+
self.assertEqual(ssl.Purpose.SERVER_AUTH.nid, 129)
|
|
627
|
+
self.assertEqual(ssl.Purpose.SERVER_AUTH.shortname, 'serverAuth')
|
|
628
|
+
self.assertEqual(ssl.Purpose.SERVER_AUTH.oid,
|
|
629
|
+
'1.3.6.1.5.5.7.3.1')
|
|
630
|
+
|
|
631
|
+
val = ssl._ASN1Object('1.3.6.1.5.5.7.3.2')
|
|
632
|
+
self.assertIsInstance(ssl.Purpose.CLIENT_AUTH, ssl._ASN1Object)
|
|
633
|
+
self.assertEqual(ssl.Purpose.CLIENT_AUTH, val)
|
|
634
|
+
self.assertEqual(ssl.Purpose.CLIENT_AUTH.nid, 130)
|
|
635
|
+
self.assertEqual(ssl.Purpose.CLIENT_AUTH.shortname, 'clientAuth')
|
|
636
|
+
self.assertEqual(ssl.Purpose.CLIENT_AUTH.oid,
|
|
637
|
+
'1.3.6.1.5.5.7.3.2')
|
|
638
|
+
|
|
639
|
+
def test_unsupported_dtls(self):
|
|
640
|
+
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
641
|
+
self.addCleanup(s.close)
|
|
642
|
+
with self.assertRaises(NotImplementedError) as cx:
|
|
643
|
+
ssl.wrap_socket(s, cert_reqs=ssl.CERT_NONE)
|
|
644
|
+
self.assertEqual(str(cx.exception), "only stream sockets are supported")
|
|
645
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
646
|
+
with self.assertRaises(NotImplementedError) as cx:
|
|
647
|
+
ctx.wrap_socket(s)
|
|
648
|
+
self.assertEqual(str(cx.exception), "only stream sockets are supported")
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
class ContextTests(unittest.TestCase):
|
|
652
|
+
|
|
653
|
+
@skip_if_broken_ubuntu_ssl
|
|
654
|
+
def test_constructor(self):
|
|
655
|
+
for protocol in PROTOCOLS:
|
|
656
|
+
ssl.SSLContext(protocol)
|
|
657
|
+
self.assertRaises(TypeError, ssl.SSLContext)
|
|
658
|
+
self.assertRaises(ValueError, ssl.SSLContext, -1)
|
|
659
|
+
self.assertRaises(ValueError, ssl.SSLContext, 42)
|
|
660
|
+
|
|
661
|
+
@skip_if_broken_ubuntu_ssl
|
|
662
|
+
def test_protocol(self):
|
|
663
|
+
for proto in PROTOCOLS:
|
|
664
|
+
ctx = ssl.SSLContext(proto)
|
|
665
|
+
self.assertEqual(ctx.protocol, proto)
|
|
666
|
+
|
|
667
|
+
def test_ciphers(self):
|
|
668
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
669
|
+
ctx.set_ciphers("ALL")
|
|
670
|
+
ctx.set_ciphers("DEFAULT")
|
|
671
|
+
with self.assertRaisesRegex(ssl.SSLError, "No cipher can be selected"):
|
|
672
|
+
ctx.set_ciphers("^$:,;?*'dorothyx")
|
|
673
|
+
|
|
674
|
+
@skip_if_broken_ubuntu_ssl
|
|
675
|
+
def test_options(self):
|
|
676
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
677
|
+
# OP_ALL | OP_NO_SSLv2 is the default value
|
|
678
|
+
self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2,
|
|
679
|
+
ctx.options)
|
|
680
|
+
ctx.options |= ssl.OP_NO_SSLv3
|
|
681
|
+
self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3,
|
|
682
|
+
ctx.options)
|
|
683
|
+
if can_clear_options():
|
|
684
|
+
ctx.options = (ctx.options & ~ssl.OP_NO_SSLv2) | ssl.OP_NO_TLSv1
|
|
685
|
+
self.assertEqual(ssl.OP_ALL | ssl.OP_NO_TLSv1 | ssl.OP_NO_SSLv3,
|
|
686
|
+
ctx.options)
|
|
687
|
+
ctx.options = 0
|
|
688
|
+
self.assertEqual(0, ctx.options)
|
|
689
|
+
else:
|
|
690
|
+
with self.assertRaises(ValueError):
|
|
691
|
+
ctx.options = 0
|
|
692
|
+
|
|
693
|
+
def test_verify_mode(self):
|
|
694
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
695
|
+
# Default value
|
|
696
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
697
|
+
ctx.verify_mode = ssl.CERT_OPTIONAL
|
|
698
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_OPTIONAL)
|
|
699
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
700
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
|
|
701
|
+
ctx.verify_mode = ssl.CERT_NONE
|
|
702
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
703
|
+
with self.assertRaises(TypeError):
|
|
704
|
+
ctx.verify_mode = None
|
|
705
|
+
with self.assertRaises(ValueError):
|
|
706
|
+
ctx.verify_mode = 42
|
|
707
|
+
|
|
708
|
+
@unittest.skipUnless(have_verify_flags(),
|
|
709
|
+
"verify_flags need OpenSSL > 0.9.8")
|
|
710
|
+
def test_verify_flags(self):
|
|
711
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
712
|
+
# default value by OpenSSL
|
|
713
|
+
self.assertEqual(ctx.verify_flags, ssl.VERIFY_DEFAULT)
|
|
714
|
+
ctx.verify_flags = ssl.VERIFY_CRL_CHECK_LEAF
|
|
715
|
+
self.assertEqual(ctx.verify_flags, ssl.VERIFY_CRL_CHECK_LEAF)
|
|
716
|
+
ctx.verify_flags = ssl.VERIFY_CRL_CHECK_CHAIN
|
|
717
|
+
self.assertEqual(ctx.verify_flags, ssl.VERIFY_CRL_CHECK_CHAIN)
|
|
718
|
+
ctx.verify_flags = ssl.VERIFY_DEFAULT
|
|
719
|
+
self.assertEqual(ctx.verify_flags, ssl.VERIFY_DEFAULT)
|
|
720
|
+
# supports any value
|
|
721
|
+
ctx.verify_flags = ssl.VERIFY_CRL_CHECK_LEAF | ssl.VERIFY_X509_STRICT
|
|
722
|
+
self.assertEqual(ctx.verify_flags,
|
|
723
|
+
ssl.VERIFY_CRL_CHECK_LEAF | ssl.VERIFY_X509_STRICT)
|
|
724
|
+
with self.assertRaises(TypeError):
|
|
725
|
+
ctx.verify_flags = None
|
|
726
|
+
|
|
727
|
+
def test_load_cert_chain(self):
|
|
728
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
729
|
+
# Combined key and cert in a single file
|
|
730
|
+
ctx.load_cert_chain(CERTFILE)
|
|
731
|
+
ctx.load_cert_chain(CERTFILE, keyfile=CERTFILE)
|
|
732
|
+
self.assertRaises(TypeError, ctx.load_cert_chain, keyfile=CERTFILE)
|
|
733
|
+
with self.assertRaises(OSError) as cm:
|
|
734
|
+
ctx.load_cert_chain(WRONGCERT)
|
|
735
|
+
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
736
|
+
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
737
|
+
ctx.load_cert_chain(BADCERT)
|
|
738
|
+
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
739
|
+
ctx.load_cert_chain(EMPTYCERT)
|
|
740
|
+
# Separate key and cert
|
|
741
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
742
|
+
ctx.load_cert_chain(ONLYCERT, ONLYKEY)
|
|
743
|
+
ctx.load_cert_chain(certfile=ONLYCERT, keyfile=ONLYKEY)
|
|
744
|
+
ctx.load_cert_chain(certfile=BYTES_ONLYCERT, keyfile=BYTES_ONLYKEY)
|
|
745
|
+
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
746
|
+
ctx.load_cert_chain(ONLYCERT)
|
|
747
|
+
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
748
|
+
ctx.load_cert_chain(ONLYKEY)
|
|
749
|
+
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
750
|
+
ctx.load_cert_chain(certfile=ONLYKEY, keyfile=ONLYCERT)
|
|
751
|
+
# Mismatching key and cert
|
|
752
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
753
|
+
with self.assertRaisesRegex(ssl.SSLError, "key values mismatch"):
|
|
754
|
+
ctx.load_cert_chain(SVN_PYTHON_ORG_ROOT_CERT, ONLYKEY)
|
|
755
|
+
# Password protected key and cert
|
|
756
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=KEY_PASSWORD)
|
|
757
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=KEY_PASSWORD.encode())
|
|
758
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED,
|
|
759
|
+
password=bytearray(KEY_PASSWORD.encode()))
|
|
760
|
+
ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED, KEY_PASSWORD)
|
|
761
|
+
ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED, KEY_PASSWORD.encode())
|
|
762
|
+
ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED,
|
|
763
|
+
bytearray(KEY_PASSWORD.encode()))
|
|
764
|
+
with self.assertRaisesRegex(TypeError, "should be a string"):
|
|
765
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=True)
|
|
766
|
+
with self.assertRaises(ssl.SSLError):
|
|
767
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password="badpass")
|
|
768
|
+
with self.assertRaisesRegex(ValueError, "cannot be longer"):
|
|
769
|
+
# openssl has a fixed limit on the password buffer.
|
|
770
|
+
# PEM_BUFSIZE is generally set to 1kb.
|
|
771
|
+
# Return a string larger than this.
|
|
772
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=b'a' * 102400)
|
|
773
|
+
# Password callback
|
|
774
|
+
def getpass_unicode():
|
|
775
|
+
return KEY_PASSWORD
|
|
776
|
+
def getpass_bytes():
|
|
777
|
+
return KEY_PASSWORD.encode()
|
|
778
|
+
def getpass_bytearray():
|
|
779
|
+
return bytearray(KEY_PASSWORD.encode())
|
|
780
|
+
def getpass_badpass():
|
|
781
|
+
return "badpass"
|
|
782
|
+
def getpass_huge():
|
|
783
|
+
return b'a' * (1024 * 1024)
|
|
784
|
+
def getpass_bad_type():
|
|
785
|
+
return 9
|
|
786
|
+
def getpass_exception():
|
|
787
|
+
raise Exception('getpass error')
|
|
788
|
+
class GetPassCallable:
|
|
789
|
+
def __call__(self):
|
|
790
|
+
return KEY_PASSWORD
|
|
791
|
+
def getpass(self):
|
|
792
|
+
return KEY_PASSWORD
|
|
793
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_unicode)
|
|
794
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_bytes)
|
|
795
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_bytearray)
|
|
796
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=GetPassCallable())
|
|
797
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED,
|
|
798
|
+
password=GetPassCallable().getpass)
|
|
799
|
+
with self.assertRaises(ssl.SSLError):
|
|
800
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_badpass)
|
|
801
|
+
with self.assertRaisesRegex(ValueError, "cannot be longer"):
|
|
802
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_huge)
|
|
803
|
+
with self.assertRaisesRegex(TypeError, "must return a string"):
|
|
804
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_bad_type)
|
|
805
|
+
with self.assertRaisesRegex(Exception, "getpass error"):
|
|
806
|
+
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_exception)
|
|
807
|
+
# Make sure the password function isn't called if it isn't needed
|
|
808
|
+
ctx.load_cert_chain(CERTFILE, password=getpass_exception)
|
|
809
|
+
|
|
810
|
+
def test_load_verify_locations(self):
|
|
811
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
812
|
+
ctx.load_verify_locations(CERTFILE)
|
|
813
|
+
ctx.load_verify_locations(cafile=CERTFILE, capath=None)
|
|
814
|
+
ctx.load_verify_locations(BYTES_CERTFILE)
|
|
815
|
+
ctx.load_verify_locations(cafile=BYTES_CERTFILE, capath=None)
|
|
816
|
+
self.assertRaises(TypeError, ctx.load_verify_locations)
|
|
817
|
+
self.assertRaises(TypeError, ctx.load_verify_locations, None, None, None)
|
|
818
|
+
with self.assertRaises(OSError) as cm:
|
|
819
|
+
ctx.load_verify_locations(WRONGCERT)
|
|
820
|
+
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
821
|
+
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
822
|
+
ctx.load_verify_locations(BADCERT)
|
|
823
|
+
ctx.load_verify_locations(CERTFILE, CAPATH)
|
|
824
|
+
ctx.load_verify_locations(CERTFILE, capath=BYTES_CAPATH)
|
|
825
|
+
|
|
826
|
+
# Issue #10989: crash if the second argument type is invalid
|
|
827
|
+
self.assertRaises(TypeError, ctx.load_verify_locations, None, True)
|
|
828
|
+
|
|
829
|
+
def test_load_verify_cadata(self):
|
|
830
|
+
# test cadata
|
|
831
|
+
with open(CAFILE_CACERT) as f:
|
|
832
|
+
cacert_pem = f.read()
|
|
833
|
+
cacert_der = ssl.PEM_cert_to_DER_cert(cacert_pem)
|
|
834
|
+
with open(CAFILE_NEURONIO) as f:
|
|
835
|
+
neuronio_pem = f.read()
|
|
836
|
+
neuronio_der = ssl.PEM_cert_to_DER_cert(neuronio_pem)
|
|
837
|
+
|
|
838
|
+
# test PEM
|
|
839
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
840
|
+
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 0)
|
|
841
|
+
ctx.load_verify_locations(cadata=cacert_pem)
|
|
842
|
+
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 1)
|
|
843
|
+
ctx.load_verify_locations(cadata=neuronio_pem)
|
|
844
|
+
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
845
|
+
# cert already in hash table
|
|
846
|
+
ctx.load_verify_locations(cadata=neuronio_pem)
|
|
847
|
+
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
848
|
+
|
|
849
|
+
# combined
|
|
850
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
851
|
+
combined = "\n".join((cacert_pem, neuronio_pem))
|
|
852
|
+
ctx.load_verify_locations(cadata=combined)
|
|
853
|
+
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
854
|
+
|
|
855
|
+
# with junk around the certs
|
|
856
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
857
|
+
combined = ["head", cacert_pem, "other", neuronio_pem, "again",
|
|
858
|
+
neuronio_pem, "tail"]
|
|
859
|
+
ctx.load_verify_locations(cadata="\n".join(combined))
|
|
860
|
+
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
861
|
+
|
|
862
|
+
# test DER
|
|
863
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
864
|
+
ctx.load_verify_locations(cadata=cacert_der)
|
|
865
|
+
ctx.load_verify_locations(cadata=neuronio_der)
|
|
866
|
+
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
867
|
+
# cert already in hash table
|
|
868
|
+
ctx.load_verify_locations(cadata=cacert_der)
|
|
869
|
+
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
870
|
+
|
|
871
|
+
# combined
|
|
872
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
873
|
+
combined = b"".join((cacert_der, neuronio_der))
|
|
874
|
+
ctx.load_verify_locations(cadata=combined)
|
|
875
|
+
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
876
|
+
|
|
877
|
+
# error cases
|
|
878
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
879
|
+
self.assertRaises(TypeError, ctx.load_verify_locations, cadata=object)
|
|
880
|
+
|
|
881
|
+
with self.assertRaisesRegex(ssl.SSLError, "no start line"):
|
|
882
|
+
ctx.load_verify_locations(cadata="broken")
|
|
883
|
+
with self.assertRaisesRegex(ssl.SSLError, "not enough data"):
|
|
884
|
+
ctx.load_verify_locations(cadata=b"broken")
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
def test_load_dh_params(self):
|
|
888
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
889
|
+
ctx.load_dh_params(DHFILE)
|
|
890
|
+
if os.name != 'nt':
|
|
891
|
+
ctx.load_dh_params(BYTES_DHFILE)
|
|
892
|
+
self.assertRaises(TypeError, ctx.load_dh_params)
|
|
893
|
+
self.assertRaises(TypeError, ctx.load_dh_params, None)
|
|
894
|
+
with self.assertRaises(FileNotFoundError) as cm:
|
|
895
|
+
ctx.load_dh_params(WRONGCERT)
|
|
896
|
+
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
897
|
+
with self.assertRaises(ssl.SSLError) as cm:
|
|
898
|
+
ctx.load_dh_params(CERTFILE)
|
|
899
|
+
|
|
900
|
+
@skip_if_broken_ubuntu_ssl
|
|
901
|
+
def test_session_stats(self):
|
|
902
|
+
for proto in PROTOCOLS:
|
|
903
|
+
ctx = ssl.SSLContext(proto)
|
|
904
|
+
self.assertEqual(ctx.session_stats(), {
|
|
905
|
+
'number': 0,
|
|
906
|
+
'connect': 0,
|
|
907
|
+
'connect_good': 0,
|
|
908
|
+
'connect_renegotiate': 0,
|
|
909
|
+
'accept': 0,
|
|
910
|
+
'accept_good': 0,
|
|
911
|
+
'accept_renegotiate': 0,
|
|
912
|
+
'hits': 0,
|
|
913
|
+
'misses': 0,
|
|
914
|
+
'timeouts': 0,
|
|
915
|
+
'cache_full': 0,
|
|
916
|
+
})
|
|
917
|
+
|
|
918
|
+
def test_set_default_verify_paths(self):
|
|
919
|
+
# There's not much we can do to test that it acts as expected,
|
|
920
|
+
# so just check it doesn't crash or raise an exception.
|
|
921
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
922
|
+
ctx.set_default_verify_paths()
|
|
923
|
+
|
|
924
|
+
@unittest.skipUnless(ssl.HAS_ECDH, "ECDH disabled on this OpenSSL build")
|
|
925
|
+
def test_set_ecdh_curve(self):
|
|
926
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
927
|
+
ctx.set_ecdh_curve("prime256v1")
|
|
928
|
+
ctx.set_ecdh_curve(b"prime256v1")
|
|
929
|
+
self.assertRaises(TypeError, ctx.set_ecdh_curve)
|
|
930
|
+
self.assertRaises(TypeError, ctx.set_ecdh_curve, None)
|
|
931
|
+
self.assertRaises(ValueError, ctx.set_ecdh_curve, "foo")
|
|
932
|
+
self.assertRaises(ValueError, ctx.set_ecdh_curve, b"foo")
|
|
933
|
+
|
|
934
|
+
@needs_sni
|
|
935
|
+
def test_sni_callback(self):
|
|
936
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
937
|
+
|
|
938
|
+
# set_servername_callback expects a callable, or None
|
|
939
|
+
self.assertRaises(TypeError, ctx.set_servername_callback)
|
|
940
|
+
self.assertRaises(TypeError, ctx.set_servername_callback, 4)
|
|
941
|
+
self.assertRaises(TypeError, ctx.set_servername_callback, "")
|
|
942
|
+
self.assertRaises(TypeError, ctx.set_servername_callback, ctx)
|
|
943
|
+
|
|
944
|
+
def dummycallback(sock, servername, ctx):
|
|
945
|
+
pass
|
|
946
|
+
ctx.set_servername_callback(None)
|
|
947
|
+
ctx.set_servername_callback(dummycallback)
|
|
948
|
+
|
|
949
|
+
@needs_sni
|
|
950
|
+
def test_sni_callback_refcycle(self):
|
|
951
|
+
# Reference cycles through the servername callback are detected
|
|
952
|
+
# and cleared.
|
|
953
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
954
|
+
def dummycallback(sock, servername, ctx, cycle=ctx):
|
|
955
|
+
pass
|
|
956
|
+
ctx.set_servername_callback(dummycallback)
|
|
957
|
+
wr = weakref.ref(ctx)
|
|
958
|
+
del ctx, dummycallback
|
|
959
|
+
gc.collect()
|
|
960
|
+
self.assertIs(wr(), None)
|
|
961
|
+
|
|
962
|
+
def test_cert_store_stats(self):
|
|
963
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
964
|
+
self.assertEqual(ctx.cert_store_stats(),
|
|
965
|
+
{'x509_ca': 0, 'crl': 0, 'x509': 0})
|
|
966
|
+
ctx.load_cert_chain(CERTFILE)
|
|
967
|
+
self.assertEqual(ctx.cert_store_stats(),
|
|
968
|
+
{'x509_ca': 0, 'crl': 0, 'x509': 0})
|
|
969
|
+
ctx.load_verify_locations(CERTFILE)
|
|
970
|
+
self.assertEqual(ctx.cert_store_stats(),
|
|
971
|
+
{'x509_ca': 0, 'crl': 0, 'x509': 1})
|
|
972
|
+
ctx.load_verify_locations(SVN_PYTHON_ORG_ROOT_CERT)
|
|
973
|
+
self.assertEqual(ctx.cert_store_stats(),
|
|
974
|
+
{'x509_ca': 1, 'crl': 0, 'x509': 2})
|
|
975
|
+
|
|
976
|
+
def test_get_ca_certs(self):
|
|
977
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
978
|
+
self.assertEqual(ctx.get_ca_certs(), [])
|
|
979
|
+
# CERTFILE is not flagged as X509v3 Basic Constraints: CA:TRUE
|
|
980
|
+
ctx.load_verify_locations(CERTFILE)
|
|
981
|
+
self.assertEqual(ctx.get_ca_certs(), [])
|
|
982
|
+
# but SVN_PYTHON_ORG_ROOT_CERT is a CA cert
|
|
983
|
+
ctx.load_verify_locations(SVN_PYTHON_ORG_ROOT_CERT)
|
|
984
|
+
self.assertEqual(ctx.get_ca_certs(),
|
|
985
|
+
[{'issuer': ((('organizationName', 'Root CA'),),
|
|
986
|
+
(('organizationalUnitName', 'http://www.cacert.org'),),
|
|
987
|
+
(('commonName', 'CA Cert Signing Authority'),),
|
|
988
|
+
(('emailAddress', 'support@cacert.org'),)),
|
|
989
|
+
'notAfter': asn1time('Mar 29 12:29:49 2033 GMT'),
|
|
990
|
+
'notBefore': asn1time('Mar 30 12:29:49 2003 GMT'),
|
|
991
|
+
'serialNumber': '00',
|
|
992
|
+
'crlDistributionPoints': ('https://www.cacert.org/revoke.crl',),
|
|
993
|
+
'subject': ((('organizationName', 'Root CA'),),
|
|
994
|
+
(('organizationalUnitName', 'http://www.cacert.org'),),
|
|
995
|
+
(('commonName', 'CA Cert Signing Authority'),),
|
|
996
|
+
(('emailAddress', 'support@cacert.org'),)),
|
|
997
|
+
'version': 3}])
|
|
998
|
+
|
|
999
|
+
with open(SVN_PYTHON_ORG_ROOT_CERT) as f:
|
|
1000
|
+
pem = f.read()
|
|
1001
|
+
der = ssl.PEM_cert_to_DER_cert(pem)
|
|
1002
|
+
self.assertEqual(ctx.get_ca_certs(True), [der])
|
|
1003
|
+
|
|
1004
|
+
def test_load_default_certs(self):
|
|
1005
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1006
|
+
ctx.load_default_certs()
|
|
1007
|
+
|
|
1008
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1009
|
+
ctx.load_default_certs(ssl.Purpose.SERVER_AUTH)
|
|
1010
|
+
ctx.load_default_certs()
|
|
1011
|
+
|
|
1012
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1013
|
+
ctx.load_default_certs(ssl.Purpose.CLIENT_AUTH)
|
|
1014
|
+
|
|
1015
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1016
|
+
self.assertRaises(TypeError, ctx.load_default_certs, None)
|
|
1017
|
+
self.assertRaises(TypeError, ctx.load_default_certs, 'SERVER_AUTH')
|
|
1018
|
+
|
|
1019
|
+
def test_create_default_context(self):
|
|
1020
|
+
ctx = ssl.create_default_context()
|
|
1021
|
+
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1022
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
|
|
1023
|
+
self.assertTrue(ctx.check_hostname)
|
|
1024
|
+
self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)
|
|
1025
|
+
self.assertEqual(
|
|
1026
|
+
ctx.options & getattr(ssl, "OP_NO_COMPRESSION", 0),
|
|
1027
|
+
getattr(ssl, "OP_NO_COMPRESSION", 0),
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
with open(SIGNING_CA) as f:
|
|
1031
|
+
cadata = f.read()
|
|
1032
|
+
ctx = ssl.create_default_context(cafile=SIGNING_CA, capath=CAPATH,
|
|
1033
|
+
cadata=cadata)
|
|
1034
|
+
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1035
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
|
|
1036
|
+
self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)
|
|
1037
|
+
self.assertEqual(
|
|
1038
|
+
ctx.options & getattr(ssl, "OP_NO_COMPRESSION", 0),
|
|
1039
|
+
getattr(ssl, "OP_NO_COMPRESSION", 0),
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
|
1043
|
+
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1044
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
1045
|
+
self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)
|
|
1046
|
+
self.assertEqual(
|
|
1047
|
+
ctx.options & getattr(ssl, "OP_NO_COMPRESSION", 0),
|
|
1048
|
+
getattr(ssl, "OP_NO_COMPRESSION", 0),
|
|
1049
|
+
)
|
|
1050
|
+
self.assertEqual(
|
|
1051
|
+
ctx.options & getattr(ssl, "OP_SINGLE_DH_USE", 0),
|
|
1052
|
+
getattr(ssl, "OP_SINGLE_DH_USE", 0),
|
|
1053
|
+
)
|
|
1054
|
+
self.assertEqual(
|
|
1055
|
+
ctx.options & getattr(ssl, "OP_SINGLE_ECDH_USE", 0),
|
|
1056
|
+
getattr(ssl, "OP_SINGLE_ECDH_USE", 0),
|
|
1057
|
+
)
|
|
1058
|
+
|
|
1059
|
+
def test__create_stdlib_context(self):
|
|
1060
|
+
ctx = ssl._create_stdlib_context()
|
|
1061
|
+
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1062
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
1063
|
+
self.assertFalse(ctx.check_hostname)
|
|
1064
|
+
self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)
|
|
1065
|
+
|
|
1066
|
+
ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1)
|
|
1067
|
+
self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1)
|
|
1068
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
1069
|
+
self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)
|
|
1070
|
+
|
|
1071
|
+
ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1,
|
|
1072
|
+
cert_reqs=ssl.CERT_REQUIRED,
|
|
1073
|
+
check_hostname=True)
|
|
1074
|
+
self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1)
|
|
1075
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
|
|
1076
|
+
self.assertTrue(ctx.check_hostname)
|
|
1077
|
+
self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)
|
|
1078
|
+
|
|
1079
|
+
ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH)
|
|
1080
|
+
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1081
|
+
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
1082
|
+
self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)
|
|
1083
|
+
|
|
1084
|
+
def test_check_hostname(self):
|
|
1085
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1086
|
+
self.assertFalse(ctx.check_hostname)
|
|
1087
|
+
|
|
1088
|
+
# Requires CERT_REQUIRED or CERT_OPTIONAL
|
|
1089
|
+
with self.assertRaises(ValueError):
|
|
1090
|
+
ctx.check_hostname = True
|
|
1091
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1092
|
+
self.assertFalse(ctx.check_hostname)
|
|
1093
|
+
ctx.check_hostname = True
|
|
1094
|
+
self.assertTrue(ctx.check_hostname)
|
|
1095
|
+
|
|
1096
|
+
ctx.verify_mode = ssl.CERT_OPTIONAL
|
|
1097
|
+
ctx.check_hostname = True
|
|
1098
|
+
self.assertTrue(ctx.check_hostname)
|
|
1099
|
+
|
|
1100
|
+
# Cannot set CERT_NONE with check_hostname enabled
|
|
1101
|
+
with self.assertRaises(ValueError):
|
|
1102
|
+
ctx.verify_mode = ssl.CERT_NONE
|
|
1103
|
+
ctx.check_hostname = False
|
|
1104
|
+
self.assertFalse(ctx.check_hostname)
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
class SSLErrorTests(unittest.TestCase):
|
|
1108
|
+
|
|
1109
|
+
def test_str(self):
|
|
1110
|
+
# The str() of a SSLError doesn't include the errno
|
|
1111
|
+
e = ssl.SSLError(1, "foo")
|
|
1112
|
+
self.assertEqual(str(e), "foo")
|
|
1113
|
+
self.assertEqual(e.errno, 1)
|
|
1114
|
+
# Same for a subclass
|
|
1115
|
+
e = ssl.SSLZeroReturnError(1, "foo")
|
|
1116
|
+
self.assertEqual(str(e), "foo")
|
|
1117
|
+
self.assertEqual(e.errno, 1)
|
|
1118
|
+
|
|
1119
|
+
def test_lib_reason(self):
|
|
1120
|
+
# Test the library and reason attributes
|
|
1121
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1122
|
+
with self.assertRaises(ssl.SSLError) as cm:
|
|
1123
|
+
ctx.load_dh_params(CERTFILE)
|
|
1124
|
+
self.assertEqual(cm.exception.library, 'PEM')
|
|
1125
|
+
self.assertEqual(cm.exception.reason, 'NO_START_LINE')
|
|
1126
|
+
s = str(cm.exception)
|
|
1127
|
+
self.assertTrue(s.startswith("[PEM: NO_START_LINE] no start line"), s)
|
|
1128
|
+
|
|
1129
|
+
def test_subclass(self):
|
|
1130
|
+
# Check that the appropriate SSLError subclass is raised
|
|
1131
|
+
# (this only tests one of them)
|
|
1132
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1133
|
+
with socket.socket() as s:
|
|
1134
|
+
s.bind(("127.0.0.1", 0))
|
|
1135
|
+
s.listen(5)
|
|
1136
|
+
c = socket.socket()
|
|
1137
|
+
c.connect(s.getsockname())
|
|
1138
|
+
c.setblocking(False)
|
|
1139
|
+
with ctx.wrap_socket(c, False, do_handshake_on_connect=False) as c:
|
|
1140
|
+
with self.assertRaises(ssl.SSLWantReadError) as cm:
|
|
1141
|
+
c.do_handshake()
|
|
1142
|
+
s = str(cm.exception)
|
|
1143
|
+
self.assertTrue(s.startswith("The operation did not complete (read)"), s)
|
|
1144
|
+
# For compatibility
|
|
1145
|
+
self.assertEqual(cm.exception.errno, ssl.SSL_ERROR_WANT_READ)
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
class NetworkedTests(unittest.TestCase):
|
|
1149
|
+
|
|
1150
|
+
def test_connect(self):
|
|
1151
|
+
with support.transient_internet("svn.python.org"):
|
|
1152
|
+
s = ssl.wrap_socket(socket.socket(socket.AF_INET),
|
|
1153
|
+
cert_reqs=ssl.CERT_NONE)
|
|
1154
|
+
try:
|
|
1155
|
+
s.connect(("svn.python.org", 443))
|
|
1156
|
+
self.assertEqual({}, s.getpeercert())
|
|
1157
|
+
finally:
|
|
1158
|
+
s.close()
|
|
1159
|
+
|
|
1160
|
+
# this should fail because we have no verification certs
|
|
1161
|
+
s = ssl.wrap_socket(socket.socket(socket.AF_INET),
|
|
1162
|
+
cert_reqs=ssl.CERT_REQUIRED)
|
|
1163
|
+
self.assertRaisesRegex(ssl.SSLError, "certificate verify failed",
|
|
1164
|
+
s.connect, ("svn.python.org", 443))
|
|
1165
|
+
s.close()
|
|
1166
|
+
|
|
1167
|
+
# this should succeed because we specify the root cert
|
|
1168
|
+
s = ssl.wrap_socket(socket.socket(socket.AF_INET),
|
|
1169
|
+
cert_reqs=ssl.CERT_REQUIRED,
|
|
1170
|
+
ca_certs=SVN_PYTHON_ORG_ROOT_CERT)
|
|
1171
|
+
try:
|
|
1172
|
+
s.connect(("svn.python.org", 443))
|
|
1173
|
+
self.assertTrue(s.getpeercert())
|
|
1174
|
+
finally:
|
|
1175
|
+
s.close()
|
|
1176
|
+
|
|
1177
|
+
def test_connect_ex(self):
|
|
1178
|
+
# Issue #11326: check connect_ex() implementation
|
|
1179
|
+
with support.transient_internet("svn.python.org"):
|
|
1180
|
+
s = ssl.wrap_socket(socket.socket(socket.AF_INET),
|
|
1181
|
+
cert_reqs=ssl.CERT_REQUIRED,
|
|
1182
|
+
ca_certs=SVN_PYTHON_ORG_ROOT_CERT)
|
|
1183
|
+
try:
|
|
1184
|
+
self.assertEqual(0, s.connect_ex(("svn.python.org", 443)))
|
|
1185
|
+
self.assertTrue(s.getpeercert())
|
|
1186
|
+
finally:
|
|
1187
|
+
s.close()
|
|
1188
|
+
|
|
1189
|
+
def test_non_blocking_connect_ex(self):
|
|
1190
|
+
# Issue #11326: non-blocking connect_ex() should allow handshake
|
|
1191
|
+
# to proceed after the socket gets ready.
|
|
1192
|
+
with support.transient_internet("svn.python.org"):
|
|
1193
|
+
s = ssl.wrap_socket(socket.socket(socket.AF_INET),
|
|
1194
|
+
cert_reqs=ssl.CERT_REQUIRED,
|
|
1195
|
+
ca_certs=SVN_PYTHON_ORG_ROOT_CERT,
|
|
1196
|
+
do_handshake_on_connect=False)
|
|
1197
|
+
try:
|
|
1198
|
+
s.setblocking(False)
|
|
1199
|
+
rc = s.connect_ex(('svn.python.org', 443))
|
|
1200
|
+
# EWOULDBLOCK under Windows, EINPROGRESS elsewhere
|
|
1201
|
+
self.assertIn(rc, (0, errno.EINPROGRESS, errno.EWOULDBLOCK))
|
|
1202
|
+
# Wait for connect to finish
|
|
1203
|
+
select.select([], [s], [], 5.0)
|
|
1204
|
+
# Non-blocking handshake
|
|
1205
|
+
while True:
|
|
1206
|
+
try:
|
|
1207
|
+
s.do_handshake()
|
|
1208
|
+
break
|
|
1209
|
+
except ssl.SSLWantReadError:
|
|
1210
|
+
select.select([s], [], [], 5.0)
|
|
1211
|
+
except ssl.SSLWantWriteError:
|
|
1212
|
+
select.select([], [s], [], 5.0)
|
|
1213
|
+
# SSL established
|
|
1214
|
+
self.assertTrue(s.getpeercert())
|
|
1215
|
+
finally:
|
|
1216
|
+
s.close()
|
|
1217
|
+
|
|
1218
|
+
def test_timeout_connect_ex(self):
|
|
1219
|
+
# Issue #12065: on a timeout, connect_ex() should return the original
|
|
1220
|
+
# errno (mimicking the behaviour of non-SSL sockets).
|
|
1221
|
+
with support.transient_internet("svn.python.org"):
|
|
1222
|
+
s = ssl.wrap_socket(socket.socket(socket.AF_INET),
|
|
1223
|
+
cert_reqs=ssl.CERT_REQUIRED,
|
|
1224
|
+
ca_certs=SVN_PYTHON_ORG_ROOT_CERT,
|
|
1225
|
+
do_handshake_on_connect=False)
|
|
1226
|
+
try:
|
|
1227
|
+
s.settimeout(0.0000001)
|
|
1228
|
+
rc = s.connect_ex(('svn.python.org', 443))
|
|
1229
|
+
if rc == 0:
|
|
1230
|
+
self.skipTest("svn.python.org responded too quickly")
|
|
1231
|
+
self.assertIn(rc, (errno.EAGAIN, errno.EWOULDBLOCK))
|
|
1232
|
+
finally:
|
|
1233
|
+
s.close()
|
|
1234
|
+
|
|
1235
|
+
def test_connect_ex_error(self):
|
|
1236
|
+
with support.transient_internet("svn.python.org"):
|
|
1237
|
+
s = ssl.wrap_socket(socket.socket(socket.AF_INET),
|
|
1238
|
+
cert_reqs=ssl.CERT_REQUIRED,
|
|
1239
|
+
ca_certs=SVN_PYTHON_ORG_ROOT_CERT)
|
|
1240
|
+
try:
|
|
1241
|
+
rc = s.connect_ex(("svn.python.org", 444))
|
|
1242
|
+
# Issue #19919: Windows machines or VMs hosted on Windows
|
|
1243
|
+
# machines sometimes return EWOULDBLOCK.
|
|
1244
|
+
self.assertIn(rc, (errno.ECONNREFUSED, errno.EWOULDBLOCK))
|
|
1245
|
+
finally:
|
|
1246
|
+
s.close()
|
|
1247
|
+
|
|
1248
|
+
def test_connect_with_context(self):
|
|
1249
|
+
with support.transient_internet("svn.python.org"):
|
|
1250
|
+
# Same as test_connect, but with a separately created context
|
|
1251
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1252
|
+
s = ctx.wrap_socket(socket.socket(socket.AF_INET))
|
|
1253
|
+
s.connect(("svn.python.org", 443))
|
|
1254
|
+
try:
|
|
1255
|
+
self.assertEqual({}, s.getpeercert())
|
|
1256
|
+
finally:
|
|
1257
|
+
s.close()
|
|
1258
|
+
# Same with a server hostname
|
|
1259
|
+
s = ctx.wrap_socket(socket.socket(socket.AF_INET),
|
|
1260
|
+
server_hostname="svn.python.org")
|
|
1261
|
+
if ssl.HAS_SNI:
|
|
1262
|
+
s.connect(("svn.python.org", 443))
|
|
1263
|
+
s.close()
|
|
1264
|
+
else:
|
|
1265
|
+
self.assertRaises(ValueError, s.connect, ("svn.python.org", 443))
|
|
1266
|
+
# This should fail because we have no verification certs
|
|
1267
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1268
|
+
s = ctx.wrap_socket(socket.socket(socket.AF_INET))
|
|
1269
|
+
self.assertRaisesRegex(ssl.SSLError, "certificate verify failed",
|
|
1270
|
+
s.connect, ("svn.python.org", 443))
|
|
1271
|
+
s.close()
|
|
1272
|
+
# This should succeed because we specify the root cert
|
|
1273
|
+
ctx.load_verify_locations(SVN_PYTHON_ORG_ROOT_CERT)
|
|
1274
|
+
s = ctx.wrap_socket(socket.socket(socket.AF_INET))
|
|
1275
|
+
s.connect(("svn.python.org", 443))
|
|
1276
|
+
try:
|
|
1277
|
+
cert = s.getpeercert()
|
|
1278
|
+
self.assertTrue(cert)
|
|
1279
|
+
finally:
|
|
1280
|
+
s.close()
|
|
1281
|
+
|
|
1282
|
+
def test_connect_capath(self):
|
|
1283
|
+
# Verify server certificates using the `capath` argument
|
|
1284
|
+
# NOTE: the subject hashing algorithm has been changed between
|
|
1285
|
+
# OpenSSL 0.9.8n and 1.0.0, as a result the capath directory must
|
|
1286
|
+
# contain both versions of each certificate (same content, different
|
|
1287
|
+
# filename) for this test to be portable across OpenSSL releases.
|
|
1288
|
+
with support.transient_internet("svn.python.org"):
|
|
1289
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1290
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1291
|
+
ctx.load_verify_locations(capath=CAPATH)
|
|
1292
|
+
s = ctx.wrap_socket(socket.socket(socket.AF_INET))
|
|
1293
|
+
s.connect(("svn.python.org", 443))
|
|
1294
|
+
try:
|
|
1295
|
+
cert = s.getpeercert()
|
|
1296
|
+
self.assertTrue(cert)
|
|
1297
|
+
finally:
|
|
1298
|
+
s.close()
|
|
1299
|
+
# Same with a bytes `capath` argument
|
|
1300
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1301
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1302
|
+
ctx.load_verify_locations(capath=BYTES_CAPATH)
|
|
1303
|
+
s = ctx.wrap_socket(socket.socket(socket.AF_INET))
|
|
1304
|
+
s.connect(("svn.python.org", 443))
|
|
1305
|
+
try:
|
|
1306
|
+
cert = s.getpeercert()
|
|
1307
|
+
self.assertTrue(cert)
|
|
1308
|
+
finally:
|
|
1309
|
+
s.close()
|
|
1310
|
+
|
|
1311
|
+
def test_connect_cadata(self):
|
|
1312
|
+
with open(CAFILE_CACERT) as f:
|
|
1313
|
+
pem = f.read()
|
|
1314
|
+
der = ssl.PEM_cert_to_DER_cert(pem)
|
|
1315
|
+
with support.transient_internet("svn.python.org"):
|
|
1316
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1317
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1318
|
+
ctx.load_verify_locations(cadata=pem)
|
|
1319
|
+
with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s:
|
|
1320
|
+
s.connect(("svn.python.org", 443))
|
|
1321
|
+
cert = s.getpeercert()
|
|
1322
|
+
self.assertTrue(cert)
|
|
1323
|
+
|
|
1324
|
+
# same with DER
|
|
1325
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1326
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1327
|
+
ctx.load_verify_locations(cadata=der)
|
|
1328
|
+
with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s:
|
|
1329
|
+
s.connect(("svn.python.org", 443))
|
|
1330
|
+
cert = s.getpeercert()
|
|
1331
|
+
self.assertTrue(cert)
|
|
1332
|
+
|
|
1333
|
+
@unittest.skipIf(os.name == "nt", "Can't use a socket as a file under Windows")
|
|
1334
|
+
def test_makefile_close(self):
|
|
1335
|
+
# Issue #5238: creating a file-like object with makefile() shouldn't
|
|
1336
|
+
# delay closing the underlying "real socket" (here tested with its
|
|
1337
|
+
# file descriptor, hence skipping the test under Windows).
|
|
1338
|
+
with support.transient_internet("svn.python.org"):
|
|
1339
|
+
ss = ssl.wrap_socket(socket.socket(socket.AF_INET))
|
|
1340
|
+
ss.connect(("svn.python.org", 443))
|
|
1341
|
+
fd = ss.fileno()
|
|
1342
|
+
f = ss.makefile()
|
|
1343
|
+
f.close()
|
|
1344
|
+
# The fd is still open
|
|
1345
|
+
os.read(fd, 0)
|
|
1346
|
+
# Closing the SSL socket should close the fd too
|
|
1347
|
+
ss.close()
|
|
1348
|
+
gc.collect()
|
|
1349
|
+
with self.assertRaises(OSError) as e:
|
|
1350
|
+
os.read(fd, 0)
|
|
1351
|
+
self.assertEqual(e.exception.errno, errno.EBADF)
|
|
1352
|
+
|
|
1353
|
+
def test_non_blocking_handshake(self):
|
|
1354
|
+
with support.transient_internet("svn.python.org"):
|
|
1355
|
+
s = socket.socket(socket.AF_INET)
|
|
1356
|
+
s.connect(("svn.python.org", 443))
|
|
1357
|
+
s.setblocking(False)
|
|
1358
|
+
s = ssl.wrap_socket(s,
|
|
1359
|
+
cert_reqs=ssl.CERT_NONE,
|
|
1360
|
+
do_handshake_on_connect=False)
|
|
1361
|
+
count = 0
|
|
1362
|
+
while True:
|
|
1363
|
+
try:
|
|
1364
|
+
count += 1
|
|
1365
|
+
s.do_handshake()
|
|
1366
|
+
break
|
|
1367
|
+
except ssl.SSLWantReadError:
|
|
1368
|
+
select.select([s], [], [])
|
|
1369
|
+
except ssl.SSLWantWriteError:
|
|
1370
|
+
select.select([], [s], [])
|
|
1371
|
+
s.close()
|
|
1372
|
+
if support.verbose:
|
|
1373
|
+
sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count)
|
|
1374
|
+
|
|
1375
|
+
def test_get_server_certificate(self):
|
|
1376
|
+
def _test_get_server_certificate(host, port, cert=None):
|
|
1377
|
+
with support.transient_internet(host):
|
|
1378
|
+
pem = ssl.get_server_certificate((host, port),
|
|
1379
|
+
ssl.PROTOCOL_SSLv23)
|
|
1380
|
+
if not pem:
|
|
1381
|
+
self.fail("No server certificate on %s:%s!" % (host, port))
|
|
1382
|
+
|
|
1383
|
+
try:
|
|
1384
|
+
pem = ssl.get_server_certificate((host, port),
|
|
1385
|
+
ssl.PROTOCOL_SSLv23,
|
|
1386
|
+
ca_certs=CERTFILE)
|
|
1387
|
+
except ssl.SSLError as x:
|
|
1388
|
+
#should fail
|
|
1389
|
+
if support.verbose:
|
|
1390
|
+
sys.stdout.write("%s\n" % x)
|
|
1391
|
+
else:
|
|
1392
|
+
self.fail("Got server certificate %s for %s:%s!" % (pem, host, port))
|
|
1393
|
+
|
|
1394
|
+
pem = ssl.get_server_certificate((host, port),
|
|
1395
|
+
ssl.PROTOCOL_SSLv23,
|
|
1396
|
+
ca_certs=cert)
|
|
1397
|
+
if not pem:
|
|
1398
|
+
self.fail("No server certificate on %s:%s!" % (host, port))
|
|
1399
|
+
if support.verbose:
|
|
1400
|
+
sys.stdout.write("\nVerified certificate for %s:%s is\n%s\n" % (host, port ,pem))
|
|
1401
|
+
|
|
1402
|
+
_test_get_server_certificate('svn.python.org', 443, SVN_PYTHON_ORG_ROOT_CERT)
|
|
1403
|
+
if support.IPV6_ENABLED:
|
|
1404
|
+
_test_get_server_certificate('ipv6.google.com', 443)
|
|
1405
|
+
|
|
1406
|
+
def test_ciphers(self):
|
|
1407
|
+
remote = ("svn.python.org", 443)
|
|
1408
|
+
with support.transient_internet(remote[0]):
|
|
1409
|
+
with ssl.wrap_socket(socket.socket(socket.AF_INET),
|
|
1410
|
+
cert_reqs=ssl.CERT_NONE, ciphers="ALL") as s:
|
|
1411
|
+
s.connect(remote)
|
|
1412
|
+
with ssl.wrap_socket(socket.socket(socket.AF_INET),
|
|
1413
|
+
cert_reqs=ssl.CERT_NONE, ciphers="DEFAULT") as s:
|
|
1414
|
+
s.connect(remote)
|
|
1415
|
+
# Error checking can happen at instantiation or when connecting
|
|
1416
|
+
with self.assertRaisesRegex(ssl.SSLError, "No cipher can be selected"):
|
|
1417
|
+
with socket.socket(socket.AF_INET) as sock:
|
|
1418
|
+
s = ssl.wrap_socket(sock,
|
|
1419
|
+
cert_reqs=ssl.CERT_NONE, ciphers="^$:,;?*'dorothyx")
|
|
1420
|
+
s.connect(remote)
|
|
1421
|
+
|
|
1422
|
+
def test_algorithms(self):
|
|
1423
|
+
# Issue #8484: all algorithms should be available when verifying a
|
|
1424
|
+
# certificate.
|
|
1425
|
+
# SHA256 was added in OpenSSL 0.9.8
|
|
1426
|
+
if ssl.OPENSSL_VERSION_INFO < (0, 9, 8, 0, 15):
|
|
1427
|
+
self.skipTest("SHA256 not available on %r" % ssl.OPENSSL_VERSION)
|
|
1428
|
+
# sha256.tbs-internet.com needs SNI to use the correct certificate
|
|
1429
|
+
if not ssl.HAS_SNI:
|
|
1430
|
+
self.skipTest("SNI needed for this test")
|
|
1431
|
+
# https://sha2.hboeck.de/ was used until 2011-01-08 (no route to host)
|
|
1432
|
+
remote = ("sha256.tbs-internet.com", 443)
|
|
1433
|
+
sha256_cert = os.path.join(os.path.dirname(__file__), "sha256.pem")
|
|
1434
|
+
with support.transient_internet("sha256.tbs-internet.com"):
|
|
1435
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1436
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1437
|
+
ctx.load_verify_locations(sha256_cert)
|
|
1438
|
+
s = ctx.wrap_socket(socket.socket(socket.AF_INET),
|
|
1439
|
+
server_hostname="sha256.tbs-internet.com")
|
|
1440
|
+
try:
|
|
1441
|
+
s.connect(remote)
|
|
1442
|
+
if support.verbose:
|
|
1443
|
+
sys.stdout.write("\nCipher with %r is %r\n" %
|
|
1444
|
+
(remote, s.cipher()))
|
|
1445
|
+
sys.stdout.write("Certificate is:\n%s\n" %
|
|
1446
|
+
pprint.pformat(s.getpeercert()))
|
|
1447
|
+
finally:
|
|
1448
|
+
s.close()
|
|
1449
|
+
|
|
1450
|
+
def test_get_ca_certs_capath(self):
|
|
1451
|
+
# capath certs are loaded on request
|
|
1452
|
+
with support.transient_internet("svn.python.org"):
|
|
1453
|
+
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1454
|
+
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1455
|
+
ctx.load_verify_locations(capath=CAPATH)
|
|
1456
|
+
self.assertEqual(ctx.get_ca_certs(), [])
|
|
1457
|
+
s = ctx.wrap_socket(socket.socket(socket.AF_INET))
|
|
1458
|
+
s.connect(("svn.python.org", 443))
|
|
1459
|
+
try:
|
|
1460
|
+
cert = s.getpeercert()
|
|
1461
|
+
self.assertTrue(cert)
|
|
1462
|
+
finally:
|
|
1463
|
+
s.close()
|
|
1464
|
+
self.assertEqual(len(ctx.get_ca_certs()), 1)
|
|
1465
|
+
|
|
1466
|
+
@needs_sni
|
|
1467
|
+
def test_context_setget(self):
|
|
1468
|
+
# Check that the context of a connected socket can be replaced.
|
|
1469
|
+
with support.transient_internet("svn.python.org"):
|
|
1470
|
+
ctx1 = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1471
|
+
ctx2 = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1472
|
+
s = socket.socket(socket.AF_INET)
|
|
1473
|
+
with ctx1.wrap_socket(s) as ss:
|
|
1474
|
+
ss.connect(("svn.python.org", 443))
|
|
1475
|
+
self.assertIs(ss.context, ctx1)
|
|
1476
|
+
self.assertIs(ss._sslobj.context, ctx1)
|
|
1477
|
+
ss.context = ctx2
|
|
1478
|
+
self.assertIs(ss.context, ctx2)
|
|
1479
|
+
self.assertIs(ss._sslobj.context, ctx2)
|
|
1480
|
+
|
|
1481
|
+
try:
|
|
1482
|
+
import threading
|
|
1483
|
+
except ImportError:
|
|
1484
|
+
_have_threads = False
|
|
1485
|
+
else:
|
|
1486
|
+
_have_threads = True
|
|
1487
|
+
|
|
1488
|
+
from test.ssl_servers import make_https_server
|
|
1489
|
+
|
|
1490
|
+
class ThreadedEchoServer(threading.Thread):
|
|
1491
|
+
|
|
1492
|
+
class ConnectionHandler(threading.Thread):
|
|
1493
|
+
|
|
1494
|
+
"""A mildly complicated class, because we want it to work both
|
|
1495
|
+
with and without the SSL wrapper around the socket connection, so
|
|
1496
|
+
that we can test the STARTTLS functionality."""
|
|
1497
|
+
|
|
1498
|
+
def __init__(self, server, connsock, addr):
|
|
1499
|
+
self.server = server
|
|
1500
|
+
self.running = False
|
|
1501
|
+
self.sock = connsock
|
|
1502
|
+
self.addr = addr
|
|
1503
|
+
self.sock.setblocking(1)
|
|
1504
|
+
self.sslconn = None
|
|
1505
|
+
threading.Thread.__init__(self)
|
|
1506
|
+
self.daemon = True
|
|
1507
|
+
|
|
1508
|
+
def wrap_conn(self):
|
|
1509
|
+
try:
|
|
1510
|
+
self.sslconn = self.server.context.wrap_socket(
|
|
1511
|
+
self.sock, server_side=True)
|
|
1512
|
+
self.server.selected_protocols.append(self.sslconn.selected_npn_protocol())
|
|
1513
|
+
except (ssl.SSLError, ConnectionResetError) as e:
|
|
1514
|
+
# We treat ConnectionResetError as though it were an
|
|
1515
|
+
# SSLError - OpenSSL on Ubuntu abruptly closes the
|
|
1516
|
+
# connection when asked to use an unsupported protocol.
|
|
1517
|
+
#
|
|
1518
|
+
# XXX Various errors can have happened here, for example
|
|
1519
|
+
# a mismatching protocol version, an invalid certificate,
|
|
1520
|
+
# or a low-level bug. This should be made more discriminating.
|
|
1521
|
+
self.server.conn_errors.append(e)
|
|
1522
|
+
if self.server.chatty:
|
|
1523
|
+
handle_error("\n server: bad connection attempt from " + repr(self.addr) + ":\n")
|
|
1524
|
+
self.running = False
|
|
1525
|
+
self.server.stop()
|
|
1526
|
+
self.close()
|
|
1527
|
+
return False
|
|
1528
|
+
else:
|
|
1529
|
+
if self.server.context.verify_mode == ssl.CERT_REQUIRED:
|
|
1530
|
+
cert = self.sslconn.getpeercert()
|
|
1531
|
+
if support.verbose and self.server.chatty:
|
|
1532
|
+
sys.stdout.write(" client cert is " + pprint.pformat(cert) + "\n")
|
|
1533
|
+
cert_binary = self.sslconn.getpeercert(True)
|
|
1534
|
+
if support.verbose and self.server.chatty:
|
|
1535
|
+
sys.stdout.write(" cert binary is " + str(len(cert_binary)) + " bytes\n")
|
|
1536
|
+
cipher = self.sslconn.cipher()
|
|
1537
|
+
if support.verbose and self.server.chatty:
|
|
1538
|
+
sys.stdout.write(" server: connection cipher is now " + str(cipher) + "\n")
|
|
1539
|
+
sys.stdout.write(" server: selected protocol is now "
|
|
1540
|
+
+ str(self.sslconn.selected_npn_protocol()) + "\n")
|
|
1541
|
+
return True
|
|
1542
|
+
|
|
1543
|
+
def read(self):
|
|
1544
|
+
if self.sslconn:
|
|
1545
|
+
return self.sslconn.read()
|
|
1546
|
+
else:
|
|
1547
|
+
return self.sock.recv(1024)
|
|
1548
|
+
|
|
1549
|
+
def write(self, bytes):
|
|
1550
|
+
if self.sslconn:
|
|
1551
|
+
return self.sslconn.write(bytes)
|
|
1552
|
+
else:
|
|
1553
|
+
return self.sock.send(bytes)
|
|
1554
|
+
|
|
1555
|
+
def close(self):
|
|
1556
|
+
if self.sslconn:
|
|
1557
|
+
self.sslconn.close()
|
|
1558
|
+
else:
|
|
1559
|
+
self.sock.close()
|
|
1560
|
+
|
|
1561
|
+
def run(self):
|
|
1562
|
+
self.running = True
|
|
1563
|
+
if not self.server.starttls_server:
|
|
1564
|
+
if not self.wrap_conn():
|
|
1565
|
+
return
|
|
1566
|
+
while self.running:
|
|
1567
|
+
try:
|
|
1568
|
+
msg = self.read()
|
|
1569
|
+
stripped = msg.strip()
|
|
1570
|
+
if not stripped:
|
|
1571
|
+
# eof, so quit this handler
|
|
1572
|
+
self.running = False
|
|
1573
|
+
self.close()
|
|
1574
|
+
elif stripped == b'over':
|
|
1575
|
+
if support.verbose and self.server.connectionchatty:
|
|
1576
|
+
sys.stdout.write(" server: client closed connection\n")
|
|
1577
|
+
self.close()
|
|
1578
|
+
return
|
|
1579
|
+
elif (self.server.starttls_server and
|
|
1580
|
+
stripped == b'STARTTLS'):
|
|
1581
|
+
if support.verbose and self.server.connectionchatty:
|
|
1582
|
+
sys.stdout.write(" server: read STARTTLS from client, sending OK...\n")
|
|
1583
|
+
self.write(b"OK\n")
|
|
1584
|
+
if not self.wrap_conn():
|
|
1585
|
+
return
|
|
1586
|
+
elif (self.server.starttls_server and self.sslconn
|
|
1587
|
+
and stripped == b'ENDTLS'):
|
|
1588
|
+
if support.verbose and self.server.connectionchatty:
|
|
1589
|
+
sys.stdout.write(" server: read ENDTLS from client, sending OK...\n")
|
|
1590
|
+
self.write(b"OK\n")
|
|
1591
|
+
self.sock = self.sslconn.unwrap()
|
|
1592
|
+
self.sslconn = None
|
|
1593
|
+
if support.verbose and self.server.connectionchatty:
|
|
1594
|
+
sys.stdout.write(" server: connection is now unencrypted...\n")
|
|
1595
|
+
elif stripped == b'CB tls-unique':
|
|
1596
|
+
if support.verbose and self.server.connectionchatty:
|
|
1597
|
+
sys.stdout.write(" server: read CB tls-unique from client, sending our CB data...\n")
|
|
1598
|
+
data = self.sslconn.get_channel_binding("tls-unique")
|
|
1599
|
+
self.write(repr(data).encode("us-ascii") + b"\n")
|
|
1600
|
+
else:
|
|
1601
|
+
if (support.verbose and
|
|
1602
|
+
self.server.connectionchatty):
|
|
1603
|
+
ctype = (self.sslconn and "encrypted") or "unencrypted"
|
|
1604
|
+
sys.stdout.write(" server: read %r (%s), sending back %r (%s)...\n"
|
|
1605
|
+
% (msg, ctype, msg.lower(), ctype))
|
|
1606
|
+
self.write(msg.lower())
|
|
1607
|
+
except OSError:
|
|
1608
|
+
if self.server.chatty:
|
|
1609
|
+
handle_error("Test server failure:\n")
|
|
1610
|
+
self.close()
|
|
1611
|
+
self.running = False
|
|
1612
|
+
# normally, we'd just stop here, but for the test
|
|
1613
|
+
# harness, we want to stop the server
|
|
1614
|
+
self.server.stop()
|
|
1615
|
+
|
|
1616
|
+
def __init__(self, certificate=None, ssl_version=None,
|
|
1617
|
+
certreqs=None, cacerts=None,
|
|
1618
|
+
chatty=True, connectionchatty=False, starttls_server=False,
|
|
1619
|
+
npn_protocols=None, ciphers=None, context=None):
|
|
1620
|
+
if context:
|
|
1621
|
+
self.context = context
|
|
1622
|
+
else:
|
|
1623
|
+
self.context = ssl.SSLContext(ssl_version
|
|
1624
|
+
if ssl_version is not None
|
|
1625
|
+
else ssl.PROTOCOL_TLSv1)
|
|
1626
|
+
self.context.verify_mode = (certreqs if certreqs is not None
|
|
1627
|
+
else ssl.CERT_NONE)
|
|
1628
|
+
if cacerts:
|
|
1629
|
+
self.context.load_verify_locations(cacerts)
|
|
1630
|
+
if certificate:
|
|
1631
|
+
self.context.load_cert_chain(certificate)
|
|
1632
|
+
if npn_protocols:
|
|
1633
|
+
self.context.set_npn_protocols(npn_protocols)
|
|
1634
|
+
if ciphers:
|
|
1635
|
+
self.context.set_ciphers(ciphers)
|
|
1636
|
+
self.chatty = chatty
|
|
1637
|
+
self.connectionchatty = connectionchatty
|
|
1638
|
+
self.starttls_server = starttls_server
|
|
1639
|
+
self.sock = socket.socket()
|
|
1640
|
+
self.port = support.bind_port(self.sock)
|
|
1641
|
+
self.flag = None
|
|
1642
|
+
self.active = False
|
|
1643
|
+
self.selected_protocols = []
|
|
1644
|
+
self.conn_errors = []
|
|
1645
|
+
threading.Thread.__init__(self)
|
|
1646
|
+
self.daemon = True
|
|
1647
|
+
|
|
1648
|
+
def __enter__(self):
|
|
1649
|
+
self.start(threading.Event())
|
|
1650
|
+
self.flag.wait()
|
|
1651
|
+
return self
|
|
1652
|
+
|
|
1653
|
+
def __exit__(self, *args):
|
|
1654
|
+
self.stop()
|
|
1655
|
+
self.join()
|
|
1656
|
+
|
|
1657
|
+
def start(self, flag=None):
|
|
1658
|
+
self.flag = flag
|
|
1659
|
+
threading.Thread.start(self)
|
|
1660
|
+
|
|
1661
|
+
def run(self):
|
|
1662
|
+
self.sock.settimeout(0.05)
|
|
1663
|
+
self.sock.listen(5)
|
|
1664
|
+
self.active = True
|
|
1665
|
+
if self.flag:
|
|
1666
|
+
# signal an event
|
|
1667
|
+
self.flag.set()
|
|
1668
|
+
while self.active:
|
|
1669
|
+
try:
|
|
1670
|
+
newconn, connaddr = self.sock.accept()
|
|
1671
|
+
if support.verbose and self.chatty:
|
|
1672
|
+
sys.stdout.write(' server: new connection from '
|
|
1673
|
+
+ repr(connaddr) + '\n')
|
|
1674
|
+
handler = self.ConnectionHandler(self, newconn, connaddr)
|
|
1675
|
+
handler.start()
|
|
1676
|
+
handler.join()
|
|
1677
|
+
except socket.timeout:
|
|
1678
|
+
pass
|
|
1679
|
+
except KeyboardInterrupt:
|
|
1680
|
+
self.stop()
|
|
1681
|
+
self.sock.close()
|
|
1682
|
+
|
|
1683
|
+
def stop(self):
|
|
1684
|
+
self.active = False
|
|
1685
|
+
|
|
1686
|
+
class AsyncoreEchoServer(threading.Thread):
|
|
1687
|
+
|
|
1688
|
+
# this one's based on asyncore.dispatcher
|
|
1689
|
+
|
|
1690
|
+
class EchoServer (asyncore.dispatcher):
|
|
1691
|
+
|
|
1692
|
+
class ConnectionHandler (asyncore.dispatcher_with_send):
|
|
1693
|
+
|
|
1694
|
+
def __init__(self, conn, certfile):
|
|
1695
|
+
self.socket = ssl.wrap_socket(conn, server_side=True,
|
|
1696
|
+
certfile=certfile,
|
|
1697
|
+
do_handshake_on_connect=False)
|
|
1698
|
+
asyncore.dispatcher_with_send.__init__(self, self.socket)
|
|
1699
|
+
self._ssl_accepting = True
|
|
1700
|
+
self._do_ssl_handshake()
|
|
1701
|
+
|
|
1702
|
+
def readable(self):
|
|
1703
|
+
if isinstance(self.socket, ssl.SSLSocket):
|
|
1704
|
+
while self.socket.pending() > 0:
|
|
1705
|
+
self.handle_read_event()
|
|
1706
|
+
return True
|
|
1707
|
+
|
|
1708
|
+
def _do_ssl_handshake(self):
|
|
1709
|
+
try:
|
|
1710
|
+
self.socket.do_handshake()
|
|
1711
|
+
except (ssl.SSLWantReadError, ssl.SSLWantWriteError):
|
|
1712
|
+
return
|
|
1713
|
+
except ssl.SSLEOFError:
|
|
1714
|
+
return self.handle_close()
|
|
1715
|
+
except ssl.SSLError:
|
|
1716
|
+
raise
|
|
1717
|
+
except OSError as err:
|
|
1718
|
+
if err.args[0] == errno.ECONNABORTED:
|
|
1719
|
+
return self.handle_close()
|
|
1720
|
+
else:
|
|
1721
|
+
self._ssl_accepting = False
|
|
1722
|
+
|
|
1723
|
+
def handle_read(self):
|
|
1724
|
+
if self._ssl_accepting:
|
|
1725
|
+
self._do_ssl_handshake()
|
|
1726
|
+
else:
|
|
1727
|
+
data = self.recv(1024)
|
|
1728
|
+
if support.verbose:
|
|
1729
|
+
sys.stdout.write(" server: read %s from client\n" % repr(data))
|
|
1730
|
+
if not data:
|
|
1731
|
+
self.close()
|
|
1732
|
+
else:
|
|
1733
|
+
self.send(data.lower())
|
|
1734
|
+
|
|
1735
|
+
def handle_close(self):
|
|
1736
|
+
self.close()
|
|
1737
|
+
if support.verbose:
|
|
1738
|
+
sys.stdout.write(" server: closed connection %s\n" % self.socket)
|
|
1739
|
+
|
|
1740
|
+
def handle_error(self):
|
|
1741
|
+
raise
|
|
1742
|
+
|
|
1743
|
+
def __init__(self, certfile):
|
|
1744
|
+
self.certfile = certfile
|
|
1745
|
+
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
1746
|
+
self.port = support.bind_port(sock, '')
|
|
1747
|
+
asyncore.dispatcher.__init__(self, sock)
|
|
1748
|
+
self.listen(5)
|
|
1749
|
+
|
|
1750
|
+
def handle_accepted(self, sock_obj, addr):
|
|
1751
|
+
if support.verbose:
|
|
1752
|
+
sys.stdout.write(" server: new connection from %s:%s\n" %addr)
|
|
1753
|
+
self.ConnectionHandler(sock_obj, self.certfile)
|
|
1754
|
+
|
|
1755
|
+
def handle_error(self):
|
|
1756
|
+
raise
|
|
1757
|
+
|
|
1758
|
+
def __init__(self, certfile):
|
|
1759
|
+
self.flag = None
|
|
1760
|
+
self.active = False
|
|
1761
|
+
self.server = self.EchoServer(certfile)
|
|
1762
|
+
self.port = self.server.port
|
|
1763
|
+
threading.Thread.__init__(self)
|
|
1764
|
+
self.daemon = True
|
|
1765
|
+
|
|
1766
|
+
def __str__(self):
|
|
1767
|
+
return "<%s %s>" % (self.__class__.__name__, self.server)
|
|
1768
|
+
|
|
1769
|
+
def __enter__(self):
|
|
1770
|
+
self.start(threading.Event())
|
|
1771
|
+
self.flag.wait()
|
|
1772
|
+
return self
|
|
1773
|
+
|
|
1774
|
+
def __exit__(self, *args):
|
|
1775
|
+
if support.verbose:
|
|
1776
|
+
sys.stdout.write(" cleanup: stopping server.\n")
|
|
1777
|
+
self.stop()
|
|
1778
|
+
if support.verbose:
|
|
1779
|
+
sys.stdout.write(" cleanup: joining server thread.\n")
|
|
1780
|
+
self.join()
|
|
1781
|
+
if support.verbose:
|
|
1782
|
+
sys.stdout.write(" cleanup: successfully joined.\n")
|
|
1783
|
+
|
|
1784
|
+
def start (self, flag=None):
|
|
1785
|
+
self.flag = flag
|
|
1786
|
+
threading.Thread.start(self)
|
|
1787
|
+
|
|
1788
|
+
def run(self):
|
|
1789
|
+
self.active = True
|
|
1790
|
+
if self.flag:
|
|
1791
|
+
self.flag.set()
|
|
1792
|
+
while self.active:
|
|
1793
|
+
try:
|
|
1794
|
+
asyncore.loop(1)
|
|
1795
|
+
except:
|
|
1796
|
+
pass
|
|
1797
|
+
|
|
1798
|
+
def stop(self):
|
|
1799
|
+
self.active = False
|
|
1800
|
+
self.server.close()
|
|
1801
|
+
|
|
1802
|
+
def bad_cert_test(certfile):
|
|
1803
|
+
"""
|
|
1804
|
+
Launch a server with CERT_REQUIRED, and check that trying to
|
|
1805
|
+
connect to it with the given client certificate fails.
|
|
1806
|
+
"""
|
|
1807
|
+
server = ThreadedEchoServer(CERTFILE,
|
|
1808
|
+
certreqs=ssl.CERT_REQUIRED,
|
|
1809
|
+
cacerts=CERTFILE, chatty=False,
|
|
1810
|
+
connectionchatty=False)
|
|
1811
|
+
with server:
|
|
1812
|
+
try:
|
|
1813
|
+
with socket.socket() as sock:
|
|
1814
|
+
s = ssl.wrap_socket(sock,
|
|
1815
|
+
certfile=certfile,
|
|
1816
|
+
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
1817
|
+
s.connect((HOST, server.port))
|
|
1818
|
+
except ssl.SSLError as x:
|
|
1819
|
+
if support.verbose:
|
|
1820
|
+
sys.stdout.write("\nSSLError is %s\n" % x.args[1])
|
|
1821
|
+
except OSError as x:
|
|
1822
|
+
if support.verbose:
|
|
1823
|
+
sys.stdout.write("\nOSError is %s\n" % x.args[1])
|
|
1824
|
+
except OSError as x:
|
|
1825
|
+
if x.errno != errno.ENOENT:
|
|
1826
|
+
raise
|
|
1827
|
+
if support.verbose:
|
|
1828
|
+
sys.stdout.write("\OSError is %s\n" % str(x))
|
|
1829
|
+
else:
|
|
1830
|
+
raise AssertionError("Use of invalid cert should have failed!")
|
|
1831
|
+
|
|
1832
|
+
def server_params_test(client_context, server_context, indata=b"FOO\n",
|
|
1833
|
+
chatty=True, connectionchatty=False, sni_name=None):
|
|
1834
|
+
"""
|
|
1835
|
+
Launch a server, connect a client to it and try various reads
|
|
1836
|
+
and writes.
|
|
1837
|
+
"""
|
|
1838
|
+
stats = {}
|
|
1839
|
+
server = ThreadedEchoServer(context=server_context,
|
|
1840
|
+
chatty=chatty,
|
|
1841
|
+
connectionchatty=False)
|
|
1842
|
+
with server:
|
|
1843
|
+
with client_context.wrap_socket(socket.socket(),
|
|
1844
|
+
server_hostname=sni_name) as s:
|
|
1845
|
+
s.connect((HOST, server.port))
|
|
1846
|
+
for arg in [indata, bytearray(indata), memoryview(indata)]:
|
|
1847
|
+
if connectionchatty:
|
|
1848
|
+
if support.verbose:
|
|
1849
|
+
sys.stdout.write(
|
|
1850
|
+
" client: sending %r...\n" % indata)
|
|
1851
|
+
s.write(arg)
|
|
1852
|
+
outdata = s.read()
|
|
1853
|
+
if connectionchatty:
|
|
1854
|
+
if support.verbose:
|
|
1855
|
+
sys.stdout.write(" client: read %r\n" % outdata)
|
|
1856
|
+
if outdata != indata.lower():
|
|
1857
|
+
raise AssertionError(
|
|
1858
|
+
"bad data <<%r>> (%d) received; expected <<%r>> (%d)\n"
|
|
1859
|
+
% (outdata[:20], len(outdata),
|
|
1860
|
+
indata[:20].lower(), len(indata)))
|
|
1861
|
+
s.write(b"over\n")
|
|
1862
|
+
if connectionchatty:
|
|
1863
|
+
if support.verbose:
|
|
1864
|
+
sys.stdout.write(" client: closing connection.\n")
|
|
1865
|
+
stats.update({
|
|
1866
|
+
'compression': s.compression(),
|
|
1867
|
+
'cipher': s.cipher(),
|
|
1868
|
+
'peercert': s.getpeercert(),
|
|
1869
|
+
'client_npn_protocol': s.selected_npn_protocol()
|
|
1870
|
+
})
|
|
1871
|
+
s.close()
|
|
1872
|
+
stats['server_npn_protocols'] = server.selected_protocols
|
|
1873
|
+
return stats
|
|
1874
|
+
|
|
1875
|
+
def try_protocol_combo(server_protocol, client_protocol, expect_success,
|
|
1876
|
+
certsreqs=None, server_options=0, client_options=0):
|
|
1877
|
+
if certsreqs is None:
|
|
1878
|
+
certsreqs = ssl.CERT_NONE
|
|
1879
|
+
certtype = {
|
|
1880
|
+
ssl.CERT_NONE: "CERT_NONE",
|
|
1881
|
+
ssl.CERT_OPTIONAL: "CERT_OPTIONAL",
|
|
1882
|
+
ssl.CERT_REQUIRED: "CERT_REQUIRED",
|
|
1883
|
+
}[certsreqs]
|
|
1884
|
+
if support.verbose:
|
|
1885
|
+
formatstr = (expect_success and " %s->%s %s\n") or " {%s->%s} %s\n"
|
|
1886
|
+
sys.stdout.write(formatstr %
|
|
1887
|
+
(ssl.get_protocol_name(client_protocol),
|
|
1888
|
+
ssl.get_protocol_name(server_protocol),
|
|
1889
|
+
certtype))
|
|
1890
|
+
client_context = ssl.SSLContext(client_protocol)
|
|
1891
|
+
client_context.options |= client_options
|
|
1892
|
+
server_context = ssl.SSLContext(server_protocol)
|
|
1893
|
+
server_context.options |= server_options
|
|
1894
|
+
|
|
1895
|
+
# NOTE: we must enable "ALL" ciphers on the client, otherwise an
|
|
1896
|
+
# SSLv23 client will send an SSLv3 hello (rather than SSLv2)
|
|
1897
|
+
# starting from OpenSSL 1.0.0 (see issue #8322).
|
|
1898
|
+
if client_context.protocol == ssl.PROTOCOL_SSLv23:
|
|
1899
|
+
client_context.set_ciphers("ALL")
|
|
1900
|
+
|
|
1901
|
+
for ctx in (client_context, server_context):
|
|
1902
|
+
ctx.verify_mode = certsreqs
|
|
1903
|
+
ctx.load_cert_chain(CERTFILE)
|
|
1904
|
+
ctx.load_verify_locations(CERTFILE)
|
|
1905
|
+
try:
|
|
1906
|
+
server_params_test(client_context, server_context,
|
|
1907
|
+
chatty=False, connectionchatty=False)
|
|
1908
|
+
# Protocol mismatch can result in either an SSLError, or a
|
|
1909
|
+
# "Connection reset by peer" error.
|
|
1910
|
+
except ssl.SSLError:
|
|
1911
|
+
if expect_success:
|
|
1912
|
+
raise
|
|
1913
|
+
except OSError as e:
|
|
1914
|
+
if expect_success or e.errno != errno.ECONNRESET:
|
|
1915
|
+
raise
|
|
1916
|
+
else:
|
|
1917
|
+
if not expect_success:
|
|
1918
|
+
raise AssertionError(
|
|
1919
|
+
"Client protocol %s succeeded with server protocol %s!"
|
|
1920
|
+
% (ssl.get_protocol_name(client_protocol),
|
|
1921
|
+
ssl.get_protocol_name(server_protocol)))
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
class ThreadedTests(unittest.TestCase):
|
|
1925
|
+
|
|
1926
|
+
@skip_if_broken_ubuntu_ssl
|
|
1927
|
+
def test_echo(self):
|
|
1928
|
+
"""Basic test of an SSL client connecting to a server"""
|
|
1929
|
+
if support.verbose:
|
|
1930
|
+
sys.stdout.write("\n")
|
|
1931
|
+
for protocol in PROTOCOLS:
|
|
1932
|
+
with self.subTest(protocol=ssl._PROTOCOL_NAMES[protocol]):
|
|
1933
|
+
context = ssl.SSLContext(protocol)
|
|
1934
|
+
context.load_cert_chain(CERTFILE)
|
|
1935
|
+
server_params_test(context, context,
|
|
1936
|
+
chatty=True, connectionchatty=True)
|
|
1937
|
+
|
|
1938
|
+
def test_getpeercert(self):
|
|
1939
|
+
if support.verbose:
|
|
1940
|
+
sys.stdout.write("\n")
|
|
1941
|
+
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1942
|
+
context.verify_mode = ssl.CERT_REQUIRED
|
|
1943
|
+
context.load_verify_locations(CERTFILE)
|
|
1944
|
+
context.load_cert_chain(CERTFILE)
|
|
1945
|
+
server = ThreadedEchoServer(context=context, chatty=False)
|
|
1946
|
+
with server:
|
|
1947
|
+
s = context.wrap_socket(socket.socket(),
|
|
1948
|
+
do_handshake_on_connect=False)
|
|
1949
|
+
s.connect((HOST, server.port))
|
|
1950
|
+
# getpeercert() raise ValueError while the handshake isn't
|
|
1951
|
+
# done.
|
|
1952
|
+
with self.assertRaises(ValueError):
|
|
1953
|
+
s.getpeercert()
|
|
1954
|
+
s.do_handshake()
|
|
1955
|
+
cert = s.getpeercert()
|
|
1956
|
+
self.assertTrue(cert, "Can't get peer certificate.")
|
|
1957
|
+
cipher = s.cipher()
|
|
1958
|
+
if support.verbose:
|
|
1959
|
+
sys.stdout.write(pprint.pformat(cert) + '\n')
|
|
1960
|
+
sys.stdout.write("Connection cipher is " + str(cipher) + '.\n')
|
|
1961
|
+
if 'subject' not in cert:
|
|
1962
|
+
self.fail("No subject field in certificate: %s." %
|
|
1963
|
+
pprint.pformat(cert))
|
|
1964
|
+
if ((('organizationName', 'Python Software Foundation'),)
|
|
1965
|
+
not in cert['subject']):
|
|
1966
|
+
self.fail(
|
|
1967
|
+
"Missing or invalid 'organizationName' field in certificate subject; "
|
|
1968
|
+
"should be 'Python Software Foundation'.")
|
|
1969
|
+
self.assertIn('notBefore', cert)
|
|
1970
|
+
self.assertIn('notAfter', cert)
|
|
1971
|
+
before = ssl.cert_time_to_seconds(cert['notBefore'])
|
|
1972
|
+
after = ssl.cert_time_to_seconds(cert['notAfter'])
|
|
1973
|
+
self.assertLess(before, after)
|
|
1974
|
+
s.close()
|
|
1975
|
+
|
|
1976
|
+
@unittest.skipUnless(have_verify_flags(),
|
|
1977
|
+
"verify_flags need OpenSSL > 0.9.8")
|
|
1978
|
+
def test_crl_check(self):
|
|
1979
|
+
if support.verbose:
|
|
1980
|
+
sys.stdout.write("\n")
|
|
1981
|
+
|
|
1982
|
+
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1983
|
+
server_context.load_cert_chain(SIGNED_CERTFILE)
|
|
1984
|
+
|
|
1985
|
+
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1986
|
+
context.verify_mode = ssl.CERT_REQUIRED
|
|
1987
|
+
context.load_verify_locations(SIGNING_CA)
|
|
1988
|
+
self.assertEqual(context.verify_flags, ssl.VERIFY_DEFAULT)
|
|
1989
|
+
|
|
1990
|
+
# VERIFY_DEFAULT should pass
|
|
1991
|
+
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
1992
|
+
with server:
|
|
1993
|
+
with context.wrap_socket(socket.socket()) as s:
|
|
1994
|
+
s.connect((HOST, server.port))
|
|
1995
|
+
cert = s.getpeercert()
|
|
1996
|
+
self.assertTrue(cert, "Can't get peer certificate.")
|
|
1997
|
+
|
|
1998
|
+
# VERIFY_CRL_CHECK_LEAF without a loaded CRL file fails
|
|
1999
|
+
context.verify_flags |= ssl.VERIFY_CRL_CHECK_LEAF
|
|
2000
|
+
|
|
2001
|
+
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2002
|
+
with server:
|
|
2003
|
+
with context.wrap_socket(socket.socket()) as s:
|
|
2004
|
+
with self.assertRaisesRegex(ssl.SSLError,
|
|
2005
|
+
"certificate verify failed"):
|
|
2006
|
+
s.connect((HOST, server.port))
|
|
2007
|
+
|
|
2008
|
+
# now load a CRL file. The CRL file is signed by the CA.
|
|
2009
|
+
context.load_verify_locations(CRLFILE)
|
|
2010
|
+
|
|
2011
|
+
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2012
|
+
with server:
|
|
2013
|
+
with context.wrap_socket(socket.socket()) as s:
|
|
2014
|
+
s.connect((HOST, server.port))
|
|
2015
|
+
cert = s.getpeercert()
|
|
2016
|
+
self.assertTrue(cert, "Can't get peer certificate.")
|
|
2017
|
+
|
|
2018
|
+
@needs_sni
|
|
2019
|
+
def test_check_hostname(self):
|
|
2020
|
+
if support.verbose:
|
|
2021
|
+
sys.stdout.write("\n")
|
|
2022
|
+
|
|
2023
|
+
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2024
|
+
server_context.load_cert_chain(SIGNED_CERTFILE)
|
|
2025
|
+
|
|
2026
|
+
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2027
|
+
context.verify_mode = ssl.CERT_REQUIRED
|
|
2028
|
+
context.check_hostname = True
|
|
2029
|
+
context.load_verify_locations(SIGNING_CA)
|
|
2030
|
+
|
|
2031
|
+
# correct hostname should verify
|
|
2032
|
+
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2033
|
+
with server:
|
|
2034
|
+
with context.wrap_socket(socket.socket(),
|
|
2035
|
+
server_hostname="localhost") as s:
|
|
2036
|
+
s.connect((HOST, server.port))
|
|
2037
|
+
cert = s.getpeercert()
|
|
2038
|
+
self.assertTrue(cert, "Can't get peer certificate.")
|
|
2039
|
+
|
|
2040
|
+
# incorrect hostname should raise an exception
|
|
2041
|
+
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2042
|
+
with server:
|
|
2043
|
+
with context.wrap_socket(socket.socket(),
|
|
2044
|
+
server_hostname="invalid") as s:
|
|
2045
|
+
with self.assertRaisesRegex(ssl.CertificateError,
|
|
2046
|
+
"hostname 'invalid' doesn't match 'localhost'"):
|
|
2047
|
+
s.connect((HOST, server.port))
|
|
2048
|
+
|
|
2049
|
+
# missing server_hostname arg should cause an exception, too
|
|
2050
|
+
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2051
|
+
with server:
|
|
2052
|
+
with socket.socket() as s:
|
|
2053
|
+
with self.assertRaisesRegex(ValueError,
|
|
2054
|
+
"check_hostname requires server_hostname"):
|
|
2055
|
+
context.wrap_socket(s)
|
|
2056
|
+
|
|
2057
|
+
def test_empty_cert(self):
|
|
2058
|
+
"""Connecting with an empty cert file"""
|
|
2059
|
+
bad_cert_test(os.path.join(os.path.dirname(__file__) or os.curdir,
|
|
2060
|
+
"nullcert.pem"))
|
|
2061
|
+
def test_malformed_cert(self):
|
|
2062
|
+
"""Connecting with a badly formatted certificate (syntax error)"""
|
|
2063
|
+
bad_cert_test(os.path.join(os.path.dirname(__file__) or os.curdir,
|
|
2064
|
+
"badcert.pem"))
|
|
2065
|
+
def test_nonexisting_cert(self):
|
|
2066
|
+
"""Connecting with a non-existing cert file"""
|
|
2067
|
+
bad_cert_test(os.path.join(os.path.dirname(__file__) or os.curdir,
|
|
2068
|
+
"wrongcert.pem"))
|
|
2069
|
+
def test_malformed_key(self):
|
|
2070
|
+
"""Connecting with a badly formatted key (syntax error)"""
|
|
2071
|
+
bad_cert_test(os.path.join(os.path.dirname(__file__) or os.curdir,
|
|
2072
|
+
"badkey.pem"))
|
|
2073
|
+
|
|
2074
|
+
def test_rude_shutdown(self):
|
|
2075
|
+
"""A brutal shutdown of an SSL server should raise an OSError
|
|
2076
|
+
in the client when attempting handshake.
|
|
2077
|
+
"""
|
|
2078
|
+
listener_ready = threading.Event()
|
|
2079
|
+
listener_gone = threading.Event()
|
|
2080
|
+
|
|
2081
|
+
s = socket.socket()
|
|
2082
|
+
port = support.bind_port(s, HOST)
|
|
2083
|
+
|
|
2084
|
+
# `listener` runs in a thread. It sits in an accept() until
|
|
2085
|
+
# the main thread connects. Then it rudely closes the socket,
|
|
2086
|
+
# and sets Event `listener_gone` to let the main thread know
|
|
2087
|
+
# the socket is gone.
|
|
2088
|
+
def listener():
|
|
2089
|
+
s.listen(5)
|
|
2090
|
+
listener_ready.set()
|
|
2091
|
+
newsock, addr = s.accept()
|
|
2092
|
+
newsock.close()
|
|
2093
|
+
s.close()
|
|
2094
|
+
listener_gone.set()
|
|
2095
|
+
|
|
2096
|
+
def connector():
|
|
2097
|
+
listener_ready.wait()
|
|
2098
|
+
with socket.socket() as c:
|
|
2099
|
+
c.connect((HOST, port))
|
|
2100
|
+
listener_gone.wait()
|
|
2101
|
+
try:
|
|
2102
|
+
ssl_sock = ssl.wrap_socket(c)
|
|
2103
|
+
except OSError:
|
|
2104
|
+
pass
|
|
2105
|
+
else:
|
|
2106
|
+
self.fail('connecting to closed SSL socket should have failed')
|
|
2107
|
+
|
|
2108
|
+
t = threading.Thread(target=listener)
|
|
2109
|
+
t.start()
|
|
2110
|
+
try:
|
|
2111
|
+
connector()
|
|
2112
|
+
finally:
|
|
2113
|
+
t.join()
|
|
2114
|
+
|
|
2115
|
+
@skip_if_broken_ubuntu_ssl
|
|
2116
|
+
@unittest.skipUnless(hasattr(ssl, 'PROTOCOL_SSLv2'),
|
|
2117
|
+
"OpenSSL is compiled without SSLv2 support")
|
|
2118
|
+
def test_protocol_sslv2(self):
|
|
2119
|
+
"""Connecting to an SSLv2 server with various client options"""
|
|
2120
|
+
if support.verbose:
|
|
2121
|
+
sys.stdout.write("\n")
|
|
2122
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True)
|
|
2123
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_OPTIONAL)
|
|
2124
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_REQUIRED)
|
|
2125
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False)
|
|
2126
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3, False)
|
|
2127
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLSv1, False)
|
|
2128
|
+
# SSLv23 client with specific SSL options
|
|
2129
|
+
if no_sslv2_implies_sslv3_hello():
|
|
2130
|
+
# No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
|
|
2131
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
|
|
2132
|
+
client_options=ssl.OP_NO_SSLv2)
|
|
2133
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
|
|
2134
|
+
client_options=ssl.OP_NO_SSLv3)
|
|
2135
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
|
|
2136
|
+
client_options=ssl.OP_NO_TLSv1)
|
|
2137
|
+
|
|
2138
|
+
@skip_if_broken_ubuntu_ssl
|
|
2139
|
+
def test_protocol_sslv23(self):
|
|
2140
|
+
"""Connecting to an SSLv23 server with various client options"""
|
|
2141
|
+
if support.verbose:
|
|
2142
|
+
sys.stdout.write("\n")
|
|
2143
|
+
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2144
|
+
try:
|
|
2145
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv2, True)
|
|
2146
|
+
except OSError as x:
|
|
2147
|
+
# this fails on some older versions of OpenSSL (0.9.7l, for instance)
|
|
2148
|
+
if support.verbose:
|
|
2149
|
+
sys.stdout.write(
|
|
2150
|
+
" SSL2 client to SSL23 server test unexpectedly failed:\n %s\n"
|
|
2151
|
+
% str(x))
|
|
2152
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True)
|
|
2153
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True)
|
|
2154
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True)
|
|
2155
|
+
|
|
2156
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True, ssl.CERT_OPTIONAL)
|
|
2157
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_OPTIONAL)
|
|
2158
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True, ssl.CERT_OPTIONAL)
|
|
2159
|
+
|
|
2160
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, True, ssl.CERT_REQUIRED)
|
|
2161
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_REQUIRED)
|
|
2162
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True, ssl.CERT_REQUIRED)
|
|
2163
|
+
|
|
2164
|
+
# Server with specific SSL options
|
|
2165
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False,
|
|
2166
|
+
server_options=ssl.OP_NO_SSLv3)
|
|
2167
|
+
# Will choose TLSv1
|
|
2168
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True,
|
|
2169
|
+
server_options=ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
|
|
2170
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, False,
|
|
2171
|
+
server_options=ssl.OP_NO_TLSv1)
|
|
2172
|
+
|
|
2173
|
+
|
|
2174
|
+
@skip_if_broken_ubuntu_ssl
|
|
2175
|
+
def test_protocol_sslv3(self):
|
|
2176
|
+
"""Connecting to an SSLv3 server with various client options"""
|
|
2177
|
+
if support.verbose:
|
|
2178
|
+
sys.stdout.write("\n")
|
|
2179
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True)
|
|
2180
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True, ssl.CERT_OPTIONAL)
|
|
2181
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True, ssl.CERT_REQUIRED)
|
|
2182
|
+
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2183
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv2, False)
|
|
2184
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False,
|
|
2185
|
+
client_options=ssl.OP_NO_SSLv3)
|
|
2186
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLSv1, False)
|
|
2187
|
+
if no_sslv2_implies_sslv3_hello():
|
|
2188
|
+
# No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
|
|
2189
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, True,
|
|
2190
|
+
client_options=ssl.OP_NO_SSLv2)
|
|
2191
|
+
|
|
2192
|
+
@skip_if_broken_ubuntu_ssl
|
|
2193
|
+
def test_protocol_tlsv1(self):
|
|
2194
|
+
"""Connecting to a TLSv1 server with various client options"""
|
|
2195
|
+
if support.verbose:
|
|
2196
|
+
sys.stdout.write("\n")
|
|
2197
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, True)
|
|
2198
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, True, ssl.CERT_OPTIONAL)
|
|
2199
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, True, ssl.CERT_REQUIRED)
|
|
2200
|
+
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2201
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv2, False)
|
|
2202
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv3, False)
|
|
2203
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv23, False,
|
|
2204
|
+
client_options=ssl.OP_NO_TLSv1)
|
|
2205
|
+
|
|
2206
|
+
@skip_if_broken_ubuntu_ssl
|
|
2207
|
+
@unittest.skipUnless(hasattr(ssl, "PROTOCOL_TLSv1_1"),
|
|
2208
|
+
"TLS version 1.1 not supported.")
|
|
2209
|
+
def test_protocol_tlsv1_1(self):
|
|
2210
|
+
"""Connecting to a TLSv1.1 server with various client options.
|
|
2211
|
+
Testing against older TLS versions."""
|
|
2212
|
+
if support.verbose:
|
|
2213
|
+
sys.stdout.write("\n")
|
|
2214
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_1, True)
|
|
2215
|
+
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2216
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv2, False)
|
|
2217
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv3, False)
|
|
2218
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv23, False,
|
|
2219
|
+
client_options=ssl.OP_NO_TLSv1_1)
|
|
2220
|
+
|
|
2221
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, True)
|
|
2222
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1, False)
|
|
2223
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_1, False)
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
@skip_if_broken_ubuntu_ssl
|
|
2227
|
+
@unittest.skipUnless(hasattr(ssl, "PROTOCOL_TLSv1_2"),
|
|
2228
|
+
"TLS version 1.2 not supported.")
|
|
2229
|
+
def test_protocol_tlsv1_2(self):
|
|
2230
|
+
"""Connecting to a TLSv1.2 server with various client options.
|
|
2231
|
+
Testing against older TLS versions."""
|
|
2232
|
+
if support.verbose:
|
|
2233
|
+
sys.stdout.write("\n")
|
|
2234
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_2, True,
|
|
2235
|
+
server_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,
|
|
2236
|
+
client_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,)
|
|
2237
|
+
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2238
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv2, False)
|
|
2239
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv3, False)
|
|
2240
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv23, False,
|
|
2241
|
+
client_options=ssl.OP_NO_TLSv1_2)
|
|
2242
|
+
|
|
2243
|
+
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_2, True)
|
|
2244
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False)
|
|
2245
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False)
|
|
2246
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False)
|
|
2247
|
+
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False)
|
|
2248
|
+
|
|
2249
|
+
def test_starttls(self):
|
|
2250
|
+
"""Switching from clear text to encrypted and back again."""
|
|
2251
|
+
msgs = (b"msg 1", b"MSG 2", b"STARTTLS", b"MSG 3", b"msg 4", b"ENDTLS", b"msg 5", b"msg 6")
|
|
2252
|
+
|
|
2253
|
+
server = ThreadedEchoServer(CERTFILE,
|
|
2254
|
+
ssl_version=ssl.PROTOCOL_TLSv1,
|
|
2255
|
+
starttls_server=True,
|
|
2256
|
+
chatty=True,
|
|
2257
|
+
connectionchatty=True)
|
|
2258
|
+
wrapped = False
|
|
2259
|
+
with server:
|
|
2260
|
+
s = socket.socket()
|
|
2261
|
+
s.setblocking(1)
|
|
2262
|
+
s.connect((HOST, server.port))
|
|
2263
|
+
if support.verbose:
|
|
2264
|
+
sys.stdout.write("\n")
|
|
2265
|
+
for indata in msgs:
|
|
2266
|
+
if support.verbose:
|
|
2267
|
+
sys.stdout.write(
|
|
2268
|
+
" client: sending %r...\n" % indata)
|
|
2269
|
+
if wrapped:
|
|
2270
|
+
conn.write(indata)
|
|
2271
|
+
outdata = conn.read()
|
|
2272
|
+
else:
|
|
2273
|
+
s.send(indata)
|
|
2274
|
+
outdata = s.recv(1024)
|
|
2275
|
+
msg = outdata.strip().lower()
|
|
2276
|
+
if indata == b"STARTTLS" and msg.startswith(b"ok"):
|
|
2277
|
+
# STARTTLS ok, switch to secure mode
|
|
2278
|
+
if support.verbose:
|
|
2279
|
+
sys.stdout.write(
|
|
2280
|
+
" client: read %r from server, starting TLS...\n"
|
|
2281
|
+
% msg)
|
|
2282
|
+
conn = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1)
|
|
2283
|
+
wrapped = True
|
|
2284
|
+
elif indata == b"ENDTLS" and msg.startswith(b"ok"):
|
|
2285
|
+
# ENDTLS ok, switch back to clear text
|
|
2286
|
+
if support.verbose:
|
|
2287
|
+
sys.stdout.write(
|
|
2288
|
+
" client: read %r from server, ending TLS...\n"
|
|
2289
|
+
% msg)
|
|
2290
|
+
s = conn.unwrap()
|
|
2291
|
+
wrapped = False
|
|
2292
|
+
else:
|
|
2293
|
+
if support.verbose:
|
|
2294
|
+
sys.stdout.write(
|
|
2295
|
+
" client: read %r from server\n" % msg)
|
|
2296
|
+
if support.verbose:
|
|
2297
|
+
sys.stdout.write(" client: closing connection.\n")
|
|
2298
|
+
if wrapped:
|
|
2299
|
+
conn.write(b"over\n")
|
|
2300
|
+
else:
|
|
2301
|
+
s.send(b"over\n")
|
|
2302
|
+
if wrapped:
|
|
2303
|
+
conn.close()
|
|
2304
|
+
else:
|
|
2305
|
+
s.close()
|
|
2306
|
+
|
|
2307
|
+
def test_socketserver(self):
|
|
2308
|
+
"""Using a SocketServer to create and manage SSL connections."""
|
|
2309
|
+
server = make_https_server(self, certfile=CERTFILE)
|
|
2310
|
+
# try to connect
|
|
2311
|
+
if support.verbose:
|
|
2312
|
+
sys.stdout.write('\n')
|
|
2313
|
+
with open(CERTFILE, 'rb') as f:
|
|
2314
|
+
d1 = f.read()
|
|
2315
|
+
d2 = ''
|
|
2316
|
+
# now fetch the same data from the HTTPS server
|
|
2317
|
+
url = 'https://%s:%d/%s' % (
|
|
2318
|
+
HOST, server.port, os.path.split(CERTFILE)[1])
|
|
2319
|
+
f = urllib.request.urlopen(url)
|
|
2320
|
+
try:
|
|
2321
|
+
dlen = f.info().get("content-length")
|
|
2322
|
+
if dlen and (int(dlen) > 0):
|
|
2323
|
+
d2 = f.read(int(dlen))
|
|
2324
|
+
if support.verbose:
|
|
2325
|
+
sys.stdout.write(
|
|
2326
|
+
" client: read %d bytes from remote server '%s'\n"
|
|
2327
|
+
% (len(d2), server))
|
|
2328
|
+
finally:
|
|
2329
|
+
f.close()
|
|
2330
|
+
self.assertEqual(d1, d2)
|
|
2331
|
+
|
|
2332
|
+
def test_asyncore_server(self):
|
|
2333
|
+
"""Check the example asyncore integration."""
|
|
2334
|
+
indata = "TEST MESSAGE of mixed case\n"
|
|
2335
|
+
|
|
2336
|
+
if support.verbose:
|
|
2337
|
+
sys.stdout.write("\n")
|
|
2338
|
+
|
|
2339
|
+
indata = b"FOO\n"
|
|
2340
|
+
server = AsyncoreEchoServer(CERTFILE)
|
|
2341
|
+
with server:
|
|
2342
|
+
s = ssl.wrap_socket(socket.socket())
|
|
2343
|
+
s.connect(('127.0.0.1', server.port))
|
|
2344
|
+
if support.verbose:
|
|
2345
|
+
sys.stdout.write(
|
|
2346
|
+
" client: sending %r...\n" % indata)
|
|
2347
|
+
s.write(indata)
|
|
2348
|
+
outdata = s.read()
|
|
2349
|
+
if support.verbose:
|
|
2350
|
+
sys.stdout.write(" client: read %r\n" % outdata)
|
|
2351
|
+
if outdata != indata.lower():
|
|
2352
|
+
self.fail(
|
|
2353
|
+
"bad data <<%r>> (%d) received; expected <<%r>> (%d)\n"
|
|
2354
|
+
% (outdata[:20], len(outdata),
|
|
2355
|
+
indata[:20].lower(), len(indata)))
|
|
2356
|
+
s.write(b"over\n")
|
|
2357
|
+
if support.verbose:
|
|
2358
|
+
sys.stdout.write(" client: closing connection.\n")
|
|
2359
|
+
s.close()
|
|
2360
|
+
if support.verbose:
|
|
2361
|
+
sys.stdout.write(" client: connection closed.\n")
|
|
2362
|
+
|
|
2363
|
+
def test_recv_send(self):
|
|
2364
|
+
"""Test recv(), send() and friends."""
|
|
2365
|
+
if support.verbose:
|
|
2366
|
+
sys.stdout.write("\n")
|
|
2367
|
+
|
|
2368
|
+
server = ThreadedEchoServer(CERTFILE,
|
|
2369
|
+
certreqs=ssl.CERT_NONE,
|
|
2370
|
+
ssl_version=ssl.PROTOCOL_TLSv1,
|
|
2371
|
+
cacerts=CERTFILE,
|
|
2372
|
+
chatty=True,
|
|
2373
|
+
connectionchatty=False)
|
|
2374
|
+
with server:
|
|
2375
|
+
s = ssl.wrap_socket(socket.socket(),
|
|
2376
|
+
server_side=False,
|
|
2377
|
+
certfile=CERTFILE,
|
|
2378
|
+
ca_certs=CERTFILE,
|
|
2379
|
+
cert_reqs=ssl.CERT_NONE,
|
|
2380
|
+
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
2381
|
+
s.connect((HOST, server.port))
|
|
2382
|
+
# helper methods for standardising recv* method signatures
|
|
2383
|
+
def _recv_into():
|
|
2384
|
+
b = bytearray(b"\0"*100)
|
|
2385
|
+
count = s.recv_into(b)
|
|
2386
|
+
return b[:count]
|
|
2387
|
+
|
|
2388
|
+
def _recvfrom_into():
|
|
2389
|
+
b = bytearray(b"\0"*100)
|
|
2390
|
+
count, addr = s.recvfrom_into(b)
|
|
2391
|
+
return b[:count]
|
|
2392
|
+
|
|
2393
|
+
# (name, method, whether to expect success, *args)
|
|
2394
|
+
send_methods = [
|
|
2395
|
+
('send', s.send, True, []),
|
|
2396
|
+
('sendto', s.sendto, False, ["some.address"]),
|
|
2397
|
+
('sendall', s.sendall, True, []),
|
|
2398
|
+
]
|
|
2399
|
+
recv_methods = [
|
|
2400
|
+
('recv', s.recv, True, []),
|
|
2401
|
+
('recvfrom', s.recvfrom, False, ["some.address"]),
|
|
2402
|
+
('recv_into', _recv_into, True, []),
|
|
2403
|
+
('recvfrom_into', _recvfrom_into, False, []),
|
|
2404
|
+
]
|
|
2405
|
+
data_prefix = "PREFIX_"
|
|
2406
|
+
|
|
2407
|
+
for meth_name, send_meth, expect_success, args in send_methods:
|
|
2408
|
+
indata = (data_prefix + meth_name).encode('ascii')
|
|
2409
|
+
try:
|
|
2410
|
+
send_meth(indata, *args)
|
|
2411
|
+
outdata = s.read()
|
|
2412
|
+
if outdata != indata.lower():
|
|
2413
|
+
self.fail(
|
|
2414
|
+
"While sending with <<{name:s}>> bad data "
|
|
2415
|
+
"<<{outdata:r}>> ({nout:d}) received; "
|
|
2416
|
+
"expected <<{indata:r}>> ({nin:d})\n".format(
|
|
2417
|
+
name=meth_name, outdata=outdata[:20],
|
|
2418
|
+
nout=len(outdata),
|
|
2419
|
+
indata=indata[:20], nin=len(indata)
|
|
2420
|
+
)
|
|
2421
|
+
)
|
|
2422
|
+
except ValueError as e:
|
|
2423
|
+
if expect_success:
|
|
2424
|
+
self.fail(
|
|
2425
|
+
"Failed to send with method <<{name:s}>>; "
|
|
2426
|
+
"expected to succeed.\n".format(name=meth_name)
|
|
2427
|
+
)
|
|
2428
|
+
if not str(e).startswith(meth_name):
|
|
2429
|
+
self.fail(
|
|
2430
|
+
"Method <<{name:s}>> failed with unexpected "
|
|
2431
|
+
"exception message: {exp:s}\n".format(
|
|
2432
|
+
name=meth_name, exp=e
|
|
2433
|
+
)
|
|
2434
|
+
)
|
|
2435
|
+
|
|
2436
|
+
for meth_name, recv_meth, expect_success, args in recv_methods:
|
|
2437
|
+
indata = (data_prefix + meth_name).encode('ascii')
|
|
2438
|
+
try:
|
|
2439
|
+
s.send(indata)
|
|
2440
|
+
outdata = recv_meth(*args)
|
|
2441
|
+
if outdata != indata.lower():
|
|
2442
|
+
self.fail(
|
|
2443
|
+
"While receiving with <<{name:s}>> bad data "
|
|
2444
|
+
"<<{outdata:r}>> ({nout:d}) received; "
|
|
2445
|
+
"expected <<{indata:r}>> ({nin:d})\n".format(
|
|
2446
|
+
name=meth_name, outdata=outdata[:20],
|
|
2447
|
+
nout=len(outdata),
|
|
2448
|
+
indata=indata[:20], nin=len(indata)
|
|
2449
|
+
)
|
|
2450
|
+
)
|
|
2451
|
+
except ValueError as e:
|
|
2452
|
+
if expect_success:
|
|
2453
|
+
self.fail(
|
|
2454
|
+
"Failed to receive with method <<{name:s}>>; "
|
|
2455
|
+
"expected to succeed.\n".format(name=meth_name)
|
|
2456
|
+
)
|
|
2457
|
+
if not str(e).startswith(meth_name):
|
|
2458
|
+
self.fail(
|
|
2459
|
+
"Method <<{name:s}>> failed with unexpected "
|
|
2460
|
+
"exception message: {exp:s}\n".format(
|
|
2461
|
+
name=meth_name, exp=e
|
|
2462
|
+
)
|
|
2463
|
+
)
|
|
2464
|
+
# consume data
|
|
2465
|
+
s.read()
|
|
2466
|
+
|
|
2467
|
+
# Make sure sendmsg et al are disallowed to avoid
|
|
2468
|
+
# inadvertent disclosure of data and/or corruption
|
|
2469
|
+
# of the encrypted data stream
|
|
2470
|
+
self.assertRaises(NotImplementedError, s.sendmsg, [b"data"])
|
|
2471
|
+
self.assertRaises(NotImplementedError, s.recvmsg, 100)
|
|
2472
|
+
self.assertRaises(NotImplementedError,
|
|
2473
|
+
s.recvmsg_into, bytearray(100))
|
|
2474
|
+
|
|
2475
|
+
s.write(b"over\n")
|
|
2476
|
+
s.close()
|
|
2477
|
+
|
|
2478
|
+
def test_handshake_timeout(self):
|
|
2479
|
+
# Issue #5103: SSL handshake must respect the socket timeout
|
|
2480
|
+
server = socket.socket(socket.AF_INET)
|
|
2481
|
+
host = "127.0.0.1"
|
|
2482
|
+
port = support.bind_port(server)
|
|
2483
|
+
started = threading.Event()
|
|
2484
|
+
finish = False
|
|
2485
|
+
|
|
2486
|
+
def serve():
|
|
2487
|
+
server.listen(5)
|
|
2488
|
+
started.set()
|
|
2489
|
+
conns = []
|
|
2490
|
+
while not finish:
|
|
2491
|
+
r, w, e = select.select([server], [], [], 0.1)
|
|
2492
|
+
if server in r:
|
|
2493
|
+
# Let the socket hang around rather than having
|
|
2494
|
+
# it closed by garbage collection.
|
|
2495
|
+
conns.append(server.accept()[0])
|
|
2496
|
+
for sock in conns:
|
|
2497
|
+
sock.close()
|
|
2498
|
+
|
|
2499
|
+
t = threading.Thread(target=serve)
|
|
2500
|
+
t.start()
|
|
2501
|
+
started.wait()
|
|
2502
|
+
|
|
2503
|
+
try:
|
|
2504
|
+
try:
|
|
2505
|
+
c = socket.socket(socket.AF_INET)
|
|
2506
|
+
c.settimeout(0.2)
|
|
2507
|
+
c.connect((host, port))
|
|
2508
|
+
# Will attempt handshake and time out
|
|
2509
|
+
self.assertRaisesRegex(socket.timeout, "timed out",
|
|
2510
|
+
ssl.wrap_socket, c)
|
|
2511
|
+
finally:
|
|
2512
|
+
c.close()
|
|
2513
|
+
try:
|
|
2514
|
+
c = socket.socket(socket.AF_INET)
|
|
2515
|
+
c = ssl.wrap_socket(c)
|
|
2516
|
+
c.settimeout(0.2)
|
|
2517
|
+
# Will attempt handshake and time out
|
|
2518
|
+
self.assertRaisesRegex(socket.timeout, "timed out",
|
|
2519
|
+
c.connect, (host, port))
|
|
2520
|
+
finally:
|
|
2521
|
+
c.close()
|
|
2522
|
+
finally:
|
|
2523
|
+
finish = True
|
|
2524
|
+
t.join()
|
|
2525
|
+
server.close()
|
|
2526
|
+
|
|
2527
|
+
def test_server_accept(self):
|
|
2528
|
+
# Issue #16357: accept() on a SSLSocket created through
|
|
2529
|
+
# SSLContext.wrap_socket().
|
|
2530
|
+
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
2531
|
+
context.verify_mode = ssl.CERT_REQUIRED
|
|
2532
|
+
context.load_verify_locations(CERTFILE)
|
|
2533
|
+
context.load_cert_chain(CERTFILE)
|
|
2534
|
+
server = socket.socket(socket.AF_INET)
|
|
2535
|
+
host = "127.0.0.1"
|
|
2536
|
+
port = support.bind_port(server)
|
|
2537
|
+
server = context.wrap_socket(server, server_side=True)
|
|
2538
|
+
|
|
2539
|
+
evt = threading.Event()
|
|
2540
|
+
remote = None
|
|
2541
|
+
peer = None
|
|
2542
|
+
def serve():
|
|
2543
|
+
nonlocal remote, peer
|
|
2544
|
+
server.listen(5)
|
|
2545
|
+
# Block on the accept and wait on the connection to close.
|
|
2546
|
+
evt.set()
|
|
2547
|
+
remote, peer = server.accept()
|
|
2548
|
+
remote.recv(1)
|
|
2549
|
+
|
|
2550
|
+
t = threading.Thread(target=serve)
|
|
2551
|
+
t.start()
|
|
2552
|
+
# Client wait until server setup and perform a connect.
|
|
2553
|
+
evt.wait()
|
|
2554
|
+
client = context.wrap_socket(socket.socket())
|
|
2555
|
+
client.connect((host, port))
|
|
2556
|
+
client_addr = client.getsockname()
|
|
2557
|
+
client.close()
|
|
2558
|
+
t.join()
|
|
2559
|
+
remote.close()
|
|
2560
|
+
server.close()
|
|
2561
|
+
# Sanity checks.
|
|
2562
|
+
self.assertIsInstance(remote, ssl.SSLSocket)
|
|
2563
|
+
self.assertEqual(peer, client_addr)
|
|
2564
|
+
|
|
2565
|
+
def test_getpeercert_enotconn(self):
|
|
2566
|
+
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
2567
|
+
with context.wrap_socket(socket.socket()) as sock:
|
|
2568
|
+
with self.assertRaises(OSError) as cm:
|
|
2569
|
+
sock.getpeercert()
|
|
2570
|
+
self.assertEqual(cm.exception.errno, errno.ENOTCONN)
|
|
2571
|
+
|
|
2572
|
+
def test_do_handshake_enotconn(self):
|
|
2573
|
+
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
2574
|
+
with context.wrap_socket(socket.socket()) as sock:
|
|
2575
|
+
with self.assertRaises(OSError) as cm:
|
|
2576
|
+
sock.do_handshake()
|
|
2577
|
+
self.assertEqual(cm.exception.errno, errno.ENOTCONN)
|
|
2578
|
+
|
|
2579
|
+
def test_default_ciphers(self):
|
|
2580
|
+
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
2581
|
+
try:
|
|
2582
|
+
# Force a set of weak ciphers on our client context
|
|
2583
|
+
context.set_ciphers("DES")
|
|
2584
|
+
except ssl.SSLError:
|
|
2585
|
+
self.skipTest("no DES cipher available")
|
|
2586
|
+
with ThreadedEchoServer(CERTFILE,
|
|
2587
|
+
ssl_version=ssl.PROTOCOL_SSLv23,
|
|
2588
|
+
chatty=False) as server:
|
|
2589
|
+
with context.wrap_socket(socket.socket()) as s:
|
|
2590
|
+
with self.assertRaises(OSError):
|
|
2591
|
+
s.connect((HOST, server.port))
|
|
2592
|
+
self.assertIn("no shared cipher", str(server.conn_errors[0]))
|
|
2593
|
+
|
|
2594
|
+
@unittest.skipUnless(ssl.HAS_ECDH, "test requires ECDH-enabled OpenSSL")
|
|
2595
|
+
def test_default_ecdh_curve(self):
|
|
2596
|
+
# Issue #21015: elliptic curve-based Diffie Hellman key exchange
|
|
2597
|
+
# should be enabled by default on SSL contexts.
|
|
2598
|
+
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
2599
|
+
context.load_cert_chain(CERTFILE)
|
|
2600
|
+
# Prior to OpenSSL 1.0.0, ECDH ciphers have to be enabled
|
|
2601
|
+
# explicitly using the 'ECCdraft' cipher alias. Otherwise,
|
|
2602
|
+
# our default cipher list should prefer ECDH-based ciphers
|
|
2603
|
+
# automatically.
|
|
2604
|
+
if ssl.OPENSSL_VERSION_INFO < (1, 0, 0):
|
|
2605
|
+
context.set_ciphers("ECCdraft:ECDH")
|
|
2606
|
+
with ThreadedEchoServer(context=context) as server:
|
|
2607
|
+
with context.wrap_socket(socket.socket()) as s:
|
|
2608
|
+
s.connect((HOST, server.port))
|
|
2609
|
+
self.assertIn("ECDH", s.cipher()[0])
|
|
2610
|
+
|
|
2611
|
+
@unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
|
|
2612
|
+
"'tls-unique' channel binding not available")
|
|
2613
|
+
def test_tls_unique_channel_binding(self):
|
|
2614
|
+
"""Test tls-unique channel binding."""
|
|
2615
|
+
if support.verbose:
|
|
2616
|
+
sys.stdout.write("\n")
|
|
2617
|
+
|
|
2618
|
+
server = ThreadedEchoServer(CERTFILE,
|
|
2619
|
+
certreqs=ssl.CERT_NONE,
|
|
2620
|
+
ssl_version=ssl.PROTOCOL_TLSv1,
|
|
2621
|
+
cacerts=CERTFILE,
|
|
2622
|
+
chatty=True,
|
|
2623
|
+
connectionchatty=False)
|
|
2624
|
+
with server:
|
|
2625
|
+
s = ssl.wrap_socket(socket.socket(),
|
|
2626
|
+
server_side=False,
|
|
2627
|
+
certfile=CERTFILE,
|
|
2628
|
+
ca_certs=CERTFILE,
|
|
2629
|
+
cert_reqs=ssl.CERT_NONE,
|
|
2630
|
+
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
2631
|
+
s.connect((HOST, server.port))
|
|
2632
|
+
# get the data
|
|
2633
|
+
cb_data = s.get_channel_binding("tls-unique")
|
|
2634
|
+
if support.verbose:
|
|
2635
|
+
sys.stdout.write(" got channel binding data: {0!r}\n"
|
|
2636
|
+
.format(cb_data))
|
|
2637
|
+
|
|
2638
|
+
# check if it is sane
|
|
2639
|
+
self.assertIsNotNone(cb_data)
|
|
2640
|
+
self.assertEqual(len(cb_data), 12) # True for TLSv1
|
|
2641
|
+
|
|
2642
|
+
# and compare with the peers version
|
|
2643
|
+
s.write(b"CB tls-unique\n")
|
|
2644
|
+
peer_data_repr = s.read().strip()
|
|
2645
|
+
self.assertEqual(peer_data_repr,
|
|
2646
|
+
repr(cb_data).encode("us-ascii"))
|
|
2647
|
+
s.close()
|
|
2648
|
+
|
|
2649
|
+
# now, again
|
|
2650
|
+
s = ssl.wrap_socket(socket.socket(),
|
|
2651
|
+
server_side=False,
|
|
2652
|
+
certfile=CERTFILE,
|
|
2653
|
+
ca_certs=CERTFILE,
|
|
2654
|
+
cert_reqs=ssl.CERT_NONE,
|
|
2655
|
+
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
2656
|
+
s.connect((HOST, server.port))
|
|
2657
|
+
new_cb_data = s.get_channel_binding("tls-unique")
|
|
2658
|
+
if support.verbose:
|
|
2659
|
+
sys.stdout.write(" got another channel binding data: {0!r}\n"
|
|
2660
|
+
.format(new_cb_data))
|
|
2661
|
+
# is it really unique
|
|
2662
|
+
self.assertNotEqual(cb_data, new_cb_data)
|
|
2663
|
+
self.assertIsNotNone(cb_data)
|
|
2664
|
+
self.assertEqual(len(cb_data), 12) # True for TLSv1
|
|
2665
|
+
s.write(b"CB tls-unique\n")
|
|
2666
|
+
peer_data_repr = s.read().strip()
|
|
2667
|
+
self.assertEqual(peer_data_repr,
|
|
2668
|
+
repr(new_cb_data).encode("us-ascii"))
|
|
2669
|
+
s.close()
|
|
2670
|
+
|
|
2671
|
+
def test_compression(self):
|
|
2672
|
+
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2673
|
+
context.load_cert_chain(CERTFILE)
|
|
2674
|
+
stats = server_params_test(context, context,
|
|
2675
|
+
chatty=True, connectionchatty=True)
|
|
2676
|
+
if support.verbose:
|
|
2677
|
+
sys.stdout.write(" got compression: {!r}\n".format(stats['compression']))
|
|
2678
|
+
self.assertIn(stats['compression'], { None, 'ZLIB', 'RLE' })
|
|
2679
|
+
|
|
2680
|
+
@unittest.skipUnless(hasattr(ssl, 'OP_NO_COMPRESSION'),
|
|
2681
|
+
"ssl.OP_NO_COMPRESSION needed for this test")
|
|
2682
|
+
def test_compression_disabled(self):
|
|
2683
|
+
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2684
|
+
context.load_cert_chain(CERTFILE)
|
|
2685
|
+
context.options |= ssl.OP_NO_COMPRESSION
|
|
2686
|
+
stats = server_params_test(context, context,
|
|
2687
|
+
chatty=True, connectionchatty=True)
|
|
2688
|
+
self.assertIs(stats['compression'], None)
|
|
2689
|
+
|
|
2690
|
+
def test_dh_params(self):
|
|
2691
|
+
# Check we can get a connection with ephemeral Diffie-Hellman
|
|
2692
|
+
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2693
|
+
context.load_cert_chain(CERTFILE)
|
|
2694
|
+
context.load_dh_params(DHFILE)
|
|
2695
|
+
context.set_ciphers("kEDH")
|
|
2696
|
+
stats = server_params_test(context, context,
|
|
2697
|
+
chatty=True, connectionchatty=True)
|
|
2698
|
+
cipher = stats["cipher"][0]
|
|
2699
|
+
parts = cipher.split("-")
|
|
2700
|
+
if "ADH" not in parts and "EDH" not in parts and "DHE" not in parts:
|
|
2701
|
+
self.fail("Non-DH cipher: " + cipher[0])
|
|
2702
|
+
|
|
2703
|
+
def test_selected_npn_protocol(self):
|
|
2704
|
+
# selected_npn_protocol() is None unless NPN is used
|
|
2705
|
+
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2706
|
+
context.load_cert_chain(CERTFILE)
|
|
2707
|
+
stats = server_params_test(context, context,
|
|
2708
|
+
chatty=True, connectionchatty=True)
|
|
2709
|
+
self.assertIs(stats['client_npn_protocol'], None)
|
|
2710
|
+
|
|
2711
|
+
@unittest.skipUnless(ssl.HAS_NPN, "NPN support needed for this test")
|
|
2712
|
+
def test_npn_protocols(self):
|
|
2713
|
+
server_protocols = ['http/1.1', 'spdy/2']
|
|
2714
|
+
protocol_tests = [
|
|
2715
|
+
(['http/1.1', 'spdy/2'], 'http/1.1'),
|
|
2716
|
+
(['spdy/2', 'http/1.1'], 'http/1.1'),
|
|
2717
|
+
(['spdy/2', 'test'], 'spdy/2'),
|
|
2718
|
+
(['abc', 'def'], 'abc')
|
|
2719
|
+
]
|
|
2720
|
+
for client_protocols, expected in protocol_tests:
|
|
2721
|
+
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2722
|
+
server_context.load_cert_chain(CERTFILE)
|
|
2723
|
+
server_context.set_npn_protocols(server_protocols)
|
|
2724
|
+
client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2725
|
+
client_context.load_cert_chain(CERTFILE)
|
|
2726
|
+
client_context.set_npn_protocols(client_protocols)
|
|
2727
|
+
stats = server_params_test(client_context, server_context,
|
|
2728
|
+
chatty=True, connectionchatty=True)
|
|
2729
|
+
|
|
2730
|
+
msg = "failed trying %s (s) and %s (c).\n" \
|
|
2731
|
+
"was expecting %s, but got %%s from the %%s" \
|
|
2732
|
+
% (str(server_protocols), str(client_protocols),
|
|
2733
|
+
str(expected))
|
|
2734
|
+
client_result = stats['client_npn_protocol']
|
|
2735
|
+
self.assertEqual(client_result, expected, msg % (client_result, "client"))
|
|
2736
|
+
server_result = stats['server_npn_protocols'][-1] \
|
|
2737
|
+
if len(stats['server_npn_protocols']) else 'nothing'
|
|
2738
|
+
self.assertEqual(server_result, expected, msg % (server_result, "server"))
|
|
2739
|
+
|
|
2740
|
+
def sni_contexts(self):
|
|
2741
|
+
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2742
|
+
server_context.load_cert_chain(SIGNED_CERTFILE)
|
|
2743
|
+
other_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2744
|
+
other_context.load_cert_chain(SIGNED_CERTFILE2)
|
|
2745
|
+
client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2746
|
+
client_context.verify_mode = ssl.CERT_REQUIRED
|
|
2747
|
+
client_context.load_verify_locations(SIGNING_CA)
|
|
2748
|
+
return server_context, other_context, client_context
|
|
2749
|
+
|
|
2750
|
+
def check_common_name(self, stats, name):
|
|
2751
|
+
cert = stats['peercert']
|
|
2752
|
+
self.assertIn((('commonName', name),), cert['subject'])
|
|
2753
|
+
|
|
2754
|
+
@needs_sni
|
|
2755
|
+
def test_sni_callback(self):
|
|
2756
|
+
calls = []
|
|
2757
|
+
server_context, other_context, client_context = self.sni_contexts()
|
|
2758
|
+
|
|
2759
|
+
def servername_cb(ssl_sock, server_name, initial_context):
|
|
2760
|
+
calls.append((server_name, initial_context))
|
|
2761
|
+
if server_name is not None:
|
|
2762
|
+
ssl_sock.context = other_context
|
|
2763
|
+
server_context.set_servername_callback(servername_cb)
|
|
2764
|
+
|
|
2765
|
+
stats = server_params_test(client_context, server_context,
|
|
2766
|
+
chatty=True,
|
|
2767
|
+
sni_name='supermessage')
|
|
2768
|
+
# The hostname was fetched properly, and the certificate was
|
|
2769
|
+
# changed for the connection.
|
|
2770
|
+
self.assertEqual(calls, [("supermessage", server_context)])
|
|
2771
|
+
# CERTFILE4 was selected
|
|
2772
|
+
self.check_common_name(stats, 'fakehostname')
|
|
2773
|
+
|
|
2774
|
+
calls = []
|
|
2775
|
+
# The callback is called with server_name=None
|
|
2776
|
+
stats = server_params_test(client_context, server_context,
|
|
2777
|
+
chatty=True,
|
|
2778
|
+
sni_name=None)
|
|
2779
|
+
self.assertEqual(calls, [(None, server_context)])
|
|
2780
|
+
self.check_common_name(stats, 'localhost')
|
|
2781
|
+
|
|
2782
|
+
# Check disabling the callback
|
|
2783
|
+
calls = []
|
|
2784
|
+
server_context.set_servername_callback(None)
|
|
2785
|
+
|
|
2786
|
+
stats = server_params_test(client_context, server_context,
|
|
2787
|
+
chatty=True,
|
|
2788
|
+
sni_name='notfunny')
|
|
2789
|
+
# Certificate didn't change
|
|
2790
|
+
self.check_common_name(stats, 'localhost')
|
|
2791
|
+
self.assertEqual(calls, [])
|
|
2792
|
+
|
|
2793
|
+
@needs_sni
|
|
2794
|
+
def test_sni_callback_alert(self):
|
|
2795
|
+
# Returning a TLS alert is reflected to the connecting client
|
|
2796
|
+
server_context, other_context, client_context = self.sni_contexts()
|
|
2797
|
+
|
|
2798
|
+
def cb_returning_alert(ssl_sock, server_name, initial_context):
|
|
2799
|
+
return ssl.ALERT_DESCRIPTION_ACCESS_DENIED
|
|
2800
|
+
server_context.set_servername_callback(cb_returning_alert)
|
|
2801
|
+
|
|
2802
|
+
with self.assertRaises(ssl.SSLError) as cm:
|
|
2803
|
+
stats = server_params_test(client_context, server_context,
|
|
2804
|
+
chatty=False,
|
|
2805
|
+
sni_name='supermessage')
|
|
2806
|
+
self.assertEqual(cm.exception.reason, 'TLSV1_ALERT_ACCESS_DENIED')
|
|
2807
|
+
|
|
2808
|
+
@needs_sni
|
|
2809
|
+
def test_sni_callback_raising(self):
|
|
2810
|
+
# Raising fails the connection with a TLS handshake failure alert.
|
|
2811
|
+
server_context, other_context, client_context = self.sni_contexts()
|
|
2812
|
+
|
|
2813
|
+
def cb_raising(ssl_sock, server_name, initial_context):
|
|
2814
|
+
1/0
|
|
2815
|
+
server_context.set_servername_callback(cb_raising)
|
|
2816
|
+
|
|
2817
|
+
with self.assertRaises(ssl.SSLError) as cm, \
|
|
2818
|
+
support.captured_stderr() as stderr:
|
|
2819
|
+
stats = server_params_test(client_context, server_context,
|
|
2820
|
+
chatty=False,
|
|
2821
|
+
sni_name='supermessage')
|
|
2822
|
+
self.assertEqual(cm.exception.reason, 'SSLV3_ALERT_HANDSHAKE_FAILURE')
|
|
2823
|
+
self.assertIn("ZeroDivisionError", stderr.getvalue())
|
|
2824
|
+
|
|
2825
|
+
@needs_sni
|
|
2826
|
+
def test_sni_callback_wrong_return_type(self):
|
|
2827
|
+
# Returning the wrong return type terminates the TLS connection
|
|
2828
|
+
# with an internal error alert.
|
|
2829
|
+
server_context, other_context, client_context = self.sni_contexts()
|
|
2830
|
+
|
|
2831
|
+
def cb_wrong_return_type(ssl_sock, server_name, initial_context):
|
|
2832
|
+
return "foo"
|
|
2833
|
+
server_context.set_servername_callback(cb_wrong_return_type)
|
|
2834
|
+
|
|
2835
|
+
with self.assertRaises(ssl.SSLError) as cm, \
|
|
2836
|
+
support.captured_stderr() as stderr:
|
|
2837
|
+
stats = server_params_test(client_context, server_context,
|
|
2838
|
+
chatty=False,
|
|
2839
|
+
sni_name='supermessage')
|
|
2840
|
+
self.assertEqual(cm.exception.reason, 'TLSV1_ALERT_INTERNAL_ERROR')
|
|
2841
|
+
self.assertIn("TypeError", stderr.getvalue())
|
|
2842
|
+
|
|
2843
|
+
def test_read_write_after_close_raises_valuerror(self):
|
|
2844
|
+
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
2845
|
+
context.verify_mode = ssl.CERT_REQUIRED
|
|
2846
|
+
context.load_verify_locations(CERTFILE)
|
|
2847
|
+
context.load_cert_chain(CERTFILE)
|
|
2848
|
+
server = ThreadedEchoServer(context=context, chatty=False)
|
|
2849
|
+
|
|
2850
|
+
with server:
|
|
2851
|
+
s = context.wrap_socket(socket.socket())
|
|
2852
|
+
s.connect((HOST, server.port))
|
|
2853
|
+
s.close()
|
|
2854
|
+
|
|
2855
|
+
self.assertRaises(ValueError, s.read, 1024)
|
|
2856
|
+
self.assertRaises(ValueError, s.write, b'hello')
|
|
2857
|
+
|
|
2858
|
+
|
|
2859
|
+
def test_main(verbose=False):
|
|
2860
|
+
if support.verbose:
|
|
2861
|
+
plats = {
|
|
2862
|
+
'Linux': platform.linux_distribution,
|
|
2863
|
+
'Mac': platform.mac_ver,
|
|
2864
|
+
'Windows': platform.win32_ver,
|
|
2865
|
+
}
|
|
2866
|
+
for name, func in plats.items():
|
|
2867
|
+
plat = func()
|
|
2868
|
+
if plat and plat[0]:
|
|
2869
|
+
plat = '%s %r' % (name, plat)
|
|
2870
|
+
break
|
|
2871
|
+
else:
|
|
2872
|
+
plat = repr(platform.platform())
|
|
2873
|
+
print("test_ssl: testing with %r %r" %
|
|
2874
|
+
(ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO))
|
|
2875
|
+
print(" under %s" % plat)
|
|
2876
|
+
print(" HAS_SNI = %r" % ssl.HAS_SNI)
|
|
2877
|
+
print(" OP_ALL = 0x%8x" % ssl.OP_ALL)
|
|
2878
|
+
try:
|
|
2879
|
+
print(" OP_NO_TLSv1_1 = 0x%8x" % ssl.OP_NO_TLSv1_1)
|
|
2880
|
+
except AttributeError:
|
|
2881
|
+
pass
|
|
2882
|
+
|
|
2883
|
+
for filename in [
|
|
2884
|
+
CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, BYTES_CERTFILE,
|
|
2885
|
+
ONLYCERT, ONLYKEY, BYTES_ONLYCERT, BYTES_ONLYKEY,
|
|
2886
|
+
SIGNED_CERTFILE, SIGNED_CERTFILE2, SIGNING_CA,
|
|
2887
|
+
BADCERT, BADKEY, EMPTYCERT]:
|
|
2888
|
+
if not os.path.exists(filename):
|
|
2889
|
+
raise support.TestFailed("Can't read certificate file %r" % filename)
|
|
2890
|
+
|
|
2891
|
+
tests = [ContextTests, BasicSocketTests, SSLErrorTests]
|
|
2892
|
+
|
|
2893
|
+
if support.is_resource_enabled('network'):
|
|
2894
|
+
tests.append(NetworkedTests)
|
|
2895
|
+
|
|
2896
|
+
if _have_threads:
|
|
2897
|
+
thread_info = support.threading_setup()
|
|
2898
|
+
if thread_info:
|
|
2899
|
+
tests.append(ThreadedTests)
|
|
2900
|
+
|
|
2901
|
+
try:
|
|
2902
|
+
support.run_unittest(*tests)
|
|
2903
|
+
finally:
|
|
2904
|
+
if _have_threads:
|
|
2905
|
+
support.threading_cleanup(*thread_info)
|
|
2906
|
+
|
|
2907
|
+
if __name__ == "__main__":
|
|
2908
|
+
test_main()
|