com.googler.python 1.1.2 → 1.1.4
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 +3 -9
- package/python3.6.2/bin/2to3 +1 -1
- package/python3.6.2/bin/2to3-3.4 +1 -1
- package/python3.6.2/bin/easy_install-3.4 +1 -1
- package/python3.6.2/bin/idle3 +1 -1
- package/python3.6.2/bin/pip3 +1 -1
- package/python3.6.2/bin/pydoc3 +1 -1
- package/python3.6.2/bin/pyvenv +1 -1
- package/python3.6.2/lib/python3.6/LICENSE.txt +254 -0
- package/python3.6.2/lib/python3.6/__future__.pyc +0 -0
- package/python3.6.2/lib/python3.6/__phello__.foo.pyc +0 -0
- package/python3.6.2/lib/python3.6/_bootlocale.pyc +0 -0
- package/python3.6.2/lib/python3.6/_collections_abc.pyc +0 -0
- package/python3.6.2/lib/python3.6/_compat_pickle.pyc +0 -0
- package/python3.6.2/lib/python3.6/_compression.pyc +0 -0
- package/python3.6.2/lib/python3.6/_dummy_thread.pyc +0 -0
- package/python3.6.2/lib/python3.6/_markupbase.pyc +0 -0
- package/python3.6.2/lib/python3.6/_osx_support.pyc +0 -0
- package/python3.6.2/lib/python3.6/_pydecimal.pyc +0 -0
- package/python3.6.2/lib/python3.6/_pyio.pyc +0 -0
- package/python3.6.2/lib/python3.6/_sitebuiltins.pyc +0 -0
- package/python3.6.2/lib/python3.6/_strptime.pyc +0 -0
- package/python3.6.2/lib/python3.6/_threading_local.pyc +0 -0
- package/python3.6.2/lib/python3.6/_weakrefset.pyc +0 -0
- package/python3.6.2/lib/python3.6/abc.pyc +0 -0
- package/python3.6.2/lib/python3.6/aifc.pyc +0 -0
- package/python3.6.2/lib/python3.6/android.pyc +0 -0
- package/python3.6.2/lib/python3.6/antigravity.pyc +0 -0
- package/python3.6.2/lib/python3.6/argparse.pyc +0 -0
- package/python3.6.2/lib/python3.6/ast.pyc +0 -0
- package/python3.6.2/lib/python3.6/asynchat.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/base_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/base_futures.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/base_subprocess.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/base_tasks.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/compat.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/constants.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/coroutines.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/futures.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/locks.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/log.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/proactor_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/protocols.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/queues.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/selector_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/sslproto.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/streams.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/subprocess.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/tasks.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/test_utils.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/transports.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/unix_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/windows_events.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncio/windows_utils.pyc +0 -0
- package/python3.6.2/lib/python3.6/asyncore.pyc +0 -0
- package/python3.6.2/lib/python3.6/base64.pyc +0 -0
- package/python3.6.2/lib/python3.6/bdb.pyc +0 -0
- package/python3.6.2/lib/python3.6/binhex.pyc +0 -0
- package/python3.6.2/lib/python3.6/bisect.pyc +0 -0
- package/python3.6.2/lib/python3.6/bz2.pyc +0 -0
- package/python3.6.2/lib/python3.6/cProfile.pyc +0 -0
- package/python3.6.2/lib/python3.6/calendar.pyc +0 -0
- package/python3.6.2/lib/python3.6/cgi.pyc +0 -0
- package/python3.6.2/lib/python3.6/cgitb.pyc +0 -0
- package/python3.6.2/lib/python3.6/chunk.pyc +0 -0
- package/python3.6.2/lib/python3.6/cmd.pyc +0 -0
- package/python3.6.2/lib/python3.6/code.pyc +0 -0
- package/python3.6.2/lib/python3.6/codecs.pyc +0 -0
- package/python3.6.2/lib/python3.6/codeop.pyc +0 -0
- package/python3.6.2/lib/python3.6/collections/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/collections/abc.pyc +0 -0
- package/python3.6.2/lib/python3.6/colorsys.pyc +0 -0
- package/python3.6.2/lib/python3.6/compileall.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/_base.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/process.pyc +0 -0
- package/python3.6.2/lib/python3.6/concurrent/futures/thread.pyc +0 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/Makefile +1808 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/Setup +397 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/Setup.config +10 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/Setup.local +1 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/config.c +114 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/config.c.in +67 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/install-sh +294 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/makesetup +296 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/python-config.pyc +0 -0
- package/python3.6.2/lib/python3.6/config-3.6m-arm-linux-androideabi/python.o +0 -0
- package/python3.6.2/lib/python3.6/configparser.pyc +0 -0
- package/python3.6.2/lib/python3.6/contextlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/copy.pyc +0 -0
- package/python3.6.2/lib/python3.6/copyreg.pyc +0 -0
- package/python3.6.2/lib/python3.6/crypt.pyc +0 -0
- package/python3.6.2/lib/python3.6/csv.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/_endian.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/dyld.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/dylib.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/macholib/framework.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/ctypes/wintypes.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/ascii.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/has_key.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/panel.pyc +0 -0
- package/python3.6.2/lib/python3.6/curses/textpad.pyc +0 -0
- package/python3.6.2/lib/python3.6/datetime.pyc +0 -0
- package/python3.6.2/lib/python3.6/dbm/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/dbm/dumb.pyc +0 -0
- package/python3.6.2/lib/python3.6/dbm/gnu.pyc +0 -0
- package/python3.6.2/lib/python3.6/dbm/ndbm.pyc +0 -0
- package/python3.6.2/lib/python3.6/decimal.pyc +0 -0
- package/python3.6.2/lib/python3.6/difflib.pyc +0 -0
- package/python3.6.2/lib/python3.6/dis.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/_msvccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/archive_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/bcppcompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/ccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/cmd.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_dumb.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_msi.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_rpm.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/bdist_wininst.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_clib.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_ext.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_py.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/build_scripts.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/check.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/clean.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/config.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_data.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_egg_info.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_headers.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_lib.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/install_scripts.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/register.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/sdist.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/upload.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/config.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/core.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/cygwinccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/debug.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/dep_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/dir_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/dist.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/errors.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/extension.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/fancy_getopt.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/file_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/filelist.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/log.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/msvc9compiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/msvccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/spawn.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/sysconfig.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/text_file.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/unixccompiler.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/version.pyc +0 -0
- package/python3.6.2/lib/python3.6/distutils/versionpredicate.pyc +0 -0
- package/python3.6.2/lib/python3.6/doctest.pyc +0 -0
- package/python3.6.2/lib/python3.6/dummy_threading.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/_encoded_words.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/_header_value_parser.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/_parseaddr.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/_policybase.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/base64mime.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/charset.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/contentmanager.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/encoders.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/errors.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/feedparser.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/generator.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/header.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/headerregistry.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/iterators.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/message.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/application.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/audio.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/base.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/image.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/message.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/multipart.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/nonmultipart.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/mime/text.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/parser.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/policy.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/quoprimime.pyc +0 -0
- package/python3.6.2/lib/python3.6/email/utils.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/aliases.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/ascii.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/base64_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/big5.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/big5hkscs.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/bz2_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/charmap.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp037.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1006.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1026.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1125.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1140.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1250.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1251.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1252.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1253.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1254.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1255.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1256.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1257.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp1258.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp273.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp424.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp437.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp500.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp65001.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp720.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp737.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp775.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp850.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp852.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp855.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp856.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp857.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp858.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp860.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp861.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp862.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp863.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp864.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp865.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp866.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp869.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp874.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp875.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp932.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp949.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/cp950.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/euc_jis_2004.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/euc_jisx0213.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/euc_jp.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/euc_kr.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/gb18030.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/gb2312.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/gbk.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/hex_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/hp_roman8.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/hz.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/idna.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_1.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_2.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_2004.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_3.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_ext.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso2022_kr.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_1.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_10.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_11.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_13.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_14.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_15.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_16.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_2.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_3.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_4.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_5.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_6.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_7.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_8.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/iso8859_9.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/johab.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/koi8_r.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/koi8_t.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/koi8_u.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/kz1048.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/latin_1.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_arabic.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_centeuro.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_croatian.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_cyrillic.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_farsi.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_greek.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_iceland.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_latin2.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_roman.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_romanian.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mac_turkish.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/mbcs.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/oem.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/palmos.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/ptcp154.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/punycode.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/quopri_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/raw_unicode_escape.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/rot_13.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/shift_jis.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/shift_jis_2004.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/shift_jisx0213.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/tis_620.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/undefined.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/unicode_escape.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/unicode_internal.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_16.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_16_be.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_16_le.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_32.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_32_be.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_32_le.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_7.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_8.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/utf_8_sig.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/uu_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/encodings/zlib_codec.pyc +0 -0
- package/python3.6.2/lib/python3.6/ensurepip/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/ensurepip/__main__.pyc +0 -0
- package/python3.6.2/lib/python3.6/ensurepip/_uninstall.pyc +0 -0
- package/python3.6.2/lib/python3.6/enum.pyc +0 -0
- package/python3.6.2/lib/python3.6/filecmp.pyc +0 -0
- package/python3.6.2/lib/python3.6/fileinput.pyc +0 -0
- package/python3.6.2/lib/python3.6/fnmatch.pyc +0 -0
- package/python3.6.2/lib/python3.6/formatter.pyc +0 -0
- package/python3.6.2/lib/python3.6/fractions.pyc +0 -0
- package/python3.6.2/lib/python3.6/ftplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/functools.pyc +0 -0
- package/python3.6.2/lib/python3.6/genericpath.pyc +0 -0
- package/python3.6.2/lib/python3.6/getopt.pyc +0 -0
- package/python3.6.2/lib/python3.6/getpass.pyc +0 -0
- package/python3.6.2/lib/python3.6/gettext.pyc +0 -0
- package/python3.6.2/lib/python3.6/glob.pyc +0 -0
- package/python3.6.2/lib/python3.6/gzip.pyc +0 -0
- package/python3.6.2/lib/python3.6/hashlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/heapq.pyc +0 -0
- package/python3.6.2/lib/python3.6/hmac.pyc +0 -0
- package/python3.6.2/lib/python3.6/html/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/html/entities.pyc +0 -0
- package/python3.6.2/lib/python3.6/html/parser.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/client.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/cookiejar.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/cookies.pyc +0 -0
- package/python3.6.2/lib/python3.6/http/server.pyc +0 -0
- package/python3.6.2/lib/python3.6/imaplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/imghdr.pyc +0 -0
- package/python3.6.2/lib/python3.6/imp.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/_bootstrap.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/_bootstrap_external.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/abc.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/machinery.pyc +0 -0
- package/python3.6.2/lib/python3.6/importlib/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/inspect.pyc +0 -0
- package/python3.6.2/lib/python3.6/io.pyc +0 -0
- package/python3.6.2/lib/python3.6/ipaddress.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/decoder.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/encoder.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/scanner.pyc +0 -0
- package/python3.6.2/lib/python3.6/json/tool.pyc +0 -0
- package/python3.6.2/lib/python3.6/keyword.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/Grammar3.6.3.final.0.pickle +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/PatternGrammar3.6.3.final.0.pickle +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/__main__.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/btm_matcher.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/btm_utils.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixer_base.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixer_util.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_apply.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_asserts.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_basestring.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_buffer.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_dict.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_except.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_exec.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_execfile.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_exitfunc.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_filter.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_funcattrs.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_future.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_getcwdu.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_has_key.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_idioms.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_import.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_imports.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_imports2.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_input.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_intern.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_isinstance.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_itertools.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_itertools_imports.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_long.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_map.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_metaclass.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_methodattrs.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_ne.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_next.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_nonzero.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_numliterals.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_operator.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_paren.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_print.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_raise.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_raw_input.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_reduce.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_reload.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_renames.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_repr.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_set_literal.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_standarderror.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_sys_exc.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_throw.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_tuple_params.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_types.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_unicode.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_urllib.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_ws_comma.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_xrange.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_xreadlines.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_zip.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/main.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/patcomp.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/conv.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/driver.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/grammar.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/literals.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/parse.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/pgen.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/token.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/tokenize.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pygram.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/pytree.pyc +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/refactor.pyc +0 -0
- package/python3.6.2/lib/python3.6/linecache.pyc +0 -0
- package/python3.6.2/lib/python3.6/locale.pyc +0 -0
- package/python3.6.2/lib/python3.6/logging/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/logging/config.pyc +0 -0
- package/python3.6.2/lib/python3.6/logging/handlers.pyc +0 -0
- package/python3.6.2/lib/python3.6/lzma.pyc +0 -0
- package/python3.6.2/lib/python3.6/macpath.pyc +0 -0
- package/python3.6.2/lib/python3.6/macurl2path.pyc +0 -0
- package/python3.6.2/lib/python3.6/mailbox.pyc +0 -0
- package/python3.6.2/lib/python3.6/mailcap.pyc +0 -0
- package/python3.6.2/lib/python3.6/mimetypes.pyc +0 -0
- package/python3.6.2/lib/python3.6/modulefinder.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/connection.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/context.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/dummy/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/dummy/connection.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/forkserver.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/heap.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/managers.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/pool.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_fork.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_forkserver.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_spawn_posix.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/popen_spawn_win32.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/process.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/queues.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/reduction.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/resource_sharer.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/semaphore_tracker.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/sharedctypes.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/spawn.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/synchronize.pyc +0 -0
- package/python3.6.2/lib/python3.6/multiprocessing/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/netrc.pyc +0 -0
- package/python3.6.2/lib/python3.6/nntplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/ntpath.pyc +0 -0
- package/python3.6.2/lib/python3.6/nturl2path.pyc +0 -0
- package/python3.6.2/lib/python3.6/numbers.pyc +0 -0
- package/python3.6.2/lib/python3.6/opcode.pyc +0 -0
- package/python3.6.2/lib/python3.6/operator.pyc +0 -0
- package/python3.6.2/lib/python3.6/optparse.pyc +0 -0
- package/python3.6.2/lib/python3.6/os.pyc +0 -0
- package/python3.6.2/lib/python3.6/pathlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/pdb.pyc +0 -0
- package/python3.6.2/lib/python3.6/pickle.pyc +0 -0
- package/python3.6.2/lib/python3.6/pickletools.pyc +0 -0
- package/python3.6.2/lib/python3.6/pipes.pyc +0 -0
- package/python3.6.2/lib/python3.6/pkgutil.pyc +0 -0
- package/python3.6.2/lib/python3.6/platform.pyc +0 -0
- package/python3.6.2/lib/python3.6/plistlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/poplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/posixpath.pyc +0 -0
- package/python3.6.2/lib/python3.6/pprint.pyc +0 -0
- package/python3.6.2/lib/python3.6/profile.pyc +0 -0
- package/python3.6.2/lib/python3.6/pstats.pyc +0 -0
- package/python3.6.2/lib/python3.6/pty.pyc +0 -0
- package/python3.6.2/lib/python3.6/py_compile.pyc +0 -0
- package/python3.6.2/lib/python3.6/pyclbr.pyc +0 -0
- package/python3.6.2/lib/python3.6/pydoc.pyc +0 -0
- package/python3.6.2/lib/python3.6/pydoc_data/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/pydoc_data/topics.pyc +0 -0
- package/python3.6.2/lib/python3.6/queue.pyc +0 -0
- package/python3.6.2/lib/python3.6/quopri.pyc +0 -0
- package/python3.6.2/lib/python3.6/random.pyc +0 -0
- package/python3.6.2/lib/python3.6/re.pyc +0 -0
- package/python3.6.2/lib/python3.6/reprlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/rlcompleter.pyc +0 -0
- package/python3.6.2/lib/python3.6/runpy.pyc +0 -0
- package/python3.6.2/lib/python3.6/sched.pyc +0 -0
- package/python3.6.2/lib/python3.6/secrets.pyc +0 -0
- package/python3.6.2/lib/python3.6/selectors.pyc +0 -0
- package/python3.6.2/lib/python3.6/shelve.pyc +0 -0
- package/python3.6.2/lib/python3.6/shlex.pyc +0 -0
- package/python3.6.2/lib/python3.6/shutil.pyc +0 -0
- package/python3.6.2/lib/python3.6/signal.pyc +0 -0
- package/python3.6.2/lib/python3.6/site.pyc +0 -0
- package/python3.6.2/lib/python3.6/smtpd.pyc +0 -0
- package/python3.6.2/lib/python3.6/smtplib.pyc +0 -0
- package/python3.6.2/lib/python3.6/sndhdr.pyc +0 -0
- package/python3.6.2/lib/python3.6/socket.pyc +0 -0
- package/python3.6.2/lib/python3.6/socketserver.pyc +0 -0
- package/python3.6.2/lib/python3.6/sqlite3/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/sqlite3/dbapi2.pyc +0 -0
- package/python3.6.2/lib/python3.6/sqlite3/dump.pyc +0 -0
- package/python3.6.2/lib/python3.6/sre_compile.pyc +0 -0
- package/python3.6.2/lib/python3.6/sre_constants.pyc +0 -0
- package/python3.6.2/lib/python3.6/sre_parse.pyc +0 -0
- package/python3.6.2/lib/python3.6/ssl.pyc +0 -0
- package/python3.6.2/lib/python3.6/stat.pyc +0 -0
- package/python3.6.2/lib/python3.6/statistics.pyc +0 -0
- package/python3.6.2/lib/python3.6/string.pyc +0 -0
- package/python3.6.2/lib/python3.6/stringprep.pyc +0 -0
- package/python3.6.2/lib/python3.6/struct.pyc +0 -0
- package/python3.6.2/lib/python3.6/subprocess.pyc +0 -0
- package/python3.6.2/lib/python3.6/sunau.pyc +0 -0
- package/python3.6.2/lib/python3.6/symbol.pyc +0 -0
- package/python3.6.2/lib/python3.6/symtable.pyc +0 -0
- package/python3.6.2/lib/python3.6/sysconfig.pyc +0 -0
- package/python3.6.2/lib/python3.6/tabnanny.pyc +0 -0
- package/python3.6.2/lib/python3.6/tarfile.pyc +0 -0
- package/python3.6.2/lib/python3.6/telnetlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/tempfile.pyc +0 -0
- package/python3.6.2/lib/python3.6/textwrap.pyc +0 -0
- package/python3.6.2/lib/python3.6/this.pyc +0 -0
- package/python3.6.2/lib/python3.6/threading.pyc +0 -0
- package/python3.6.2/lib/python3.6/timeit.pyc +0 -0
- package/python3.6.2/lib/python3.6/token.pyc +0 -0
- package/python3.6.2/lib/python3.6/tokenize.pyc +0 -0
- package/python3.6.2/lib/python3.6/trace.pyc +0 -0
- package/python3.6.2/lib/python3.6/traceback.pyc +0 -0
- package/python3.6.2/lib/python3.6/tracemalloc.pyc +0 -0
- package/python3.6.2/lib/python3.6/tty.pyc +0 -0
- package/python3.6.2/lib/python3.6/turtle.pyc +0 -0
- package/python3.6.2/lib/python3.6/types.pyc +0 -0
- package/python3.6.2/lib/python3.6/typing.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/__main__.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/case.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/loader.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/main.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/mock.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/result.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/runner.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/signals.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/suite.pyc +0 -0
- package/python3.6.2/lib/python3.6/unittest/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/error.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/parse.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/request.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/response.pyc +0 -0
- package/python3.6.2/lib/python3.6/urllib/robotparser.pyc +0 -0
- package/python3.6.2/lib/python3.6/uu.pyc +0 -0
- package/python3.6.2/lib/python3.6/uuid.pyc +0 -0
- package/python3.6.2/lib/python3.6/venv/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/venv/__main__.pyc +0 -0
- package/python3.6.2/lib/python3.6/warnings.pyc +0 -0
- package/python3.6.2/lib/python3.6/wave.pyc +0 -0
- package/python3.6.2/lib/python3.6/weakref.pyc +0 -0
- package/python3.6.2/lib/python3.6/webbrowser.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/handlers.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/headers.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/simple_server.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/util.pyc +0 -0
- package/python3.6.2/lib/python3.6/wsgiref/validate.pyc +0 -0
- package/python3.6.2/lib/python3.6/xdrlib.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/NodeFilter.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/domreg.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/expatbuilder.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/minicompat.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/minidom.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/pulldom.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/dom/xmlbuilder.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/ElementInclude.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/ElementPath.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/ElementTree.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/etree/cElementTree.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/parsers/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/parsers/expat.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/_exceptions.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/expatreader.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/handler.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/saxutils.pyc +0 -0
- package/python3.6.2/lib/python3.6/xml/sax/xmlreader.pyc +0 -0
- package/python3.6.2/lib/python3.6/xmlrpc/__init__.pyc +0 -0
- package/python3.6.2/lib/python3.6/xmlrpc/client.pyc +0 -0
- package/python3.6.2/lib/python3.6/xmlrpc/server.pyc +0 -0
- package/python3.6.2/lib/python3.6/zipapp.pyc +0 -0
- package/python3.6.2/lib/python3.6/zipfile.pyc +0 -0
- package/python3.6.2/bin/idle3.4 +0 -5
- package/python3.6.2/bin/pip3.4 +0 -11
- package/python3.6.2/bin/pydoc3.4 +0 -5
- package/python3.6.2/bin/pyvenv-3.4 +0 -11
- package/python3.6.2/lib/python3.6/__future__.py +0 -140
- package/python3.6.2/lib/python3.6/__phello__.foo.py +0 -1
- package/python3.6.2/lib/python3.6/_bootlocale.py +0 -34
- package/python3.6.2/lib/python3.6/_collections_abc.py +0 -1008
- package/python3.6.2/lib/python3.6/_compat_pickle.py +0 -251
- package/python3.6.2/lib/python3.6/_compression.py +0 -152
- package/python3.6.2/lib/python3.6/_dummy_thread.py +0 -163
- package/python3.6.2/lib/python3.6/_markupbase.py +0 -395
- package/python3.6.2/lib/python3.6/_osx_support.py +0 -502
- package/python3.6.2/lib/python3.6/_pydecimal.py +0 -6449
- package/python3.6.2/lib/python3.6/_pyio.py +0 -2531
- package/python3.6.2/lib/python3.6/_sitebuiltins.py +0 -103
- package/python3.6.2/lib/python3.6/_strptime.py +0 -576
- package/python3.6.2/lib/python3.6/_threading_local.py +0 -246
- package/python3.6.2/lib/python3.6/_weakrefset.py +0 -196
- package/python3.6.2/lib/python3.6/abc.py +0 -248
- package/python3.6.2/lib/python3.6/aifc.py +0 -943
- package/python3.6.2/lib/python3.6/antigravity.py +0 -17
- package/python3.6.2/lib/python3.6/argparse.py +0 -2389
- package/python3.6.2/lib/python3.6/ast.py +0 -322
- package/python3.6.2/lib/python3.6/asynchat.py +0 -307
- package/python3.6.2/lib/python3.6/asyncio/__init__.py +0 -50
- package/python3.6.2/lib/python3.6/asyncio/base_events.py +0 -1474
- package/python3.6.2/lib/python3.6/asyncio/base_futures.py +0 -71
- package/python3.6.2/lib/python3.6/asyncio/base_subprocess.py +0 -293
- package/python3.6.2/lib/python3.6/asyncio/base_tasks.py +0 -76
- package/python3.6.2/lib/python3.6/asyncio/compat.py +0 -18
- package/python3.6.2/lib/python3.6/asyncio/constants.py +0 -12
- package/python3.6.2/lib/python3.6/asyncio/coroutines.py +0 -346
- package/python3.6.2/lib/python3.6/asyncio/events.py +0 -715
- package/python3.6.2/lib/python3.6/asyncio/futures.py +0 -439
- package/python3.6.2/lib/python3.6/asyncio/locks.py +0 -485
- package/python3.6.2/lib/python3.6/asyncio/log.py +0 -7
- package/python3.6.2/lib/python3.6/asyncio/proactor_events.py +0 -551
- package/python3.6.2/lib/python3.6/asyncio/protocols.py +0 -134
- package/python3.6.2/lib/python3.6/asyncio/queues.py +0 -259
- package/python3.6.2/lib/python3.6/asyncio/selector_events.py +0 -1141
- package/python3.6.2/lib/python3.6/asyncio/sslproto.py +0 -697
- package/python3.6.2/lib/python3.6/asyncio/streams.py +0 -701
- package/python3.6.2/lib/python3.6/asyncio/subprocess.py +0 -226
- package/python3.6.2/lib/python3.6/asyncio/tasks.py +0 -717
- package/python3.6.2/lib/python3.6/asyncio/test_utils.py +0 -519
- package/python3.6.2/lib/python3.6/asyncio/transports.py +0 -306
- package/python3.6.2/lib/python3.6/asyncio/unix_events.py +0 -1074
- package/python3.6.2/lib/python3.6/asyncio/windows_events.py +0 -779
- package/python3.6.2/lib/python3.6/asyncio/windows_utils.py +0 -224
- package/python3.6.2/lib/python3.6/asyncore.py +0 -645
- package/python3.6.2/lib/python3.6/base64.py +0 -602
- package/python3.6.2/lib/python3.6/bdb.py +0 -673
- package/python3.6.2/lib/python3.6/binhex.py +0 -479
- package/python3.6.2/lib/python3.6/bisect.py +0 -92
- package/python3.6.2/lib/python3.6/bz2.py +0 -361
- package/python3.6.2/lib/python3.6/cProfile.py +0 -160
- package/python3.6.2/lib/python3.6/calendar.py +0 -713
- package/python3.6.2/lib/python3.6/cgi.py +0 -1077
- package/python3.6.2/lib/python3.6/cgitb.py +0 -319
- package/python3.6.2/lib/python3.6/chunk.py +0 -169
- package/python3.6.2/lib/python3.6/cmd.py +0 -401
- package/python3.6.2/lib/python3.6/code.py +0 -314
- package/python3.6.2/lib/python3.6/codecs.py +0 -1113
- package/python3.6.2/lib/python3.6/codeop.py +0 -168
- package/python3.6.2/lib/python3.6/collections/__init__.py +0 -1244
- package/python3.6.2/lib/python3.6/collections/abc.py +0 -2
- package/python3.6.2/lib/python3.6/colorsys.py +0 -164
- package/python3.6.2/lib/python3.6/compileall.py +0 -295
- package/python3.6.2/lib/python3.6/concurrent/__init__.py +0 -1
- package/python3.6.2/lib/python3.6/concurrent/futures/__init__.py +0 -18
- package/python3.6.2/lib/python3.6/concurrent/futures/_base.py +0 -612
- package/python3.6.2/lib/python3.6/concurrent/futures/process.py +0 -515
- package/python3.6.2/lib/python3.6/concurrent/futures/thread.py +0 -153
- package/python3.6.2/lib/python3.6/configparser.py +0 -1342
- package/python3.6.2/lib/python3.6/contextlib.py +0 -384
- package/python3.6.2/lib/python3.6/copy.py +0 -313
- package/python3.6.2/lib/python3.6/copyreg.py +0 -206
- package/python3.6.2/lib/python3.6/crypt.py +0 -61
- package/python3.6.2/lib/python3.6/csv.py +0 -449
- package/python3.6.2/lib/python3.6/ctypes/__init__.py +0 -538
- package/python3.6.2/lib/python3.6/ctypes/_endian.py +0 -61
- package/python3.6.2/lib/python3.6/ctypes/macholib/__init__.py +0 -9
- package/python3.6.2/lib/python3.6/ctypes/macholib/dyld.py +0 -159
- package/python3.6.2/lib/python3.6/ctypes/macholib/dylib.py +0 -63
- package/python3.6.2/lib/python3.6/ctypes/macholib/framework.py +0 -65
- package/python3.6.2/lib/python3.6/ctypes/test/__init__.py +0 -14
- package/python3.6.2/lib/python3.6/ctypes/test/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/ctypes/test/test_anon.py +0 -73
- package/python3.6.2/lib/python3.6/ctypes/test/test_array_in_pointer.py +0 -64
- package/python3.6.2/lib/python3.6/ctypes/test/test_arrays.py +0 -185
- package/python3.6.2/lib/python3.6/ctypes/test/test_as_parameter.py +0 -226
- package/python3.6.2/lib/python3.6/ctypes/test/test_bitfields.py +0 -290
- package/python3.6.2/lib/python3.6/ctypes/test/test_buffers.py +0 -64
- package/python3.6.2/lib/python3.6/ctypes/test/test_bytes.py +0 -65
- package/python3.6.2/lib/python3.6/ctypes/test/test_byteswap.py +0 -315
- package/python3.6.2/lib/python3.6/ctypes/test/test_callbacks.py +0 -293
- package/python3.6.2/lib/python3.6/ctypes/test/test_cast.py +0 -86
- package/python3.6.2/lib/python3.6/ctypes/test/test_cfuncs.py +0 -212
- package/python3.6.2/lib/python3.6/ctypes/test/test_checkretval.py +0 -36
- package/python3.6.2/lib/python3.6/ctypes/test/test_delattr.py +0 -21
- package/python3.6.2/lib/python3.6/ctypes/test/test_errno.py +0 -79
- package/python3.6.2/lib/python3.6/ctypes/test/test_find.py +0 -116
- package/python3.6.2/lib/python3.6/ctypes/test/test_frombuffer.py +0 -141
- package/python3.6.2/lib/python3.6/ctypes/test/test_funcptr.py +0 -132
- package/python3.6.2/lib/python3.6/ctypes/test/test_functions.py +0 -402
- package/python3.6.2/lib/python3.6/ctypes/test/test_incomplete.py +0 -42
- package/python3.6.2/lib/python3.6/ctypes/test/test_init.py +0 -40
- package/python3.6.2/lib/python3.6/ctypes/test/test_internals.py +0 -100
- package/python3.6.2/lib/python3.6/ctypes/test/test_keeprefs.py +0 -153
- package/python3.6.2/lib/python3.6/ctypes/test/test_libc.py +0 -33
- package/python3.6.2/lib/python3.6/ctypes/test/test_loading.py +0 -116
- package/python3.6.2/lib/python3.6/ctypes/test/test_macholib.py +0 -63
- package/python3.6.2/lib/python3.6/ctypes/test/test_memfunctions.py +0 -79
- package/python3.6.2/lib/python3.6/ctypes/test/test_numbers.py +0 -290
- package/python3.6.2/lib/python3.6/ctypes/test/test_objects.py +0 -67
- package/python3.6.2/lib/python3.6/ctypes/test/test_parameters.py +0 -207
- package/python3.6.2/lib/python3.6/ctypes/test/test_pep3118.py +0 -233
- package/python3.6.2/lib/python3.6/ctypes/test/test_pickling.py +0 -81
- package/python3.6.2/lib/python3.6/ctypes/test/test_pointers.py +0 -223
- package/python3.6.2/lib/python3.6/ctypes/test/test_prototypes.py +0 -222
- package/python3.6.2/lib/python3.6/ctypes/test/test_python_api.py +0 -89
- package/python3.6.2/lib/python3.6/ctypes/test/test_random_things.py +0 -74
- package/python3.6.2/lib/python3.6/ctypes/test/test_refcounts.py +0 -101
- package/python3.6.2/lib/python3.6/ctypes/test/test_repr.py +0 -29
- package/python3.6.2/lib/python3.6/ctypes/test/test_returnfuncptrs.py +0 -66
- package/python3.6.2/lib/python3.6/ctypes/test/test_simplesubclasses.py +0 -55
- package/python3.6.2/lib/python3.6/ctypes/test/test_sizes.py +0 -33
- package/python3.6.2/lib/python3.6/ctypes/test/test_slicing.py +0 -167
- package/python3.6.2/lib/python3.6/ctypes/test/test_stringptr.py +0 -77
- package/python3.6.2/lib/python3.6/ctypes/test/test_strings.py +0 -225
- package/python3.6.2/lib/python3.6/ctypes/test/test_struct_fields.py +0 -74
- package/python3.6.2/lib/python3.6/ctypes/test/test_structures.py +0 -491
- package/python3.6.2/lib/python3.6/ctypes/test/test_unaligned_structures.py +0 -45
- package/python3.6.2/lib/python3.6/ctypes/test/test_unicode.py +0 -56
- package/python3.6.2/lib/python3.6/ctypes/test/test_values.py +0 -100
- package/python3.6.2/lib/python3.6/ctypes/test/test_varsize_struct.py +0 -50
- package/python3.6.2/lib/python3.6/ctypes/test/test_win32.py +0 -147
- package/python3.6.2/lib/python3.6/ctypes/test/test_wintypes.py +0 -41
- package/python3.6.2/lib/python3.6/ctypes/util.py +0 -337
- package/python3.6.2/lib/python3.6/ctypes/wintypes.py +0 -202
- package/python3.6.2/lib/python3.6/curses/__init__.py +0 -101
- package/python3.6.2/lib/python3.6/curses/ascii.py +0 -99
- package/python3.6.2/lib/python3.6/curses/has_key.py +0 -192
- package/python3.6.2/lib/python3.6/curses/panel.py +0 -6
- package/python3.6.2/lib/python3.6/curses/textpad.py +0 -201
- package/python3.6.2/lib/python3.6/datetime.py +0 -2280
- package/python3.6.2/lib/python3.6/dbm/__init__.py +0 -188
- package/python3.6.2/lib/python3.6/dbm/dumb.py +0 -324
- package/python3.6.2/lib/python3.6/dbm/gnu.py +0 -3
- package/python3.6.2/lib/python3.6/dbm/ndbm.py +0 -3
- package/python3.6.2/lib/python3.6/decimal.py +0 -11
- package/python3.6.2/lib/python3.6/difflib.py +0 -2093
- package/python3.6.2/lib/python3.6/dis.py +0 -490
- package/python3.6.2/lib/python3.6/distutils/__init__.py +0 -13
- package/python3.6.2/lib/python3.6/distutils/_msvccompiler.py +0 -574
- package/python3.6.2/lib/python3.6/distutils/archive_util.py +0 -248
- package/python3.6.2/lib/python3.6/distutils/bcppcompiler.py +0 -393
- package/python3.6.2/lib/python3.6/distutils/ccompiler.py +0 -1115
- package/python3.6.2/lib/python3.6/distutils/cmd.py +0 -434
- package/python3.6.2/lib/python3.6/distutils/command/__init__.py +0 -31
- package/python3.6.2/lib/python3.6/distutils/command/bdist.py +0 -143
- package/python3.6.2/lib/python3.6/distutils/command/bdist_dumb.py +0 -123
- package/python3.6.2/lib/python3.6/distutils/command/bdist_msi.py +0 -741
- package/python3.6.2/lib/python3.6/distutils/command/bdist_rpm.py +0 -582
- package/python3.6.2/lib/python3.6/distutils/command/bdist_wininst.py +0 -365
- package/python3.6.2/lib/python3.6/distutils/command/build.py +0 -157
- package/python3.6.2/lib/python3.6/distutils/command/build_clib.py +0 -209
- package/python3.6.2/lib/python3.6/distutils/command/build_ext.py +0 -755
- package/python3.6.2/lib/python3.6/distutils/command/build_py.py +0 -416
- package/python3.6.2/lib/python3.6/distutils/command/build_scripts.py +0 -160
- package/python3.6.2/lib/python3.6/distutils/command/check.py +0 -145
- package/python3.6.2/lib/python3.6/distutils/command/clean.py +0 -76
- package/python3.6.2/lib/python3.6/distutils/command/config.py +0 -347
- package/python3.6.2/lib/python3.6/distutils/command/install.py +0 -656
- package/python3.6.2/lib/python3.6/distutils/command/install_data.py +0 -79
- package/python3.6.2/lib/python3.6/distutils/command/install_egg_info.py +0 -77
- package/python3.6.2/lib/python3.6/distutils/command/install_headers.py +0 -47
- package/python3.6.2/lib/python3.6/distutils/command/install_lib.py +0 -217
- package/python3.6.2/lib/python3.6/distutils/command/install_scripts.py +0 -60
- package/python3.6.2/lib/python3.6/distutils/command/register.py +0 -304
- package/python3.6.2/lib/python3.6/distutils/command/sdist.py +0 -456
- package/python3.6.2/lib/python3.6/distutils/command/upload.py +0 -201
- package/python3.6.2/lib/python3.6/distutils/command/wininst-10.0-amd64.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-10.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-14.0-amd64.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-14.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-6.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-7.1.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-8.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-9.0-amd64.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/command/wininst-9.0.exe +0 -0
- package/python3.6.2/lib/python3.6/distutils/config.py +0 -131
- package/python3.6.2/lib/python3.6/distutils/core.py +0 -234
- package/python3.6.2/lib/python3.6/distutils/cygwinccompiler.py +0 -405
- package/python3.6.2/lib/python3.6/distutils/debug.py +0 -5
- package/python3.6.2/lib/python3.6/distutils/dep_util.py +0 -92
- package/python3.6.2/lib/python3.6/distutils/dir_util.py +0 -210
- package/python3.6.2/lib/python3.6/distutils/dist.py +0 -1236
- package/python3.6.2/lib/python3.6/distutils/errors.py +0 -97
- package/python3.6.2/lib/python3.6/distutils/extension.py +0 -240
- package/python3.6.2/lib/python3.6/distutils/fancy_getopt.py +0 -457
- package/python3.6.2/lib/python3.6/distutils/file_util.py +0 -238
- package/python3.6.2/lib/python3.6/distutils/filelist.py +0 -327
- package/python3.6.2/lib/python3.6/distutils/log.py +0 -75
- package/python3.6.2/lib/python3.6/distutils/msvc9compiler.py +0 -791
- package/python3.6.2/lib/python3.6/distutils/msvccompiler.py +0 -643
- package/python3.6.2/lib/python3.6/distutils/spawn.py +0 -192
- package/python3.6.2/lib/python3.6/distutils/sysconfig.py +0 -532
- package/python3.6.2/lib/python3.6/distutils/tests/Setup.sample +0 -67
- package/python3.6.2/lib/python3.6/distutils/tests/__init__.py +0 -36
- package/python3.6.2/lib/python3.6/distutils/tests/support.py +0 -210
- package/python3.6.2/lib/python3.6/distutils/tests/test_archive_util.py +0 -395
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist.py +0 -50
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist_dumb.py +0 -97
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist_msi.py +0 -25
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist_rpm.py +0 -135
- package/python3.6.2/lib/python3.6/distutils/tests/test_bdist_wininst.py +0 -31
- package/python3.6.2/lib/python3.6/distutils/tests/test_build.py +0 -56
- package/python3.6.2/lib/python3.6/distutils/tests/test_build_clib.py +0 -135
- package/python3.6.2/lib/python3.6/distutils/tests/test_build_ext.py +0 -521
- package/python3.6.2/lib/python3.6/distutils/tests/test_build_py.py +0 -179
- package/python3.6.2/lib/python3.6/distutils/tests/test_build_scripts.py +0 -112
- package/python3.6.2/lib/python3.6/distutils/tests/test_check.py +0 -149
- package/python3.6.2/lib/python3.6/distutils/tests/test_clean.py +0 -49
- package/python3.6.2/lib/python3.6/distutils/tests/test_cmd.py +0 -126
- package/python3.6.2/lib/python3.6/distutils/tests/test_config.py +0 -140
- package/python3.6.2/lib/python3.6/distutils/tests/test_config_cmd.py +0 -92
- package/python3.6.2/lib/python3.6/distutils/tests/test_core.py +0 -140
- package/python3.6.2/lib/python3.6/distutils/tests/test_cygwinccompiler.py +0 -154
- package/python3.6.2/lib/python3.6/distutils/tests/test_dep_util.py +0 -80
- package/python3.6.2/lib/python3.6/distutils/tests/test_dir_util.py +0 -139
- package/python3.6.2/lib/python3.6/distutils/tests/test_dist.py +0 -456
- package/python3.6.2/lib/python3.6/distutils/tests/test_extension.py +0 -69
- package/python3.6.2/lib/python3.6/distutils/tests/test_file_util.py +0 -114
- package/python3.6.2/lib/python3.6/distutils/tests/test_filelist.py +0 -340
- package/python3.6.2/lib/python3.6/distutils/tests/test_install.py +0 -248
- package/python3.6.2/lib/python3.6/distutils/tests/test_install_data.py +0 -75
- package/python3.6.2/lib/python3.6/distutils/tests/test_install_headers.py +0 -39
- package/python3.6.2/lib/python3.6/distutils/tests/test_install_lib.py +0 -115
- package/python3.6.2/lib/python3.6/distutils/tests/test_install_scripts.py +0 -82
- package/python3.6.2/lib/python3.6/distutils/tests/test_log.py +0 -38
- package/python3.6.2/lib/python3.6/distutils/tests/test_msvc9compiler.py +0 -184
- package/python3.6.2/lib/python3.6/distutils/tests/test_msvccompiler.py +0 -132
- package/python3.6.2/lib/python3.6/distutils/tests/test_register.py +0 -323
- package/python3.6.2/lib/python3.6/distutils/tests/test_sdist.py +0 -484
- package/python3.6.2/lib/python3.6/distutils/tests/test_spawn.py +0 -58
- package/python3.6.2/lib/python3.6/distutils/tests/test_sysconfig.py +0 -198
- package/python3.6.2/lib/python3.6/distutils/tests/test_text_file.py +0 -107
- package/python3.6.2/lib/python3.6/distutils/tests/test_unixccompiler.py +0 -149
- package/python3.6.2/lib/python3.6/distutils/tests/test_upload.py +0 -181
- package/python3.6.2/lib/python3.6/distutils/tests/test_util.py +0 -300
- package/python3.6.2/lib/python3.6/distutils/tests/test_version.py +0 -71
- package/python3.6.2/lib/python3.6/distutils/tests/test_versionpredicate.py +0 -13
- package/python3.6.2/lib/python3.6/distutils/text_file.py +0 -286
- package/python3.6.2/lib/python3.6/distutils/unixccompiler.py +0 -322
- package/python3.6.2/lib/python3.6/distutils/util.py +0 -557
- package/python3.6.2/lib/python3.6/distutils/version.py +0 -343
- package/python3.6.2/lib/python3.6/distutils/versionpredicate.py +0 -166
- package/python3.6.2/lib/python3.6/doctest.py +0 -2787
- package/python3.6.2/lib/python3.6/dummy_threading.py +0 -78
- package/python3.6.2/lib/python3.6/email/__init__.py +0 -62
- package/python3.6.2/lib/python3.6/email/_encoded_words.py +0 -221
- package/python3.6.2/lib/python3.6/email/_header_value_parser.py +0 -2811
- package/python3.6.2/lib/python3.6/email/_parseaddr.py +0 -540
- package/python3.6.2/lib/python3.6/email/_policybase.py +0 -374
- package/python3.6.2/lib/python3.6/email/base64mime.py +0 -119
- package/python3.6.2/lib/python3.6/email/charset.py +0 -406
- package/python3.6.2/lib/python3.6/email/contentmanager.py +0 -250
- package/python3.6.2/lib/python3.6/email/encoders.py +0 -69
- package/python3.6.2/lib/python3.6/email/errors.py +0 -107
- package/python3.6.2/lib/python3.6/email/feedparser.py +0 -536
- package/python3.6.2/lib/python3.6/email/generator.py +0 -508
- package/python3.6.2/lib/python3.6/email/header.py +0 -578
- package/python3.6.2/lib/python3.6/email/headerregistry.py +0 -589
- package/python3.6.2/lib/python3.6/email/iterators.py +0 -71
- package/python3.6.2/lib/python3.6/email/message.py +0 -1164
- package/python3.6.2/lib/python3.6/email/mime/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/email/mime/application.py +0 -37
- package/python3.6.2/lib/python3.6/email/mime/audio.py +0 -74
- package/python3.6.2/lib/python3.6/email/mime/base.py +0 -30
- package/python3.6.2/lib/python3.6/email/mime/image.py +0 -47
- package/python3.6.2/lib/python3.6/email/mime/message.py +0 -34
- package/python3.6.2/lib/python3.6/email/mime/multipart.py +0 -48
- package/python3.6.2/lib/python3.6/email/mime/nonmultipart.py +0 -22
- package/python3.6.2/lib/python3.6/email/mime/text.py +0 -42
- package/python3.6.2/lib/python3.6/email/parser.py +0 -132
- package/python3.6.2/lib/python3.6/email/policy.py +0 -223
- package/python3.6.2/lib/python3.6/email/quoprimime.py +0 -299
- package/python3.6.2/lib/python3.6/email/utils.py +0 -388
- package/python3.6.2/lib/python3.6/encodings/__init__.py +0 -169
- package/python3.6.2/lib/python3.6/encodings/aliases.py +0 -550
- package/python3.6.2/lib/python3.6/encodings/ascii.py +0 -50
- package/python3.6.2/lib/python3.6/encodings/base64_codec.py +0 -55
- package/python3.6.2/lib/python3.6/encodings/big5.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/big5hkscs.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/bz2_codec.py +0 -78
- package/python3.6.2/lib/python3.6/encodings/charmap.py +0 -69
- package/python3.6.2/lib/python3.6/encodings/cp037.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1006.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1026.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1125.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp1140.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1250.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1251.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1252.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1253.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1254.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1255.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1256.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1257.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp1258.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp273.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp424.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp437.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp500.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp65001.py +0 -43
- package/python3.6.2/lib/python3.6/encodings/cp720.py +0 -309
- package/python3.6.2/lib/python3.6/encodings/cp737.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp775.py +0 -697
- package/python3.6.2/lib/python3.6/encodings/cp850.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp852.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp855.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp856.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp857.py +0 -694
- package/python3.6.2/lib/python3.6/encodings/cp858.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp860.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp861.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp862.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp863.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp864.py +0 -690
- package/python3.6.2/lib/python3.6/encodings/cp865.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp866.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/cp869.py +0 -689
- package/python3.6.2/lib/python3.6/encodings/cp874.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp875.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/cp932.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/cp949.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/cp950.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/euc_jis_2004.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/euc_jisx0213.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/euc_jp.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/euc_kr.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/gb18030.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/gb2312.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/gbk.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/hex_codec.py +0 -55
- package/python3.6.2/lib/python3.6/encodings/hp_roman8.py +0 -314
- package/python3.6.2/lib/python3.6/encodings/hz.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/idna.py +0 -309
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_1.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_2.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_2004.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_3.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/iso2022_jp_ext.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/iso2022_kr.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/iso8859_1.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_10.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_11.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_13.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_14.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_15.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_16.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_2.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_3.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_4.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_5.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_6.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_7.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_8.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/iso8859_9.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/johab.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/koi8_r.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/koi8_t.py +0 -308
- package/python3.6.2/lib/python3.6/encodings/koi8_u.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/kz1048.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/latin_1.py +0 -50
- package/python3.6.2/lib/python3.6/encodings/mac_arabic.py +0 -698
- package/python3.6.2/lib/python3.6/encodings/mac_centeuro.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/mac_croatian.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/mac_cyrillic.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/mac_farsi.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/mac_greek.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/mac_iceland.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/mac_latin2.py +0 -312
- package/python3.6.2/lib/python3.6/encodings/mac_roman.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/mac_romanian.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/mac_turkish.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/mbcs.py +0 -47
- package/python3.6.2/lib/python3.6/encodings/oem.py +0 -41
- package/python3.6.2/lib/python3.6/encodings/palmos.py +0 -308
- package/python3.6.2/lib/python3.6/encodings/ptcp154.py +0 -312
- package/python3.6.2/lib/python3.6/encodings/punycode.py +0 -237
- package/python3.6.2/lib/python3.6/encodings/quopri_codec.py +0 -56
- package/python3.6.2/lib/python3.6/encodings/raw_unicode_escape.py +0 -45
- package/python3.6.2/lib/python3.6/encodings/rot_13.py +0 -113
- package/python3.6.2/lib/python3.6/encodings/shift_jis.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/shift_jis_2004.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/shift_jisx0213.py +0 -39
- package/python3.6.2/lib/python3.6/encodings/tis_620.py +0 -307
- package/python3.6.2/lib/python3.6/encodings/undefined.py +0 -49
- package/python3.6.2/lib/python3.6/encodings/unicode_escape.py +0 -45
- package/python3.6.2/lib/python3.6/encodings/unicode_internal.py +0 -45
- package/python3.6.2/lib/python3.6/encodings/utf_16.py +0 -155
- package/python3.6.2/lib/python3.6/encodings/utf_16_be.py +0 -42
- package/python3.6.2/lib/python3.6/encodings/utf_16_le.py +0 -42
- package/python3.6.2/lib/python3.6/encodings/utf_32.py +0 -150
- package/python3.6.2/lib/python3.6/encodings/utf_32_be.py +0 -37
- package/python3.6.2/lib/python3.6/encodings/utf_32_le.py +0 -37
- package/python3.6.2/lib/python3.6/encodings/utf_7.py +0 -38
- package/python3.6.2/lib/python3.6/encodings/utf_8.py +0 -42
- package/python3.6.2/lib/python3.6/encodings/utf_8_sig.py +0 -130
- package/python3.6.2/lib/python3.6/encodings/uu_codec.py +0 -99
- package/python3.6.2/lib/python3.6/encodings/zlib_codec.py +0 -77
- package/python3.6.2/lib/python3.6/ensurepip/__init__.py +0 -205
- package/python3.6.2/lib/python3.6/ensurepip/__main__.py +0 -5
- package/python3.6.2/lib/python3.6/ensurepip/_uninstall.py +0 -31
- package/python3.6.2/lib/python3.6/enum.py +0 -875
- package/python3.6.2/lib/python3.6/filecmp.py +0 -305
- package/python3.6.2/lib/python3.6/fileinput.py +0 -425
- package/python3.6.2/lib/python3.6/fnmatch.py +0 -109
- package/python3.6.2/lib/python3.6/formatter.py +0 -452
- package/python3.6.2/lib/python3.6/fractions.py +0 -643
- package/python3.6.2/lib/python3.6/ftplib.py +0 -989
- package/python3.6.2/lib/python3.6/functools.py +0 -811
- package/python3.6.2/lib/python3.6/genericpath.py +0 -151
- package/python3.6.2/lib/python3.6/getopt.py +0 -215
- package/python3.6.2/lib/python3.6/getpass.py +0 -185
- package/python3.6.2/lib/python3.6/gettext.py +0 -637
- package/python3.6.2/lib/python3.6/glob.py +0 -171
- package/python3.6.2/lib/python3.6/gzip.py +0 -574
- package/python3.6.2/lib/python3.6/hashlib.py +0 -251
- package/python3.6.2/lib/python3.6/heapq.py +0 -607
- package/python3.6.2/lib/python3.6/hmac.py +0 -144
- package/python3.6.2/lib/python3.6/html/__init__.py +0 -132
- package/python3.6.2/lib/python3.6/html/entities.py +0 -2509
- package/python3.6.2/lib/python3.6/html/parser.py +0 -470
- package/python3.6.2/lib/python3.6/http/__init__.py +0 -134
- package/python3.6.2/lib/python3.6/http/client.py +0 -1478
- package/python3.6.2/lib/python3.6/http/cookiejar.py +0 -2098
- package/python3.6.2/lib/python3.6/http/cookies.py +0 -635
- package/python3.6.2/lib/python3.6/http/server.py +0 -1211
- package/python3.6.2/lib/python3.6/idlelib/CREDITS.txt +0 -37
- package/python3.6.2/lib/python3.6/idlelib/ChangeLog +0 -1591
- package/python3.6.2/lib/python3.6/idlelib/HISTORY.txt +0 -296
- package/python3.6.2/lib/python3.6/idlelib/Icons/folder.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle.icns +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle.ico +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_16.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_16.png +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_32.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_32.png +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_48.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/idle_48.png +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/minusnode.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/openfolder.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/plusnode.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/python.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/Icons/tk.gif +0 -0
- package/python3.6.2/lib/python3.6/idlelib/NEWS.txt +0 -749
- package/python3.6.2/lib/python3.6/idlelib/NEWS2x.txt +0 -660
- package/python3.6.2/lib/python3.6/idlelib/README.txt +0 -251
- package/python3.6.2/lib/python3.6/idlelib/TODO.txt +0 -210
- package/python3.6.2/lib/python3.6/idlelib/__init__.py +0 -10
- package/python3.6.2/lib/python3.6/idlelib/__main__.py +0 -8
- package/python3.6.2/lib/python3.6/idlelib/_pyclbr.py +0 -402
- package/python3.6.2/lib/python3.6/idlelib/autocomplete.py +0 -232
- package/python3.6.2/lib/python3.6/idlelib/autocomplete_w.py +0 -460
- package/python3.6.2/lib/python3.6/idlelib/autoexpand.py +0 -96
- package/python3.6.2/lib/python3.6/idlelib/browser.py +0 -248
- package/python3.6.2/lib/python3.6/idlelib/calltip_w.py +0 -164
- package/python3.6.2/lib/python3.6/idlelib/calltips.py +0 -178
- package/python3.6.2/lib/python3.6/idlelib/codecontext.py +0 -185
- package/python3.6.2/lib/python3.6/idlelib/colorizer.py +0 -289
- package/python3.6.2/lib/python3.6/idlelib/config-extensions.def +0 -65
- package/python3.6.2/lib/python3.6/idlelib/config-highlight.def +0 -93
- package/python3.6.2/lib/python3.6/idlelib/config-keys.def +0 -304
- package/python3.6.2/lib/python3.6/idlelib/config-main.def +0 -88
- package/python3.6.2/lib/python3.6/idlelib/config.py +0 -929
- package/python3.6.2/lib/python3.6/idlelib/config_key.py +0 -298
- package/python3.6.2/lib/python3.6/idlelib/configdialog.py +0 -2254
- package/python3.6.2/lib/python3.6/idlelib/debugger.py +0 -544
- package/python3.6.2/lib/python3.6/idlelib/debugger_r.py +0 -388
- package/python3.6.2/lib/python3.6/idlelib/debugobj.py +0 -139
- package/python3.6.2/lib/python3.6/idlelib/debugobj_r.py +0 -36
- package/python3.6.2/lib/python3.6/idlelib/delegator.py +0 -33
- package/python3.6.2/lib/python3.6/idlelib/dynoption.py +0 -58
- package/python3.6.2/lib/python3.6/idlelib/editor.py +0 -1688
- package/python3.6.2/lib/python3.6/idlelib/extend.txt +0 -83
- package/python3.6.2/lib/python3.6/idlelib/filelist.py +0 -132
- package/python3.6.2/lib/python3.6/idlelib/grep.py +0 -200
- package/python3.6.2/lib/python3.6/idlelib/help.html +0 -791
- package/python3.6.2/lib/python3.6/idlelib/help.py +0 -275
- package/python3.6.2/lib/python3.6/idlelib/help_about.py +0 -205
- package/python3.6.2/lib/python3.6/idlelib/history.py +0 -106
- package/python3.6.2/lib/python3.6/idlelib/hyperparser.py +0 -312
- package/python3.6.2/lib/python3.6/idlelib/idle.bat +0 -4
- package/python3.6.2/lib/python3.6/idlelib/idle.py +0 -14
- package/python3.6.2/lib/python3.6/idlelib/idle.pyw +0 -17
- package/python3.6.2/lib/python3.6/idlelib/idle_test/README.txt +0 -226
- package/python3.6.2/lib/python3.6/idlelib/idle_test/__init__.py +0 -17
- package/python3.6.2/lib/python3.6/idlelib/idle_test/htest.py +0 -421
- package/python3.6.2/lib/python3.6/idlelib/idle_test/mock_idle.py +0 -60
- package/python3.6.2/lib/python3.6/idlelib/idle_test/mock_tk.py +0 -303
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_autocomplete.py +0 -149
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_autoexpand.py +0 -143
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_browser.py +0 -253
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_calltips.py +0 -203
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_colorizer.py +0 -56
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_config.py +0 -824
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_config_key.py +0 -102
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_configdialog.py +0 -1415
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_debugger.py +0 -29
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_delegator.py +0 -40
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_editmenu.py +0 -74
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_editor.py +0 -14
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_grep.py +0 -80
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_help.py +0 -34
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_help_about.py +0 -177
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_history.py +0 -168
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_hyperparser.py +0 -274
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_iomenu.py +0 -234
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_macosx.py +0 -106
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_outwin.py +0 -172
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_paragraph.py +0 -376
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_parenmatch.py +0 -112
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_pathbrowser.py +0 -88
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_percolator.py +0 -118
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_query.py +0 -354
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_redirector.py +0 -124
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_replace.py +0 -293
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_rstrip.py +0 -49
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_run.py +0 -35
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_scrolledlist.py +0 -29
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_search.py +0 -82
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_searchbase.py +0 -156
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_searchengine.py +0 -329
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_text.py +0 -236
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_textview.py +0 -179
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_tree.py +0 -35
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_undo.py +0 -135
- package/python3.6.2/lib/python3.6/idlelib/idle_test/test_warning.py +0 -73
- package/python3.6.2/lib/python3.6/idlelib/iomenu.py +0 -574
- package/python3.6.2/lib/python3.6/idlelib/macosx.py +0 -252
- package/python3.6.2/lib/python3.6/idlelib/mainmenu.py +0 -108
- package/python3.6.2/lib/python3.6/idlelib/multicall.py +0 -445
- package/python3.6.2/lib/python3.6/idlelib/outwin.py +0 -188
- package/python3.6.2/lib/python3.6/idlelib/paragraph.py +0 -195
- package/python3.6.2/lib/python3.6/idlelib/parenmatch.py +0 -183
- package/python3.6.2/lib/python3.6/idlelib/pathbrowser.py +0 -111
- package/python3.6.2/lib/python3.6/idlelib/percolator.py +0 -104
- package/python3.6.2/lib/python3.6/idlelib/pyparse.py +0 -617
- package/python3.6.2/lib/python3.6/idlelib/pyshell.py +0 -1542
- package/python3.6.2/lib/python3.6/idlelib/query.py +0 -308
- package/python3.6.2/lib/python3.6/idlelib/redirector.py +0 -175
- package/python3.6.2/lib/python3.6/idlelib/replace.py +0 -243
- package/python3.6.2/lib/python3.6/idlelib/rpc.py +0 -627
- package/python3.6.2/lib/python3.6/idlelib/rstrip.py +0 -29
- package/python3.6.2/lib/python3.6/idlelib/run.py +0 -525
- package/python3.6.2/lib/python3.6/idlelib/runscript.py +0 -195
- package/python3.6.2/lib/python3.6/idlelib/scrolledlist.py +0 -147
- package/python3.6.2/lib/python3.6/idlelib/search.py +0 -102
- package/python3.6.2/lib/python3.6/idlelib/searchbase.py +0 -200
- package/python3.6.2/lib/python3.6/idlelib/searchengine.py +0 -236
- package/python3.6.2/lib/python3.6/idlelib/stackviewer.py +0 -152
- package/python3.6.2/lib/python3.6/idlelib/statusbar.py +0 -46
- package/python3.6.2/lib/python3.6/idlelib/textview.py +0 -136
- package/python3.6.2/lib/python3.6/idlelib/tooltip.py +0 -96
- package/python3.6.2/lib/python3.6/idlelib/tree.py +0 -467
- package/python3.6.2/lib/python3.6/idlelib/undo.py +0 -366
- package/python3.6.2/lib/python3.6/idlelib/windows.py +0 -92
- package/python3.6.2/lib/python3.6/idlelib/zoomheight.py +0 -48
- package/python3.6.2/lib/python3.6/idlelib/zzdummy.py +0 -42
- package/python3.6.2/lib/python3.6/imaplib.py +0 -1609
- package/python3.6.2/lib/python3.6/imghdr.py +0 -168
- package/python3.6.2/lib/python3.6/imp.py +0 -346
- package/python3.6.2/lib/python3.6/importlib/__init__.py +0 -173
- package/python3.6.2/lib/python3.6/importlib/_bootstrap.py +0 -1161
- package/python3.6.2/lib/python3.6/importlib/_bootstrap_external.py +0 -1443
- package/python3.6.2/lib/python3.6/importlib/abc.py +0 -329
- package/python3.6.2/lib/python3.6/importlib/machinery.py +0 -21
- package/python3.6.2/lib/python3.6/importlib/util.py +0 -288
- package/python3.6.2/lib/python3.6/inspect.py +0 -3098
- package/python3.6.2/lib/python3.6/io.py +0 -99
- package/python3.6.2/lib/python3.6/ipaddress.py +0 -2299
- package/python3.6.2/lib/python3.6/json/__init__.py +0 -367
- package/python3.6.2/lib/python3.6/json/decoder.py +0 -358
- package/python3.6.2/lib/python3.6/json/encoder.py +0 -441
- package/python3.6.2/lib/python3.6/json/scanner.py +0 -73
- package/python3.6.2/lib/python3.6/json/tool.py +0 -50
- package/python3.6.2/lib/python3.6/keyword.py +0 -94
- package/python3.6.2/lib/python3.6/lib-dynload/_asyncio.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_bisect.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_blake2.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_bz2.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_cn.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_hk.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_iso2022.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_jp.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_kr.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_codecs_tw.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_crypt.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_csv.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_ctypes.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_ctypes_test.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_curses.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_curses_panel.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_datetime.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_elementtree.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_hashlib.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_heapq.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_json.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_lsprof.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_md5.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_multibytecodec.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_multiprocessing.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_opcode.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_pickle.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_random.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sha1.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sha256.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sha3.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sha512.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_socket.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sqlite3.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_ssl.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_struct.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_sysconfigdata_m_linux_arm-linux-androideabi.py +0 -743
- package/python3.6.2/lib/python3.6/lib-dynload/_testbuffer.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_testcapi.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_testimportmultiple.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/_testmultiphase.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/array.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/audioop.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/binascii.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/cmath.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/fcntl.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/grp.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/math.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/mmap.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/ossaudiodev.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/parser.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/pyexpat.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/readline.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/resource.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/select.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/syslog.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/termios.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/unicodedata.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/xxlimited.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib-dynload/zlib.cpython-36m-arm-linux-androideabi.so +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/__init__.py +0 -1
- package/python3.6.2/lib/python3.6/lib2to3/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/lib2to3/btm_matcher.py +0 -168
- package/python3.6.2/lib/python3.6/lib2to3/btm_utils.py +0 -281
- package/python3.6.2/lib/python3.6/lib2to3/fixer_base.py +0 -186
- package/python3.6.2/lib/python3.6/lib2to3/fixer_util.py +0 -453
- package/python3.6.2/lib/python3.6/lib2to3/fixes/__init__.py +0 -1
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_apply.py +0 -70
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_asserts.py +0 -34
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_basestring.py +0 -14
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_buffer.py +0 -22
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_dict.py +0 -106
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_except.py +0 -93
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_exec.py +0 -39
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_execfile.py +0 -52
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_exitfunc.py +0 -72
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_filter.py +0 -90
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_funcattrs.py +0 -21
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_future.py +0 -22
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_getcwdu.py +0 -19
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_has_key.py +0 -109
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_idioms.py +0 -152
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_import.py +0 -99
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_imports.py +0 -145
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_imports2.py +0 -16
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_input.py +0 -26
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_intern.py +0 -41
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_isinstance.py +0 -52
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_itertools.py +0 -43
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_itertools_imports.py +0 -57
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_long.py +0 -19
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_map.py +0 -110
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_metaclass.py +0 -228
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_methodattrs.py +0 -24
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_ne.py +0 -23
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_next.py +0 -103
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_nonzero.py +0 -21
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_numliterals.py +0 -28
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_operator.py +0 -98
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_paren.py +0 -44
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_print.py +0 -87
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_raise.py +0 -90
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_raw_input.py +0 -17
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_reduce.py +0 -35
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_reload.py +0 -38
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_renames.py +0 -70
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_repr.py +0 -23
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_set_literal.py +0 -53
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_standarderror.py +0 -18
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_sys_exc.py +0 -30
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_throw.py +0 -56
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_tuple_params.py +0 -175
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_types.py +0 -61
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_unicode.py +0 -42
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_urllib.py +0 -196
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_ws_comma.py +0 -39
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_xrange.py +0 -73
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_xreadlines.py +0 -25
- package/python3.6.2/lib/python3.6/lib2to3/fixes/fix_zip.py +0 -46
- package/python3.6.2/lib/python3.6/lib2to3/main.py +0 -268
- package/python3.6.2/lib/python3.6/lib2to3/patcomp.py +0 -205
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/__init__.py +0 -4
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/conv.py +0 -257
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/driver.py +0 -160
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/grammar.py +0 -207
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/literals.py +0 -60
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/parse.py +0 -201
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/pgen.py +0 -386
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/token.py +0 -85
- package/python3.6.2/lib/python3.6/lib2to3/pgen2/tokenize.py +0 -590
- package/python3.6.2/lib/python3.6/lib2to3/pygram.py +0 -40
- package/python3.6.2/lib/python3.6/lib2to3/pytree.py +0 -854
- package/python3.6.2/lib/python3.6/lib2to3/refactor.py +0 -744
- package/python3.6.2/lib/python3.6/lib2to3/tests/__init__.py +0 -9
- package/python3.6.2/lib/python3.6/lib2to3/tests/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/README +0 -6
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/bom.py +0 -2
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/crlf.py +0 -3
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/different_encoding.py +0 -6
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/false_encoding.py +0 -2
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/bad_order.py +0 -5
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_explicit.py +0 -6
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_first.py +0 -6
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_last.py +0 -7
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_parrot.py +0 -13
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_preorder.py +0 -6
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/no_fixer_cls.py +0 -1
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/fixers/parrot_example.py +0 -2
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/infinite_recursion.py +0 -2669
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/py2_test_grammar.py +0 -974
- package/python3.6.2/lib/python3.6/lib2to3/tests/data/py3_test_grammar.py +0 -945
- package/python3.6.2/lib/python3.6/lib2to3/tests/pytree_idempotency.py +0 -94
- package/python3.6.2/lib/python3.6/lib2to3/tests/support.py +0 -52
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_all_fixers.py +0 -27
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_fixers.py +0 -4640
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_main.py +0 -139
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_parser.py +0 -472
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_pytree.py +0 -472
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_refactor.py +0 -316
- package/python3.6.2/lib/python3.6/lib2to3/tests/test_util.py +0 -591
- package/python3.6.2/lib/python3.6/linecache.py +0 -177
- package/python3.6.2/lib/python3.6/locale.py +0 -1684
- package/python3.6.2/lib/python3.6/logging/__init__.py +0 -2019
- package/python3.6.2/lib/python3.6/logging/config.py +0 -933
- package/python3.6.2/lib/python3.6/logging/handlers.py +0 -1505
- package/python3.6.2/lib/python3.6/lzma.py +0 -347
- package/python3.6.2/lib/python3.6/macpath.py +0 -211
- package/python3.6.2/lib/python3.6/macurl2path.py +0 -77
- package/python3.6.2/lib/python3.6/mailbox.py +0 -2146
- package/python3.6.2/lib/python3.6/mailcap.py +0 -275
- package/python3.6.2/lib/python3.6/mimetypes.py +0 -598
- package/python3.6.2/lib/python3.6/modulefinder.py +0 -633
- package/python3.6.2/lib/python3.6/msilib/__init__.py +0 -483
- package/python3.6.2/lib/python3.6/msilib/schema.py +0 -1007
- package/python3.6.2/lib/python3.6/msilib/sequence.py +0 -126
- package/python3.6.2/lib/python3.6/msilib/text.py +0 -129
- package/python3.6.2/lib/python3.6/multiprocessing/__init__.py +0 -38
- package/python3.6.2/lib/python3.6/multiprocessing/connection.py +0 -953
- package/python3.6.2/lib/python3.6/multiprocessing/context.py +0 -357
- package/python3.6.2/lib/python3.6/multiprocessing/dummy/__init__.py +0 -119
- package/python3.6.2/lib/python3.6/multiprocessing/dummy/connection.py +0 -73
- package/python3.6.2/lib/python3.6/multiprocessing/forkserver.py +0 -266
- package/python3.6.2/lib/python3.6/multiprocessing/heap.py +0 -254
- package/python3.6.2/lib/python3.6/multiprocessing/managers.py +0 -1160
- package/python3.6.2/lib/python3.6/multiprocessing/pool.py +0 -803
- package/python3.6.2/lib/python3.6/multiprocessing/popen_fork.py +0 -86
- package/python3.6.2/lib/python3.6/multiprocessing/popen_forkserver.py +0 -68
- package/python3.6.2/lib/python3.6/multiprocessing/popen_spawn_posix.py +0 -68
- package/python3.6.2/lib/python3.6/multiprocessing/popen_spawn_win32.py +0 -98
- package/python3.6.2/lib/python3.6/multiprocessing/process.py +0 -336
- package/python3.6.2/lib/python3.6/multiprocessing/queues.py +0 -347
- package/python3.6.2/lib/python3.6/multiprocessing/reduction.py +0 -274
- package/python3.6.2/lib/python3.6/multiprocessing/resource_sharer.py +0 -158
- package/python3.6.2/lib/python3.6/multiprocessing/semaphore_tracker.py +0 -157
- package/python3.6.2/lib/python3.6/multiprocessing/sharedctypes.py +0 -239
- package/python3.6.2/lib/python3.6/multiprocessing/spawn.py +0 -286
- package/python3.6.2/lib/python3.6/multiprocessing/synchronize.py +0 -406
- package/python3.6.2/lib/python3.6/multiprocessing/util.py +0 -406
- package/python3.6.2/lib/python3.6/netrc.py +0 -142
- package/python3.6.2/lib/python3.6/nntplib.py +0 -1147
- package/python3.6.2/lib/python3.6/ntpath.py +0 -692
- package/python3.6.2/lib/python3.6/nturl2path.py +0 -68
- package/python3.6.2/lib/python3.6/numbers.py +0 -389
- package/python3.6.2/lib/python3.6/opcode.py +0 -215
- package/python3.6.2/lib/python3.6/operator.py +0 -464
- package/python3.6.2/lib/python3.6/optparse.py +0 -1681
- package/python3.6.2/lib/python3.6/os.py +0 -1069
- package/python3.6.2/lib/python3.6/pathlib.py +0 -1434
- package/python3.6.2/lib/python3.6/pdb.py +0 -1694
- package/python3.6.2/lib/python3.6/pickle.py +0 -1605
- package/python3.6.2/lib/python3.6/pickletools.py +0 -2840
- package/python3.6.2/lib/python3.6/pipes.py +0 -247
- package/python3.6.2/lib/python3.6/pkgutil.py +0 -634
- package/python3.6.2/lib/python3.6/platform.py +0 -1400
- package/python3.6.2/lib/python3.6/plistlib.py +0 -1043
- package/python3.6.2/lib/python3.6/poplib.py +0 -478
- package/python3.6.2/lib/python3.6/posixpath.py +0 -520
- package/python3.6.2/lib/python3.6/pprint.py +0 -597
- package/python3.6.2/lib/python3.6/profile.py +0 -589
- package/python3.6.2/lib/python3.6/pstats.py +0 -697
- package/python3.6.2/lib/python3.6/pty.py +0 -170
- package/python3.6.2/lib/python3.6/py_compile.py +0 -186
- package/python3.6.2/lib/python3.6/pyclbr.py +0 -352
- package/python3.6.2/lib/python3.6/pydoc.py +0 -2663
- package/python3.6.2/lib/python3.6/pydoc_data/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/pydoc_data/topics.py +0 -12951
- package/python3.6.2/lib/python3.6/queue.py +0 -246
- package/python3.6.2/lib/python3.6/quopri.py +0 -242
- package/python3.6.2/lib/python3.6/random.py +0 -768
- package/python3.6.2/lib/python3.6/re.py +0 -381
- package/python3.6.2/lib/python3.6/reprlib.py +0 -164
- package/python3.6.2/lib/python3.6/rlcompleter.py +0 -205
- package/python3.6.2/lib/python3.6/runpy.py +0 -294
- package/python3.6.2/lib/python3.6/sched.py +0 -170
- package/python3.6.2/lib/python3.6/secrets.py +0 -73
- package/python3.6.2/lib/python3.6/selectors.py +0 -611
- package/python3.6.2/lib/python3.6/shelve.py +0 -243
- package/python3.6.2/lib/python3.6/shlex.py +0 -335
- package/python3.6.2/lib/python3.6/shutil.py +0 -1153
- package/python3.6.2/lib/python3.6/signal.py +0 -79
- package/python3.6.2/lib/python3.6/site.py +0 -598
- package/python3.6.2/lib/python3.6/smtpd.py +0 -965
- package/python3.6.2/lib/python3.6/smtplib.py +0 -1115
- package/python3.6.2/lib/python3.6/sndhdr.py +0 -257
- package/python3.6.2/lib/python3.6/socket.py +0 -750
- package/python3.6.2/lib/python3.6/socketserver.py +0 -793
- package/python3.6.2/lib/python3.6/sqlite3/__init__.py +0 -23
- package/python3.6.2/lib/python3.6/sqlite3/dbapi2.py +0 -89
- package/python3.6.2/lib/python3.6/sqlite3/dump.py +0 -70
- package/python3.6.2/lib/python3.6/sqlite3/test/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/sqlite3/test/dbapi.py +0 -938
- package/python3.6.2/lib/python3.6/sqlite3/test/dump.py +0 -81
- package/python3.6.2/lib/python3.6/sqlite3/test/factory.py +0 -293
- package/python3.6.2/lib/python3.6/sqlite3/test/hooks.py +0 -264
- package/python3.6.2/lib/python3.6/sqlite3/test/regression.py +0 -410
- package/python3.6.2/lib/python3.6/sqlite3/test/transactions.py +0 -214
- package/python3.6.2/lib/python3.6/sqlite3/test/types.py +0 -421
- package/python3.6.2/lib/python3.6/sqlite3/test/userfunctions.py +0 -473
- package/python3.6.2/lib/python3.6/sre_compile.py +0 -580
- package/python3.6.2/lib/python3.6/sre_constants.py +0 -233
- package/python3.6.2/lib/python3.6/sre_parse.py +0 -973
- package/python3.6.2/lib/python3.6/ssl.py +0 -1228
- package/python3.6.2/lib/python3.6/stat.py +0 -178
- package/python3.6.2/lib/python3.6/statistics.py +0 -670
- package/python3.6.2/lib/python3.6/string.py +0 -309
- package/python3.6.2/lib/python3.6/stringprep.py +0 -272
- package/python3.6.2/lib/python3.6/struct.py +0 -15
- package/python3.6.2/lib/python3.6/subprocess.py +0 -1590
- package/python3.6.2/lib/python3.6/sunau.py +0 -525
- package/python3.6.2/lib/python3.6/symbol.py +0 -115
- package/python3.6.2/lib/python3.6/symtable.py +0 -238
- package/python3.6.2/lib/python3.6/sysconfig.py +0 -721
- package/python3.6.2/lib/python3.6/tabnanny.py +0 -332
- package/python3.6.2/lib/python3.6/tarfile.py +0 -2547
- package/python3.6.2/lib/python3.6/telnetlib.py +0 -675
- package/python3.6.2/lib/python3.6/tempfile.py +0 -811
- package/python3.6.2/lib/python3.6/test/Sine-1000Hz-300ms.aif +0 -0
- package/python3.6.2/lib/python3.6/test/__init__.py +0 -1
- package/python3.6.2/lib/python3.6/test/__main__.py +0 -2
- package/python3.6.2/lib/python3.6/test/_test_multiprocessing.py +0 -4458
- package/python3.6.2/lib/python3.6/test/allsans.pem +0 -37
- package/python3.6.2/lib/python3.6/test/ann_module.py +0 -53
- package/python3.6.2/lib/python3.6/test/ann_module2.py +0 -36
- package/python3.6.2/lib/python3.6/test/ann_module3.py +0 -18
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-alaw.aifc +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm16.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm16.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm16.wav +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm24.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm24.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm24.wav +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm32.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm32.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm32.wav +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm8.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm8.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-pcm8.wav +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-ulaw.aifc +0 -0
- package/python3.6.2/lib/python3.6/test/audiodata/pluck-ulaw.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiotest.au +0 -0
- package/python3.6.2/lib/python3.6/test/audiotests.py +0 -329
- package/python3.6.2/lib/python3.6/test/autotest.py +0 -5
- package/python3.6.2/lib/python3.6/test/bad_coding.py +0 -1
- package/python3.6.2/lib/python3.6/test/bad_coding2.py +0 -2
- package/python3.6.2/lib/python3.6/test/badcert.pem +0 -36
- package/python3.6.2/lib/python3.6/test/badkey.pem +0 -40
- package/python3.6.2/lib/python3.6/test/badsyntax_3131.py +0 -2
- package/python3.6.2/lib/python3.6/test/badsyntax_future10.py +0 -3
- package/python3.6.2/lib/python3.6/test/badsyntax_future3.py +0 -10
- package/python3.6.2/lib/python3.6/test/badsyntax_future4.py +0 -10
- package/python3.6.2/lib/python3.6/test/badsyntax_future5.py +0 -12
- package/python3.6.2/lib/python3.6/test/badsyntax_future6.py +0 -10
- package/python3.6.2/lib/python3.6/test/badsyntax_future7.py +0 -11
- package/python3.6.2/lib/python3.6/test/badsyntax_future8.py +0 -10
- package/python3.6.2/lib/python3.6/test/badsyntax_future9.py +0 -10
- package/python3.6.2/lib/python3.6/test/badsyntax_pep3120.py +0 -1
- package/python3.6.2/lib/python3.6/test/bisect.py +0 -167
- package/python3.6.2/lib/python3.6/test/bytecode_helper.py +0 -41
- package/python3.6.2/lib/python3.6/test/capath/4e1295a3.0 +0 -14
- package/python3.6.2/lib/python3.6/test/capath/5ed36f99.0 +0 -41
- package/python3.6.2/lib/python3.6/test/capath/6e88d7b8.0 +0 -14
- package/python3.6.2/lib/python3.6/test/capath/99d0fa06.0 +0 -41
- package/python3.6.2/lib/python3.6/test/capath/b1930218.0 +0 -21
- package/python3.6.2/lib/python3.6/test/capath/ceff1710.0 +0 -21
- package/python3.6.2/lib/python3.6/test/cfgparser.1 +0 -3
- package/python3.6.2/lib/python3.6/test/cfgparser.2 +0 -537
- package/python3.6.2/lib/python3.6/test/cfgparser.3 +0 -69
- package/python3.6.2/lib/python3.6/test/cjkencodings/big5-utf8.txt +0 -9
- package/python3.6.2/lib/python3.6/test/cjkencodings/big5.txt +0 -9
- package/python3.6.2/lib/python3.6/test/cjkencodings/big5hkscs-utf8.txt +0 -2
- package/python3.6.2/lib/python3.6/test/cjkencodings/big5hkscs.txt +0 -2
- package/python3.6.2/lib/python3.6/test/cjkencodings/cp949-utf8.txt +0 -9
- package/python3.6.2/lib/python3.6/test/cjkencodings/cp949.txt +0 -9
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_jisx0213-utf8.txt +0 -8
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_jisx0213.txt +0 -8
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_jp-utf8.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_jp.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_kr-utf8.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/euc_kr.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/gb18030-utf8.txt +0 -15
- package/python3.6.2/lib/python3.6/test/cjkencodings/gb18030.txt +0 -15
- package/python3.6.2/lib/python3.6/test/cjkencodings/gb2312-utf8.txt +0 -6
- package/python3.6.2/lib/python3.6/test/cjkencodings/gb2312.txt +0 -6
- package/python3.6.2/lib/python3.6/test/cjkencodings/gbk-utf8.txt +0 -14
- package/python3.6.2/lib/python3.6/test/cjkencodings/gbk.txt +0 -14
- package/python3.6.2/lib/python3.6/test/cjkencodings/hz-utf8.txt +0 -2
- package/python3.6.2/lib/python3.6/test/cjkencodings/hz.txt +0 -2
- package/python3.6.2/lib/python3.6/test/cjkencodings/iso2022_jp-utf8.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/iso2022_jp.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/iso2022_kr-utf8.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/iso2022_kr.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/johab-utf8.txt +0 -9
- package/python3.6.2/lib/python3.6/test/cjkencodings/johab.txt +0 -9
- package/python3.6.2/lib/python3.6/test/cjkencodings/shift_jis-utf8.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/shift_jis.txt +0 -7
- package/python3.6.2/lib/python3.6/test/cjkencodings/shift_jisx0213-utf8.txt +0 -8
- package/python3.6.2/lib/python3.6/test/cjkencodings/shift_jisx0213.txt +0 -8
- package/python3.6.2/lib/python3.6/test/cmath_testcases.txt +0 -2511
- package/python3.6.2/lib/python3.6/test/coding20731.py +0 -4
- package/python3.6.2/lib/python3.6/test/crashers/README +0 -20
- package/python3.6.2/lib/python3.6/test/crashers/bogus_code_obj.py +0 -19
- package/python3.6.2/lib/python3.6/test/crashers/gc_inspection.py +0 -32
- package/python3.6.2/lib/python3.6/test/crashers/infinite_loop_re.py +0 -16
- package/python3.6.2/lib/python3.6/test/crashers/mutation_inside_cyclegc.py +0 -31
- package/python3.6.2/lib/python3.6/test/crashers/recursive_call.py +0 -15
- package/python3.6.2/lib/python3.6/test/crashers/trace_at_recursion_limit.py +0 -27
- package/python3.6.2/lib/python3.6/test/crashers/underlying_dict.py +0 -20
- package/python3.6.2/lib/python3.6/test/curses_tests.py +0 -46
- package/python3.6.2/lib/python3.6/test/data/README +0 -2
- package/python3.6.2/lib/python3.6/test/datetimetester.py +0 -4929
- package/python3.6.2/lib/python3.6/test/decimaltestdata/abs.decTest +0 -161
- package/python3.6.2/lib/python3.6/test/decimaltestdata/add.decTest +0 -2716
- package/python3.6.2/lib/python3.6/test/decimaltestdata/and.decTest +0 -338
- package/python3.6.2/lib/python3.6/test/decimaltestdata/base.decTest +0 -1411
- package/python3.6.2/lib/python3.6/test/decimaltestdata/clamp.decTest +0 -211
- package/python3.6.2/lib/python3.6/test/decimaltestdata/class.decTest +0 -131
- package/python3.6.2/lib/python3.6/test/decimaltestdata/compare.decTest +0 -758
- package/python3.6.2/lib/python3.6/test/decimaltestdata/comparetotal.decTest +0 -798
- package/python3.6.2/lib/python3.6/test/decimaltestdata/comparetotmag.decTest +0 -790
- package/python3.6.2/lib/python3.6/test/decimaltestdata/copy.decTest +0 -86
- package/python3.6.2/lib/python3.6/test/decimaltestdata/copyabs.decTest +0 -86
- package/python3.6.2/lib/python3.6/test/decimaltestdata/copynegate.decTest +0 -86
- package/python3.6.2/lib/python3.6/test/decimaltestdata/copysign.decTest +0 -177
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddAbs.decTest +0 -126
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddAdd.decTest +0 -1328
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddAnd.decTest +0 -347
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddBase.decTest +0 -1104
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCanonical.decTest +0 -357
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddClass.decTest +0 -76
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCompare.decTest +0 -744
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCompareSig.decTest +0 -647
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCompareTotal.decTest +0 -706
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCompareTotalMag.decTest +0 -706
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCopy.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCopyAbs.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCopyNegate.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddCopySign.decTest +0 -175
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddDivide.decTest +0 -863
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddDivideInt.decTest +0 -449
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddEncode.decTest +0 -495
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddFMA.decTest +0 -1698
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddInvert.decTest +0 -202
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddLogB.decTest +0 -159
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMax.decTest +0 -322
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMaxMag.decTest +0 -304
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMin.decTest +0 -309
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMinMag.decTest +0 -293
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMinus.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddMultiply.decTest +0 -553
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddNextMinus.decTest +0 -126
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddNextPlus.decTest +0 -124
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddNextToward.decTest +0 -374
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddOr.decTest +0 -292
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddPlus.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddQuantize.decTest +0 -833
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddReduce.decTest +0 -182
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddRemainder.decTest +0 -600
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddRemainderNear.decTest +0 -629
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddRotate.decTest +0 -262
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddSameQuantum.decTest +0 -389
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddScaleB.decTest +0 -243
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddShift.decTest +0 -262
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddSubtract.decTest +0 -629
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddToIntegral.decTest +0 -257
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ddXor.decTest +0 -337
- package/python3.6.2/lib/python3.6/test/decimaltestdata/decDouble.decTest +0 -65
- package/python3.6.2/lib/python3.6/test/decimaltestdata/decQuad.decTest +0 -65
- package/python3.6.2/lib/python3.6/test/decimaltestdata/decSingle.decTest +0 -25
- package/python3.6.2/lib/python3.6/test/decimaltestdata/divide.decTest +0 -854
- package/python3.6.2/lib/python3.6/test/decimaltestdata/divideint.decTest +0 -486
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqAbs.decTest +0 -126
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqAdd.decTest +0 -1215
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqAnd.decTest +0 -420
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqBase.decTest +0 -1081
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCanonical.decTest +0 -372
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqClass.decTest +0 -77
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCompare.decTest +0 -753
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCompareSig.decTest +0 -647
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCompareTotal.decTest +0 -706
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCompareTotalMag.decTest +0 -706
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCopy.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCopyAbs.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCopyNegate.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqCopySign.decTest +0 -175
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqDivide.decTest +0 -808
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqDivideInt.decTest +0 -453
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqEncode.decTest +0 -477
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqFMA.decTest +0 -1786
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqInvert.decTest +0 -245
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqLogB.decTest +0 -160
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMax.decTest +0 -322
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMaxMag.decTest +0 -304
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMin.decTest +0 -309
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMinMag.decTest +0 -293
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMinus.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqMultiply.decTest +0 -589
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqNextMinus.decTest +0 -126
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqNextPlus.decTest +0 -124
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqNextToward.decTest +0 -375
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqOr.decTest +0 -401
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqPlus.decTest +0 -88
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqQuantize.decTest +0 -836
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqReduce.decTest +0 -183
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqRemainder.decTest +0 -597
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqRemainderNear.decTest +0 -631
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqRotate.decTest +0 -298
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqSameQuantum.decTest +0 -389
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqScaleB.decTest +0 -260
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqShift.decTest +0 -298
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqSubtract.decTest +0 -635
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqToIntegral.decTest +0 -257
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dqXor.decTest +0 -410
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dsBase.decTest +0 -1062
- package/python3.6.2/lib/python3.6/test/decimaltestdata/dsEncode.decTest +0 -372
- package/python3.6.2/lib/python3.6/test/decimaltestdata/exp.decTest +0 -674
- package/python3.6.2/lib/python3.6/test/decimaltestdata/extra.decTest +0 -2830
- package/python3.6.2/lib/python3.6/test/decimaltestdata/fma.decTest +0 -3426
- package/python3.6.2/lib/python3.6/test/decimaltestdata/inexact.decTest +0 -215
- package/python3.6.2/lib/python3.6/test/decimaltestdata/invert.decTest +0 -176
- package/python3.6.2/lib/python3.6/test/decimaltestdata/ln.decTest +0 -611
- package/python3.6.2/lib/python3.6/test/decimaltestdata/log10.decTest +0 -551
- package/python3.6.2/lib/python3.6/test/decimaltestdata/logb.decTest +0 -188
- package/python3.6.2/lib/python3.6/test/decimaltestdata/max.decTest +0 -424
- package/python3.6.2/lib/python3.6/test/decimaltestdata/maxmag.decTest +0 -404
- package/python3.6.2/lib/python3.6/test/decimaltestdata/min.decTest +0 -407
- package/python3.6.2/lib/python3.6/test/decimaltestdata/minmag.decTest +0 -390
- package/python3.6.2/lib/python3.6/test/decimaltestdata/minus.decTest +0 -182
- package/python3.6.2/lib/python3.6/test/decimaltestdata/multiply.decTest +0 -731
- package/python3.6.2/lib/python3.6/test/decimaltestdata/nextminus.decTest +0 -148
- package/python3.6.2/lib/python3.6/test/decimaltestdata/nextplus.decTest +0 -150
- package/python3.6.2/lib/python3.6/test/decimaltestdata/nexttoward.decTest +0 -426
- package/python3.6.2/lib/python3.6/test/decimaltestdata/or.decTest +0 -334
- package/python3.6.2/lib/python3.6/test/decimaltestdata/plus.decTest +0 -195
- package/python3.6.2/lib/python3.6/test/decimaltestdata/power.decTest +0 -1624
- package/python3.6.2/lib/python3.6/test/decimaltestdata/powersqrt.decTest +0 -2970
- package/python3.6.2/lib/python3.6/test/decimaltestdata/quantize.decTest +0 -948
- package/python3.6.2/lib/python3.6/test/decimaltestdata/randomBound32.decTest +0 -2443
- package/python3.6.2/lib/python3.6/test/decimaltestdata/randoms.decTest +0 -4030
- package/python3.6.2/lib/python3.6/test/decimaltestdata/reduce.decTest +0 -234
- package/python3.6.2/lib/python3.6/test/decimaltestdata/remainder.decTest +0 -640
- package/python3.6.2/lib/python3.6/test/decimaltestdata/remainderNear.decTest +0 -572
- package/python3.6.2/lib/python3.6/test/decimaltestdata/rescale.decTest +0 -764
- package/python3.6.2/lib/python3.6/test/decimaltestdata/rotate.decTest +0 -247
- package/python3.6.2/lib/python3.6/test/decimaltestdata/rounding.decTest +0 -1303
- package/python3.6.2/lib/python3.6/test/decimaltestdata/samequantum.decTest +0 -389
- package/python3.6.2/lib/python3.6/test/decimaltestdata/scaleb.decTest +0 -209
- package/python3.6.2/lib/python3.6/test/decimaltestdata/shift.decTest +0 -250
- package/python3.6.2/lib/python3.6/test/decimaltestdata/squareroot.decTest +0 -3834
- package/python3.6.2/lib/python3.6/test/decimaltestdata/subtract.decTest +0 -873
- package/python3.6.2/lib/python3.6/test/decimaltestdata/testall.decTest +0 -87
- package/python3.6.2/lib/python3.6/test/decimaltestdata/tointegral.decTest +0 -241
- package/python3.6.2/lib/python3.6/test/decimaltestdata/tointegralx.decTest +0 -255
- package/python3.6.2/lib/python3.6/test/decimaltestdata/xor.decTest +0 -335
- package/python3.6.2/lib/python3.6/test/dh1024.pem +0 -7
- package/python3.6.2/lib/python3.6/test/dis_module.py +0 -5
- package/python3.6.2/lib/python3.6/test/doctest_aliases.py +0 -13
- package/python3.6.2/lib/python3.6/test/double_const.py +0 -30
- package/python3.6.2/lib/python3.6/test/dtracedata/assert_usable.d +0 -5
- package/python3.6.2/lib/python3.6/test/dtracedata/assert_usable.stp +0 -5
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.d +0 -31
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.d.expected +0 -18
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.py +0 -30
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.stp +0 -41
- package/python3.6.2/lib/python3.6/test/dtracedata/call_stack.stp.expected +0 -14
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.d +0 -18
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.d.expected +0 -8
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.py +0 -13
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.stp +0 -26
- package/python3.6.2/lib/python3.6/test/dtracedata/gc.stp.expected +0 -8
- package/python3.6.2/lib/python3.6/test/dtracedata/instance.py +0 -24
- package/python3.6.2/lib/python3.6/test/dtracedata/line.d +0 -7
- package/python3.6.2/lib/python3.6/test/dtracedata/line.d.expected +0 -20
- package/python3.6.2/lib/python3.6/test/dtracedata/line.py +0 -17
- package/python3.6.2/lib/python3.6/test/eintrdata/eintr_tester.py +0 -493
- package/python3.6.2/lib/python3.6/test/empty.vbs +0 -1
- package/python3.6.2/lib/python3.6/test/encoded_modules/__init__.py +0 -23
- package/python3.6.2/lib/python3.6/test/encoded_modules/module_iso_8859_1.py +0 -5
- package/python3.6.2/lib/python3.6/test/encoded_modules/module_koi8_r.py +0 -3
- package/python3.6.2/lib/python3.6/test/exception_hierarchy.txt +0 -64
- package/python3.6.2/lib/python3.6/test/final_a.py +0 -19
- package/python3.6.2/lib/python3.6/test/final_b.py +0 -19
- package/python3.6.2/lib/python3.6/test/floating_points.txt +0 -1028
- package/python3.6.2/lib/python3.6/test/fork_wait.py +0 -91
- package/python3.6.2/lib/python3.6/test/formatfloat_testcases.txt +0 -355
- package/python3.6.2/lib/python3.6/test/future_test1.py +0 -11
- package/python3.6.2/lib/python3.6/test/future_test2.py +0 -10
- package/python3.6.2/lib/python3.6/test/gdb_sample.py +0 -12
- package/python3.6.2/lib/python3.6/test/ieee754.txt +0 -185
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.bmp +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.exr +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.gif +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.jpg +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.pbm +0 -3
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.pgm +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.png +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.ppm +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.ras +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.sgi +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.tiff +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.webp +0 -0
- package/python3.6.2/lib/python3.6/test/imghdrdata/python.xbm +0 -6
- package/python3.6.2/lib/python3.6/test/imp_dummy.py +0 -3
- package/python3.6.2/lib/python3.6/test/inspect_fodder.py +0 -76
- package/python3.6.2/lib/python3.6/test/inspect_fodder2.py +0 -139
- package/python3.6.2/lib/python3.6/test/keycert.passwd.pem +0 -33
- package/python3.6.2/lib/python3.6/test/keycert.pem +0 -31
- package/python3.6.2/lib/python3.6/test/keycert2.pem +0 -31
- package/python3.6.2/lib/python3.6/test/keycert3.pem +0 -73
- package/python3.6.2/lib/python3.6/test/keycert4.pem +0 -73
- package/python3.6.2/lib/python3.6/test/leakers/README.txt +0 -32
- package/python3.6.2/lib/python3.6/test/leakers/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/test/leakers/test_ctypes.py +0 -15
- package/python3.6.2/lib/python3.6/test/leakers/test_selftype.py +0 -13
- package/python3.6.2/lib/python3.6/test/libregrtest/__init__.py +0 -5
- package/python3.6.2/lib/python3.6/test/libregrtest/cmdline.py +0 -387
- package/python3.6.2/lib/python3.6/test/libregrtest/main.py +0 -584
- package/python3.6.2/lib/python3.6/test/libregrtest/refleak.py +0 -294
- package/python3.6.2/lib/python3.6/test/libregrtest/runtest.py +0 -254
- package/python3.6.2/lib/python3.6/test/libregrtest/runtest_mp.py +0 -244
- package/python3.6.2/lib/python3.6/test/libregrtest/save_env.py +0 -284
- package/python3.6.2/lib/python3.6/test/libregrtest/setup.py +0 -140
- package/python3.6.2/lib/python3.6/test/list_tests.py +0 -618
- package/python3.6.2/lib/python3.6/test/lock_tests.py +0 -936
- package/python3.6.2/lib/python3.6/test/mailcap.txt +0 -39
- package/python3.6.2/lib/python3.6/test/make_ssl_certs.py +0 -216
- package/python3.6.2/lib/python3.6/test/mapping_tests.py +0 -657
- package/python3.6.2/lib/python3.6/test/math_testcases.txt +0 -633
- package/python3.6.2/lib/python3.6/test/memory_watchdog.py +0 -28
- package/python3.6.2/lib/python3.6/test/mime.types +0 -1445
- package/python3.6.2/lib/python3.6/test/mock_socket.py +0 -159
- package/python3.6.2/lib/python3.6/test/mod_generics_cache.py +0 -53
- package/python3.6.2/lib/python3.6/test/mp_fork_bomb.py +0 -18
- package/python3.6.2/lib/python3.6/test/mp_preload.py +0 -18
- package/python3.6.2/lib/python3.6/test/multibytecodec_support.py +0 -384
- package/python3.6.2/lib/python3.6/test/nokia.pem +0 -31
- package/python3.6.2/lib/python3.6/test/nullbytecert.pem +0 -90
- package/python3.6.2/lib/python3.6/test/nullcert.pem +0 -0
- package/python3.6.2/lib/python3.6/test/outstanding_bugs.py +0 -18
- package/python3.6.2/lib/python3.6/test/pickletester.py +0 -2922
- package/python3.6.2/lib/python3.6/test/profilee.py +0 -115
- package/python3.6.2/lib/python3.6/test/pstats.pck +0 -0
- package/python3.6.2/lib/python3.6/test/pycacert.pem +0 -78
- package/python3.6.2/lib/python3.6/test/pycakey.pem +0 -28
- package/python3.6.2/lib/python3.6/test/pyclbr_input.py +0 -33
- package/python3.6.2/lib/python3.6/test/pydoc_mod.py +0 -37
- package/python3.6.2/lib/python3.6/test/pydocfodder.py +0 -216
- package/python3.6.2/lib/python3.6/test/pystone.py +0 -277
- package/python3.6.2/lib/python3.6/test/pythoninfo.py +0 -486
- package/python3.6.2/lib/python3.6/test/randv2_32.pck +0 -633
- package/python3.6.2/lib/python3.6/test/randv2_64.pck +0 -633
- package/python3.6.2/lib/python3.6/test/randv3.pck +0 -633
- package/python3.6.2/lib/python3.6/test/re_tests.py +0 -670
- package/python3.6.2/lib/python3.6/test/regrtest.py +0 -50
- package/python3.6.2/lib/python3.6/test/relimport.py +0 -1
- package/python3.6.2/lib/python3.6/test/reperf.py +0 -23
- package/python3.6.2/lib/python3.6/test/revocation.crl +0 -11
- package/python3.6.2/lib/python3.6/test/sample_doctest.py +0 -76
- package/python3.6.2/lib/python3.6/test/sample_doctest_no_docstrings.py +0 -12
- package/python3.6.2/lib/python3.6/test/sample_doctest_no_doctests.py +0 -15
- package/python3.6.2/lib/python3.6/test/selfsigned_pythontestdotnet.pem +0 -16
- package/python3.6.2/lib/python3.6/test/seq_tests.py +0 -414
- package/python3.6.2/lib/python3.6/test/sgml_input.html +0 -212
- package/python3.6.2/lib/python3.6/test/signalinterproctester.py +0 -84
- package/python3.6.2/lib/python3.6/test/sndhdrdata/README +0 -5
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.8svx +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.aifc +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.aiff +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.au +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.hcom +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.sndt +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.voc +0 -0
- package/python3.6.2/lib/python3.6/test/sndhdrdata/sndhdr.wav +0 -0
- package/python3.6.2/lib/python3.6/test/sortperf.py +0 -169
- package/python3.6.2/lib/python3.6/test/ssl_cert.pem +0 -15
- package/python3.6.2/lib/python3.6/test/ssl_key.passwd.pem +0 -18
- package/python3.6.2/lib/python3.6/test/ssl_key.pem +0 -16
- package/python3.6.2/lib/python3.6/test/ssl_servers.py +0 -209
- package/python3.6.2/lib/python3.6/test/ssltests.py +0 -37
- package/python3.6.2/lib/python3.6/test/string_tests.py +0 -1383
- package/python3.6.2/lib/python3.6/test/subprocessdata/fd_status.py +0 -34
- package/python3.6.2/lib/python3.6/test/subprocessdata/input_reader.py +0 -7
- package/python3.6.2/lib/python3.6/test/subprocessdata/qcat.py +0 -7
- package/python3.6.2/lib/python3.6/test/subprocessdata/qgrep.py +0 -10
- package/python3.6.2/lib/python3.6/test/subprocessdata/sigchild_ignore.py +0 -15
- package/python3.6.2/lib/python3.6/test/support/__init__.py +0 -2706
- package/python3.6.2/lib/python3.6/test/support/script_helper.py +0 -259
- package/python3.6.2/lib/python3.6/test/test___all__.py +0 -109
- package/python3.6.2/lib/python3.6/test/test___future__.py +0 -61
- package/python3.6.2/lib/python3.6/test/test__locale.py +0 -193
- package/python3.6.2/lib/python3.6/test/test__opcode.py +0 -20
- package/python3.6.2/lib/python3.6/test/test__osx_support.py +0 -276
- package/python3.6.2/lib/python3.6/test/test_abc.py +0 -420
- package/python3.6.2/lib/python3.6/test/test_abstract_numbers.py +0 -44
- package/python3.6.2/lib/python3.6/test/test_aifc.py +0 -399
- package/python3.6.2/lib/python3.6/test/test_argparse.py +0 -5006
- package/python3.6.2/lib/python3.6/test/test_array.py +0 -1388
- package/python3.6.2/lib/python3.6/test/test_asdl_parser.py +0 -122
- package/python3.6.2/lib/python3.6/test/test_ast.py +0 -1170
- package/python3.6.2/lib/python3.6/test/test_asyncgen.py +0 -1044
- package/python3.6.2/lib/python3.6/test/test_asynchat.py +0 -308
- package/python3.6.2/lib/python3.6/test/test_asyncio/__init__.py +0 -10
- package/python3.6.2/lib/python3.6/test/test_asyncio/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_asyncio/echo.py +0 -8
- package/python3.6.2/lib/python3.6/test/test_asyncio/echo2.py +0 -6
- package/python3.6.2/lib/python3.6/test/test_asyncio/echo3.py +0 -11
- package/python3.6.2/lib/python3.6/test/test_asyncio/keycert3.pem +0 -73
- package/python3.6.2/lib/python3.6/test/test_asyncio/pycacert.pem +0 -78
- package/python3.6.2/lib/python3.6/test/test_asyncio/ssl_cert.pem +0 -15
- package/python3.6.2/lib/python3.6/test/test_asyncio/ssl_key.pem +0 -16
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_base_events.py +0 -1761
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_events.py +0 -2791
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_futures.py +0 -692
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_locks.py +0 -943
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_pep492.py +0 -232
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_proactor_events.py +0 -593
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_queues.py +0 -643
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_selector_events.py +0 -1833
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_sslproto.py +0 -134
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_streams.py +0 -868
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_subprocess.py +0 -532
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_tasks.py +0 -2598
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_transports.py +0 -91
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_unix_events.py +0 -1621
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_windows_events.py +0 -164
- package/python3.6.2/lib/python3.6/test/test_asyncio/test_windows_utils.py +0 -182
- package/python3.6.2/lib/python3.6/test/test_asyncore.py +0 -847
- package/python3.6.2/lib/python3.6/test/test_atexit.py +0 -192
- package/python3.6.2/lib/python3.6/test/test_audioop.py +0 -565
- package/python3.6.2/lib/python3.6/test/test_augassign.py +0 -326
- package/python3.6.2/lib/python3.6/test/test_base64.py +0 -681
- package/python3.6.2/lib/python3.6/test/test_baseexception.py +0 -183
- package/python3.6.2/lib/python3.6/test/test_bigaddrspace.py +0 -101
- package/python3.6.2/lib/python3.6/test/test_bigmem.py +0 -1256
- package/python3.6.2/lib/python3.6/test/test_binascii.py +0 -373
- package/python3.6.2/lib/python3.6/test/test_binhex.py +0 -55
- package/python3.6.2/lib/python3.6/test/test_binop.py +0 -441
- package/python3.6.2/lib/python3.6/test/test_bisect.py +0 -328
- package/python3.6.2/lib/python3.6/test/test_bool.py +0 -368
- package/python3.6.2/lib/python3.6/test/test_buffer.py +0 -4396
- package/python3.6.2/lib/python3.6/test/test_bufio.py +0 -73
- package/python3.6.2/lib/python3.6/test/test_builtin.py +0 -1851
- package/python3.6.2/lib/python3.6/test/test_bytes.py +0 -1759
- package/python3.6.2/lib/python3.6/test/test_bz2.py +0 -1002
- package/python3.6.2/lib/python3.6/test/test_calendar.py +0 -848
- package/python3.6.2/lib/python3.6/test/test_call.py +0 -302
- package/python3.6.2/lib/python3.6/test/test_capi.py +0 -753
- package/python3.6.2/lib/python3.6/test/test_cgi.py +0 -539
- package/python3.6.2/lib/python3.6/test/test_cgitb.py +0 -67
- package/python3.6.2/lib/python3.6/test/test_charmapcodec.py +0 -53
- package/python3.6.2/lib/python3.6/test/test_class.py +0 -599
- package/python3.6.2/lib/python3.6/test/test_cmath.py +0 -643
- package/python3.6.2/lib/python3.6/test/test_cmd.py +0 -243
- package/python3.6.2/lib/python3.6/test/test_cmd_line.py +0 -494
- package/python3.6.2/lib/python3.6/test/test_cmd_line_script.py +0 -648
- package/python3.6.2/lib/python3.6/test/test_code.py +0 -367
- package/python3.6.2/lib/python3.6/test/test_code_module.py +0 -154
- package/python3.6.2/lib/python3.6/test/test_codeccallbacks.py +0 -1074
- package/python3.6.2/lib/python3.6/test/test_codecencodings_cn.py +0 -96
- package/python3.6.2/lib/python3.6/test/test_codecencodings_hk.py +0 -22
- package/python3.6.2/lib/python3.6/test/test_codecencodings_iso2022.py +0 -41
- package/python3.6.2/lib/python3.6/test/test_codecencodings_jp.py +0 -126
- package/python3.6.2/lib/python3.6/test/test_codecencodings_kr.py +0 -69
- package/python3.6.2/lib/python3.6/test/test_codecencodings_tw.py +0 -22
- package/python3.6.2/lib/python3.6/test/test_codecmaps_cn.py +0 -26
- package/python3.6.2/lib/python3.6/test/test_codecmaps_hk.py +0 -15
- package/python3.6.2/lib/python3.6/test/test_codecmaps_jp.py +0 -60
- package/python3.6.2/lib/python3.6/test/test_codecmaps_kr.py +0 -37
- package/python3.6.2/lib/python3.6/test/test_codecmaps_tw.py +0 -27
- package/python3.6.2/lib/python3.6/test/test_codecs.py +0 -3272
- package/python3.6.2/lib/python3.6/test/test_codeop.py +0 -299
- package/python3.6.2/lib/python3.6/test/test_collections.py +0 -1926
- package/python3.6.2/lib/python3.6/test/test_colorsys.py +0 -100
- package/python3.6.2/lib/python3.6/test/test_compare.py +0 -124
- package/python3.6.2/lib/python3.6/test/test_compile.py +0 -720
- package/python3.6.2/lib/python3.6/test/test_compileall.py +0 -547
- package/python3.6.2/lib/python3.6/test/test_complex.py +0 -688
- package/python3.6.2/lib/python3.6/test/test_concurrent_futures.py +0 -836
- package/python3.6.2/lib/python3.6/test/test_configparser.py +0 -2096
- package/python3.6.2/lib/python3.6/test/test_contains.py +0 -114
- package/python3.6.2/lib/python3.6/test/test_contextlib.py +0 -990
- package/python3.6.2/lib/python3.6/test/test_copy.py +0 -888
- package/python3.6.2/lib/python3.6/test/test_copyreg.py +0 -126
- package/python3.6.2/lib/python3.6/test/test_coroutines.py +0 -2151
- package/python3.6.2/lib/python3.6/test/test_cprofile.py +0 -98
- package/python3.6.2/lib/python3.6/test/test_crashers.py +0 -37
- package/python3.6.2/lib/python3.6/test/test_crypt.py +0 -45
- package/python3.6.2/lib/python3.6/test/test_csv.py +0 -1175
- package/python3.6.2/lib/python3.6/test/test_ctypes.py +0 -9
- package/python3.6.2/lib/python3.6/test/test_curses.py +0 -549
- package/python3.6.2/lib/python3.6/test/test_datetime.py +0 -57
- package/python3.6.2/lib/python3.6/test/test_dbm.py +0 -192
- package/python3.6.2/lib/python3.6/test/test_dbm_dumb.py +0 -286
- package/python3.6.2/lib/python3.6/test/test_dbm_gnu.py +0 -97
- package/python3.6.2/lib/python3.6/test/test_dbm_ndbm.py +0 -52
- package/python3.6.2/lib/python3.6/test/test_decimal.py +0 -5707
- package/python3.6.2/lib/python3.6/test/test_decorators.py +0 -304
- package/python3.6.2/lib/python3.6/test/test_defaultdict.py +0 -187
- package/python3.6.2/lib/python3.6/test/test_deque.py +0 -1059
- package/python3.6.2/lib/python3.6/test/test_descr.py +0 -5452
- package/python3.6.2/lib/python3.6/test/test_descrtut.py +0 -486
- package/python3.6.2/lib/python3.6/test/test_devpoll.py +0 -145
- package/python3.6.2/lib/python3.6/test/test_dict.py +0 -1217
- package/python3.6.2/lib/python3.6/test/test_dict_version.py +0 -186
- package/python3.6.2/lib/python3.6/test/test_dictcomps.py +0 -86
- package/python3.6.2/lib/python3.6/test/test_dictviews.py +0 -272
- package/python3.6.2/lib/python3.6/test/test_difflib.py +0 -478
- package/python3.6.2/lib/python3.6/test/test_difflib_expect.html +0 -526
- package/python3.6.2/lib/python3.6/test/test_dis.py +0 -960
- package/python3.6.2/lib/python3.6/test/test_distutils.py +0 -18
- package/python3.6.2/lib/python3.6/test/test_doctest.py +0 -2962
- package/python3.6.2/lib/python3.6/test/test_doctest.txt +0 -17
- package/python3.6.2/lib/python3.6/test/test_doctest2.py +0 -123
- package/python3.6.2/lib/python3.6/test/test_doctest2.txt +0 -14
- package/python3.6.2/lib/python3.6/test/test_doctest3.txt +0 -5
- package/python3.6.2/lib/python3.6/test/test_doctest4.txt +0 -11
- package/python3.6.2/lib/python3.6/test/test_docxmlrpc.py +0 -198
- package/python3.6.2/lib/python3.6/test/test_dtrace.py +0 -178
- package/python3.6.2/lib/python3.6/test/test_dummy_thread.py +0 -256
- package/python3.6.2/lib/python3.6/test/test_dummy_threading.py +0 -60
- package/python3.6.2/lib/python3.6/test/test_dynamic.py +0 -138
- package/python3.6.2/lib/python3.6/test/test_dynamicclassattribute.py +0 -300
- package/python3.6.2/lib/python3.6/test/test_eintr.py +0 -22
- package/python3.6.2/lib/python3.6/test/test_email/__init__.py +0 -166
- package/python3.6.2/lib/python3.6/test/test_email/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_email/data/PyBanner048.gif +0 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/audiotest.au +0 -0
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_01.txt +0 -19
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_02.txt +0 -136
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_03.txt +0 -16
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_04.txt +0 -37
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_05.txt +0 -28
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_06.txt +0 -33
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_07.txt +0 -83
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_08.txt +0 -24
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_09.txt +0 -24
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_10.txt +0 -39
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_11.txt +0 -7
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_12.txt +0 -36
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_12a.txt +0 -38
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_13.txt +0 -94
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_14.txt +0 -23
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_15.txt +0 -52
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_16.txt +0 -123
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_17.txt +0 -12
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_18.txt +0 -6
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_19.txt +0 -43
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_20.txt +0 -22
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_21.txt +0 -20
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_22.txt +0 -46
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_23.txt +0 -8
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_24.txt +0 -10
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_25.txt +0 -117
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_26.txt +0 -46
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_27.txt +0 -15
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_28.txt +0 -25
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_29.txt +0 -22
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_30.txt +0 -23
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_31.txt +0 -15
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_32.txt +0 -14
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_33.txt +0 -29
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_34.txt +0 -19
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_35.txt +0 -4
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_36.txt +0 -40
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_37.txt +0 -22
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_38.txt +0 -101
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_39.txt +0 -83
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_40.txt +0 -10
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_41.txt +0 -8
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_42.txt +0 -20
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_43.txt +0 -217
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_44.txt +0 -33
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_45.txt +0 -33
- package/python3.6.2/lib/python3.6/test/test_email/data/msg_46.txt +0 -23
- package/python3.6.2/lib/python3.6/test/test_email/test__encoded_words.py +0 -192
- package/python3.6.2/lib/python3.6/test/test_email/test__header_value_parser.py +0 -2723
- package/python3.6.2/lib/python3.6/test/test_email/test_asian_codecs.py +0 -81
- package/python3.6.2/lib/python3.6/test/test_email/test_contentmanager.py +0 -796
- package/python3.6.2/lib/python3.6/test/test_email/test_defect_handling.py +0 -320
- package/python3.6.2/lib/python3.6/test/test_email/test_email.py +0 -5402
- package/python3.6.2/lib/python3.6/test/test_email/test_generator.py +0 -296
- package/python3.6.2/lib/python3.6/test/test_email/test_headerregistry.py +0 -1653
- package/python3.6.2/lib/python3.6/test/test_email/test_inversion.py +0 -70
- package/python3.6.2/lib/python3.6/test/test_email/test_message.py +0 -803
- package/python3.6.2/lib/python3.6/test/test_email/test_parser.py +0 -110
- package/python3.6.2/lib/python3.6/test/test_email/test_pickleable.py +0 -76
- package/python3.6.2/lib/python3.6/test/test_email/test_policy.py +0 -346
- package/python3.6.2/lib/python3.6/test/test_email/test_utils.py +0 -163
- package/python3.6.2/lib/python3.6/test/test_email/torture_test.py +0 -133
- package/python3.6.2/lib/python3.6/test/test_ensurepip.py +0 -310
- package/python3.6.2/lib/python3.6/test/test_enum.py +0 -2618
- package/python3.6.2/lib/python3.6/test/test_enumerate.py +0 -269
- package/python3.6.2/lib/python3.6/test/test_eof.py +0 -28
- package/python3.6.2/lib/python3.6/test/test_epoll.py +0 -255
- package/python3.6.2/lib/python3.6/test/test_errno.py +0 -35
- package/python3.6.2/lib/python3.6/test/test_exception_hierarchy.py +0 -204
- package/python3.6.2/lib/python3.6/test/test_exception_variations.py +0 -176
- package/python3.6.2/lib/python3.6/test/test_exceptions.py +0 -1288
- package/python3.6.2/lib/python3.6/test/test_extcall.py +0 -465
- package/python3.6.2/lib/python3.6/test/test_faulthandler.py +0 -817
- package/python3.6.2/lib/python3.6/test/test_fcntl.py +0 -152
- package/python3.6.2/lib/python3.6/test/test_file.py +0 -329
- package/python3.6.2/lib/python3.6/test/test_file_eintr.py +0 -252
- package/python3.6.2/lib/python3.6/test/test_filecmp.py +0 -217
- package/python3.6.2/lib/python3.6/test/test_fileinput.py +0 -1015
- package/python3.6.2/lib/python3.6/test/test_fileio.py +0 -595
- package/python3.6.2/lib/python3.6/test/test_finalization.py +0 -519
- package/python3.6.2/lib/python3.6/test/test_float.py +0 -1422
- package/python3.6.2/lib/python3.6/test/test_flufl.py +0 -22
- package/python3.6.2/lib/python3.6/test/test_fnmatch.py +0 -128
- package/python3.6.2/lib/python3.6/test/test_fork1.py +0 -112
- package/python3.6.2/lib/python3.6/test/test_format.py +0 -494
- package/python3.6.2/lib/python3.6/test/test_fractions.py +0 -635
- package/python3.6.2/lib/python3.6/test/test_frame.py +0 -165
- package/python3.6.2/lib/python3.6/test/test_fstring.py +0 -1038
- package/python3.6.2/lib/python3.6/test/test_ftplib.py +0 -1091
- package/python3.6.2/lib/python3.6/test/test_funcattrs.py +0 -377
- package/python3.6.2/lib/python3.6/test/test_functools.py +0 -2083
- package/python3.6.2/lib/python3.6/test/test_future.py +0 -108
- package/python3.6.2/lib/python3.6/test/test_future3.py +0 -26
- package/python3.6.2/lib/python3.6/test/test_future4.py +0 -6
- package/python3.6.2/lib/python3.6/test/test_future5.py +0 -21
- package/python3.6.2/lib/python3.6/test/test_gc.py +0 -1031
- package/python3.6.2/lib/python3.6/test/test_gdb.py +0 -936
- package/python3.6.2/lib/python3.6/test/test_generator_stop.py +0 -34
- package/python3.6.2/lib/python3.6/test/test_generators.py +0 -2232
- package/python3.6.2/lib/python3.6/test/test_genericpath.py +0 -537
- package/python3.6.2/lib/python3.6/test/test_genexps.py +0 -285
- package/python3.6.2/lib/python3.6/test/test_getargs2.py +0 -958
- package/python3.6.2/lib/python3.6/test/test_getopt.py +0 -184
- package/python3.6.2/lib/python3.6/test/test_getpass.py +0 -163
- package/python3.6.2/lib/python3.6/test/test_gettext.py +0 -770
- package/python3.6.2/lib/python3.6/test/test_glob.py +0 -317
- package/python3.6.2/lib/python3.6/test/test_global.py +0 -61
- package/python3.6.2/lib/python3.6/test/test_grammar.py +0 -1417
- package/python3.6.2/lib/python3.6/test/test_grp.py +0 -108
- package/python3.6.2/lib/python3.6/test/test_gzip.py +0 -672
- package/python3.6.2/lib/python3.6/test/test_hash.py +0 -346
- package/python3.6.2/lib/python3.6/test/test_hashlib.py +0 -954
- package/python3.6.2/lib/python3.6/test/test_heapq.py +0 -427
- package/python3.6.2/lib/python3.6/test/test_hmac.py +0 -496
- package/python3.6.2/lib/python3.6/test/test_html.py +0 -103
- package/python3.6.2/lib/python3.6/test/test_htmlparser.py +0 -778
- package/python3.6.2/lib/python3.6/test/test_http_cookiejar.py +0 -1772
- package/python3.6.2/lib/python3.6/test/test_http_cookies.py +0 -472
- package/python3.6.2/lib/python3.6/test/test_httplib.py +0 -1903
- package/python3.6.2/lib/python3.6/test/test_httpservers.py +0 -1060
- package/python3.6.2/lib/python3.6/test/test_idle.py +0 -23
- package/python3.6.2/lib/python3.6/test/test_imaplib.py +0 -998
- package/python3.6.2/lib/python3.6/test/test_imghdr.py +0 -140
- package/python3.6.2/lib/python3.6/test/test_imp.py +0 -416
- package/python3.6.2/lib/python3.6/test/test_import/__init__.py +0 -1199
- package/python3.6.2/lib/python3.6/test/test_import/__main__.py +0 -3
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/basic.py +0 -2
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/basic2.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/indirect.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/rebinding.py +0 -3
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/rebinding2.py +0 -3
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/subpackage.py +0 -2
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/subpkg/subpackage2.py +0 -2
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/subpkg/util.py +0 -2
- package/python3.6.2/lib/python3.6/test/test_import/data/circular_imports/util.py +0 -2
- package/python3.6.2/lib/python3.6/test/test_import/data/package/__init__.py +0 -2
- package/python3.6.2/lib/python3.6/test/test_import/data/package/submodule.py +0 -0
- package/python3.6.2/lib/python3.6/test/test_import/data/package2/submodule1.py +0 -3
- package/python3.6.2/lib/python3.6/test/test_import/data/package2/submodule2.py +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/__init__.py +0 -5
- package/python3.6.2/lib/python3.6/test/test_importlib/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_importlib/abc.py +0 -94
- package/python3.6.2/lib/python3.6/test/test_importlib/builtin/__init__.py +0 -5
- package/python3.6.2/lib/python3.6/test/test_importlib/builtin/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_importlib/builtin/test_finder.py +0 -90
- package/python3.6.2/lib/python3.6/test/test_importlib/builtin/test_loader.py +0 -108
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/__init__.py +0 -5
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/test_case_sensitivity.py +0 -46
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/test_finder.py +0 -44
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/test_loader.py +0 -277
- package/python3.6.2/lib/python3.6/test/test_importlib/extension/test_path_hook.py +0 -31
- package/python3.6.2/lib/python3.6/test/test_importlib/frozen/__init__.py +0 -5
- package/python3.6.2/lib/python3.6/test/test_importlib/frozen/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_importlib/frozen/test_finder.py +0 -84
- package/python3.6.2/lib/python3.6/test/test_importlib/frozen/test_loader.py +0 -225
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/__init__.py +0 -5
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test___loader__.py +0 -75
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test___package__.py +0 -163
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_api.py +0 -119
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_caching.py +0 -93
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_fromlist.py +0 -175
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_meta_path.py +0 -125
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_packages.py +0 -110
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_path.py +0 -257
- package/python3.6.2/lib/python3.6/test/test_importlib/import_/test_relative_imports.py +0 -232
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/both_portions/foo/one.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/both_portions/foo/two.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/missing_directory.zip +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test/empty +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/nested_portion1.zip +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/one.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/portion1/foo/one.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/portion2/foo/two.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/project1/parent/child/one.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/project2/parent/child/two.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/project3/parent/child/three.py +0 -1
- package/python3.6.2/lib/python3.6/test/test_importlib/namespace_pkgs/top_level_portion1.zip +0 -0
- package/python3.6.2/lib/python3.6/test/test_importlib/source/__init__.py +0 -5
- package/python3.6.2/lib/python3.6/test/test_importlib/source/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_case_sensitivity.py +0 -85
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_file_loader.py +0 -602
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_finder.py +0 -236
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_path_hook.py +0 -41
- package/python3.6.2/lib/python3.6/test/test_importlib/source/test_source_encoding.py +0 -175
- package/python3.6.2/lib/python3.6/test/test_importlib/test_abc.py +0 -953
- package/python3.6.2/lib/python3.6/test/test_importlib/test_api.py +0 -449
- package/python3.6.2/lib/python3.6/test/test_importlib/test_lazy.py +0 -145
- package/python3.6.2/lib/python3.6/test/test_importlib/test_locks.py +0 -175
- package/python3.6.2/lib/python3.6/test/test_importlib/test_namespace_pkgs.py +0 -321
- package/python3.6.2/lib/python3.6/test/test_importlib/test_spec.py +0 -819
- package/python3.6.2/lib/python3.6/test/test_importlib/test_util.py +0 -805
- package/python3.6.2/lib/python3.6/test/test_importlib/test_windows.py +0 -109
- package/python3.6.2/lib/python3.6/test/test_importlib/util.py +0 -388
- package/python3.6.2/lib/python3.6/test/test_index.py +0 -275
- package/python3.6.2/lib/python3.6/test/test_inspect.py +0 -3725
- package/python3.6.2/lib/python3.6/test/test_int.py +0 -518
- package/python3.6.2/lib/python3.6/test/test_int_literal.py +0 -143
- package/python3.6.2/lib/python3.6/test/test_io.py +0 -4054
- package/python3.6.2/lib/python3.6/test/test_ioctl.py +0 -91
- package/python3.6.2/lib/python3.6/test/test_ipaddress.py +0 -1972
- package/python3.6.2/lib/python3.6/test/test_isinstance.py +0 -280
- package/python3.6.2/lib/python3.6/test/test_iter.py +0 -1016
- package/python3.6.2/lib/python3.6/test/test_iterlen.py +0 -228
- package/python3.6.2/lib/python3.6/test/test_itertools.py +0 -2340
- package/python3.6.2/lib/python3.6/test/test_json/__init__.py +0 -56
- package/python3.6.2/lib/python3.6/test/test_json/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_json/test_decode.py +0 -97
- package/python3.6.2/lib/python3.6/test/test_json/test_default.py +0 -12
- package/python3.6.2/lib/python3.6/test/test_json/test_dump.py +0 -68
- package/python3.6.2/lib/python3.6/test/test_json/test_encode_basestring_ascii.py +0 -48
- package/python3.6.2/lib/python3.6/test/test_json/test_enum.py +0 -120
- package/python3.6.2/lib/python3.6/test/test_json/test_fail.py +0 -216
- package/python3.6.2/lib/python3.6/test/test_json/test_float.py +0 -33
- package/python3.6.2/lib/python3.6/test/test_json/test_indent.py +0 -67
- package/python3.6.2/lib/python3.6/test/test_json/test_pass1.py +0 -75
- package/python3.6.2/lib/python3.6/test/test_json/test_pass2.py +0 -18
- package/python3.6.2/lib/python3.6/test/test_json/test_pass3.py +0 -24
- package/python3.6.2/lib/python3.6/test/test_json/test_recursion.py +0 -100
- package/python3.6.2/lib/python3.6/test/test_json/test_scanstring.py +0 -141
- package/python3.6.2/lib/python3.6/test/test_json/test_separators.py +0 -50
- package/python3.6.2/lib/python3.6/test/test_json/test_speedups.py +0 -71
- package/python3.6.2/lib/python3.6/test/test_json/test_tool.py +0 -107
- package/python3.6.2/lib/python3.6/test/test_json/test_unicode.py +0 -98
- package/python3.6.2/lib/python3.6/test/test_keyword.py +0 -138
- package/python3.6.2/lib/python3.6/test/test_keywordonlyarg.py +0 -189
- package/python3.6.2/lib/python3.6/test/test_kqueue.py +0 -263
- package/python3.6.2/lib/python3.6/test/test_largefile.py +0 -180
- package/python3.6.2/lib/python3.6/test/test_lib2to3.py +0 -5
- package/python3.6.2/lib/python3.6/test/test_linecache.py +0 -242
- package/python3.6.2/lib/python3.6/test/test_list.py +0 -155
- package/python3.6.2/lib/python3.6/test/test_listcomps.py +0 -148
- package/python3.6.2/lib/python3.6/test/test_locale.py +0 -587
- package/python3.6.2/lib/python3.6/test/test_logging.py +0 -4442
- package/python3.6.2/lib/python3.6/test/test_long.py +0 -1322
- package/python3.6.2/lib/python3.6/test/test_longexp.py +0 -10
- package/python3.6.2/lib/python3.6/test/test_lzma.py +0 -1764
- package/python3.6.2/lib/python3.6/test/test_macpath.py +0 -149
- package/python3.6.2/lib/python3.6/test/test_macurl2path.py +0 -31
- package/python3.6.2/lib/python3.6/test/test_mailbox.py +0 -2288
- package/python3.6.2/lib/python3.6/test/test_mailcap.py +0 -239
- package/python3.6.2/lib/python3.6/test/test_marshal.py +0 -556
- package/python3.6.2/lib/python3.6/test/test_math.py +0 -1422
- package/python3.6.2/lib/python3.6/test/test_memoryio.py +0 -842
- package/python3.6.2/lib/python3.6/test/test_memoryview.py +0 -537
- package/python3.6.2/lib/python3.6/test/test_metaclass.py +0 -265
- package/python3.6.2/lib/python3.6/test/test_mimetypes.py +0 -111
- package/python3.6.2/lib/python3.6/test/test_minidom.py +0 -1574
- package/python3.6.2/lib/python3.6/test/test_mmap.py +0 -803
- package/python3.6.2/lib/python3.6/test/test_module.py +0 -244
- package/python3.6.2/lib/python3.6/test/test_modulefinder.py +0 -337
- package/python3.6.2/lib/python3.6/test/test_msilib.py +0 -99
- package/python3.6.2/lib/python3.6/test/test_multibytecodec.py +0 -270
- package/python3.6.2/lib/python3.6/test/test_multiprocessing_fork.py +0 -13
- package/python3.6.2/lib/python3.6/test/test_multiprocessing_forkserver.py +0 -12
- package/python3.6.2/lib/python3.6/test/test_multiprocessing_main_handling.py +0 -290
- package/python3.6.2/lib/python3.6/test/test_multiprocessing_spawn.py +0 -12
- package/python3.6.2/lib/python3.6/test/test_netrc.py +0 -133
- package/python3.6.2/lib/python3.6/test/test_nis.py +0 -39
- package/python3.6.2/lib/python3.6/test/test_nntplib.py +0 -1581
- package/python3.6.2/lib/python3.6/test/test_normalization.py +0 -108
- package/python3.6.2/lib/python3.6/test/test_ntpath.py +0 -539
- package/python3.6.2/lib/python3.6/test/test_numeric_tower.py +0 -202
- package/python3.6.2/lib/python3.6/test/test_opcodes.py +0 -135
- package/python3.6.2/lib/python3.6/test/test_openpty.py +0 -21
- package/python3.6.2/lib/python3.6/test/test_operator.py +0 -609
- package/python3.6.2/lib/python3.6/test/test_optparse.py +0 -1664
- package/python3.6.2/lib/python3.6/test/test_ordered_dict.py +0 -787
- package/python3.6.2/lib/python3.6/test/test_os.py +0 -3548
- package/python3.6.2/lib/python3.6/test/test_ossaudiodev.py +0 -202
- package/python3.6.2/lib/python3.6/test/test_osx_env.py +0 -34
- package/python3.6.2/lib/python3.6/test/test_parser.py +0 -905
- package/python3.6.2/lib/python3.6/test/test_pathlib.py +0 -2252
- package/python3.6.2/lib/python3.6/test/test_pdb.py +0 -1124
- package/python3.6.2/lib/python3.6/test/test_peepholer.py +0 -325
- package/python3.6.2/lib/python3.6/test/test_pickle.py +0 -514
- package/python3.6.2/lib/python3.6/test/test_pickletools.py +0 -99
- package/python3.6.2/lib/python3.6/test/test_pipes.py +0 -203
- package/python3.6.2/lib/python3.6/test/test_pkg.py +0 -295
- package/python3.6.2/lib/python3.6/test/test_pkgimport.py +0 -80
- package/python3.6.2/lib/python3.6/test/test_pkgutil.py +0 -491
- package/python3.6.2/lib/python3.6/test/test_platform.py +0 -370
- package/python3.6.2/lib/python3.6/test/test_plistlib.py +0 -662
- package/python3.6.2/lib/python3.6/test/test_poll.py +0 -238
- package/python3.6.2/lib/python3.6/test/test_popen.py +0 -65
- package/python3.6.2/lib/python3.6/test/test_poplib.py +0 -520
- package/python3.6.2/lib/python3.6/test/test_posix.py +0 -1298
- package/python3.6.2/lib/python3.6/test/test_posixpath.py +0 -680
- package/python3.6.2/lib/python3.6/test/test_pow.py +0 -123
- package/python3.6.2/lib/python3.6/test/test_pprint.py +0 -1012
- package/python3.6.2/lib/python3.6/test/test_print.py +0 -193
- package/python3.6.2/lib/python3.6/test/test_profile.py +0 -187
- package/python3.6.2/lib/python3.6/test/test_property.py +0 -272
- package/python3.6.2/lib/python3.6/test/test_pstats.py +0 -38
- package/python3.6.2/lib/python3.6/test/test_pty.py +0 -316
- package/python3.6.2/lib/python3.6/test/test_pulldom.py +0 -342
- package/python3.6.2/lib/python3.6/test/test_pwd.py +0 -125
- package/python3.6.2/lib/python3.6/test/test_py_compile.py +0 -127
- package/python3.6.2/lib/python3.6/test/test_pyclbr.py +0 -176
- package/python3.6.2/lib/python3.6/test/test_pydoc.py +0 -1107
- package/python3.6.2/lib/python3.6/test/test_pyexpat.py +0 -733
- package/python3.6.2/lib/python3.6/test/test_queue.py +0 -362
- package/python3.6.2/lib/python3.6/test/test_quopri.py +0 -210
- package/python3.6.2/lib/python3.6/test/test_raise.py +0 -419
- package/python3.6.2/lib/python3.6/test/test_random.py +0 -939
- package/python3.6.2/lib/python3.6/test/test_range.py +0 -693
- package/python3.6.2/lib/python3.6/test/test_re.py +0 -2087
- package/python3.6.2/lib/python3.6/test/test_readline.py +0 -309
- package/python3.6.2/lib/python3.6/test/test_regrtest.py +0 -967
- package/python3.6.2/lib/python3.6/test/test_repl.py +0 -62
- package/python3.6.2/lib/python3.6/test/test_reprlib.py +0 -405
- package/python3.6.2/lib/python3.6/test/test_resource.py +0 -180
- package/python3.6.2/lib/python3.6/test/test_richcmp.py +0 -355
- package/python3.6.2/lib/python3.6/test/test_rlcompleter.py +0 -141
- package/python3.6.2/lib/python3.6/test/test_robotparser.py +0 -335
- package/python3.6.2/lib/python3.6/test/test_runpy.py +0 -749
- package/python3.6.2/lib/python3.6/test/test_sax.py +0 -1273
- package/python3.6.2/lib/python3.6/test/test_sched.py +0 -204
- package/python3.6.2/lib/python3.6/test/test_scope.py +0 -761
- package/python3.6.2/lib/python3.6/test/test_script_helper.py +0 -110
- package/python3.6.2/lib/python3.6/test/test_secrets.py +0 -124
- package/python3.6.2/lib/python3.6/test/test_select.py +0 -82
- package/python3.6.2/lib/python3.6/test/test_selectors.py +0 -526
- package/python3.6.2/lib/python3.6/test/test_set.py +0 -1903
- package/python3.6.2/lib/python3.6/test/test_setcomps.py +0 -151
- package/python3.6.2/lib/python3.6/test/test_shelve.py +0 -228
- package/python3.6.2/lib/python3.6/test/test_shlex.py +0 -318
- package/python3.6.2/lib/python3.6/test/test_shutil.py +0 -1925
- package/python3.6.2/lib/python3.6/test/test_signal.py +0 -1093
- package/python3.6.2/lib/python3.6/test/test_site.py +0 -595
- package/python3.6.2/lib/python3.6/test/test_slice.py +0 -255
- package/python3.6.2/lib/python3.6/test/test_smtpd.py +0 -1013
- package/python3.6.2/lib/python3.6/test/test_smtplib.py +0 -1292
- package/python3.6.2/lib/python3.6/test/test_smtpnet.py +0 -83
- package/python3.6.2/lib/python3.6/test/test_sndhdr.py +0 -37
- package/python3.6.2/lib/python3.6/test/test_socket.py +0 -5648
- package/python3.6.2/lib/python3.6/test/test_socketserver.py +0 -505
- package/python3.6.2/lib/python3.6/test/test_sort.py +0 -265
- package/python3.6.2/lib/python3.6/test/test_source_encoding.py +0 -225
- package/python3.6.2/lib/python3.6/test/test_spwd.py +0 -75
- package/python3.6.2/lib/python3.6/test/test_sqlite.py +0 -24
- package/python3.6.2/lib/python3.6/test/test_ssl.py +0 -3663
- package/python3.6.2/lib/python3.6/test/test_startfile.py +0 -34
- package/python3.6.2/lib/python3.6/test/test_stat.py +0 -234
- package/python3.6.2/lib/python3.6/test/test_statistics.py +0 -1992
- package/python3.6.2/lib/python3.6/test/test_strftime.py +0 -206
- package/python3.6.2/lib/python3.6/test/test_string.py +0 -439
- package/python3.6.2/lib/python3.6/test/test_string_literals.py +0 -249
- package/python3.6.2/lib/python3.6/test/test_stringprep.py +0 -92
- package/python3.6.2/lib/python3.6/test/test_strptime.py +0 -673
- package/python3.6.2/lib/python3.6/test/test_strtod.py +0 -433
- package/python3.6.2/lib/python3.6/test/test_struct.py +0 -756
- package/python3.6.2/lib/python3.6/test/test_structmembers.py +0 -144
- package/python3.6.2/lib/python3.6/test/test_structseq.py +0 -126
- package/python3.6.2/lib/python3.6/test/test_subclassinit.py +0 -284
- package/python3.6.2/lib/python3.6/test/test_subprocess.py +0 -3005
- package/python3.6.2/lib/python3.6/test/test_sunau.py +0 -121
- package/python3.6.2/lib/python3.6/test/test_sundry.py +0 -57
- package/python3.6.2/lib/python3.6/test/test_super.py +0 -347
- package/python3.6.2/lib/python3.6/test/test_support.py +0 -459
- package/python3.6.2/lib/python3.6/test/test_symbol.py +0 -54
- package/python3.6.2/lib/python3.6/test/test_symtable.py +0 -193
- package/python3.6.2/lib/python3.6/test/test_syntax.py +0 -618
- package/python3.6.2/lib/python3.6/test/test_sys.py +0 -1270
- package/python3.6.2/lib/python3.6/test/test_sys_setprofile.py +0 -376
- package/python3.6.2/lib/python3.6/test/test_sys_settrace.py +0 -854
- package/python3.6.2/lib/python3.6/test/test_sysconfig.py +0 -445
- package/python3.6.2/lib/python3.6/test/test_syslog.py +0 -40
- package/python3.6.2/lib/python3.6/test/test_tarfile.py +0 -2635
- package/python3.6.2/lib/python3.6/test/test_tcl.py +0 -715
- package/python3.6.2/lib/python3.6/test/test_telnetlib.py +0 -401
- package/python3.6.2/lib/python3.6/test/test_tempfile.py +0 -1458
- package/python3.6.2/lib/python3.6/test/test_textwrap.py +0 -981
- package/python3.6.2/lib/python3.6/test/test_thread.py +0 -269
- package/python3.6.2/lib/python3.6/test/test_threaded_import.py +0 -254
- package/python3.6.2/lib/python3.6/test/test_threadedtempfile.py +0 -62
- package/python3.6.2/lib/python3.6/test/test_threading.py +0 -1170
- package/python3.6.2/lib/python3.6/test/test_threading_local.py +0 -220
- package/python3.6.2/lib/python3.6/test/test_threadsignals.py +0 -227
- package/python3.6.2/lib/python3.6/test/test_time.py +0 -1000
- package/python3.6.2/lib/python3.6/test/test_timeit.py +0 -381
- package/python3.6.2/lib/python3.6/test/test_timeout.py +0 -303
- package/python3.6.2/lib/python3.6/test/test_tix.py +0 -32
- package/python3.6.2/lib/python3.6/test/test_tk.py +0 -15
- package/python3.6.2/lib/python3.6/test/test_tokenize.py +0 -1590
- package/python3.6.2/lib/python3.6/test/test_tools/__init__.py +0 -24
- package/python3.6.2/lib/python3.6/test/test_tools/__main__.py +0 -4
- package/python3.6.2/lib/python3.6/test/test_tools/test_fixcid.py +0 -92
- package/python3.6.2/lib/python3.6/test/test_tools/test_gprof2html.py +0 -35
- package/python3.6.2/lib/python3.6/test/test_tools/test_i18n.py +0 -72
- package/python3.6.2/lib/python3.6/test/test_tools/test_md5sum.py +0 -76
- package/python3.6.2/lib/python3.6/test/test_tools/test_pdeps.py +0 -32
- package/python3.6.2/lib/python3.6/test/test_tools/test_pindent.py +0 -339
- package/python3.6.2/lib/python3.6/test/test_tools/test_reindent.py +0 -35
- package/python3.6.2/lib/python3.6/test/test_tools/test_sundry.py +0 -53
- package/python3.6.2/lib/python3.6/test/test_tools/test_unparse.py +0 -313
- package/python3.6.2/lib/python3.6/test/test_trace.py +0 -391
- package/python3.6.2/lib/python3.6/test/test_traceback.py +0 -1111
- package/python3.6.2/lib/python3.6/test/test_tracemalloc.py +0 -994
- package/python3.6.2/lib/python3.6/test/test_ttk_guionly.py +0 -34
- package/python3.6.2/lib/python3.6/test/test_ttk_textonly.py +0 -13
- package/python3.6.2/lib/python3.6/test/test_tuple.py +0 -221
- package/python3.6.2/lib/python3.6/test/test_turtle.py +0 -436
- package/python3.6.2/lib/python3.6/test/test_typechecks.py +0 -71
- package/python3.6.2/lib/python3.6/test/test_types.py +0 -1550
- package/python3.6.2/lib/python3.6/test/test_typing.py +0 -2577
- package/python3.6.2/lib/python3.6/test/test_ucn.py +0 -237
- package/python3.6.2/lib/python3.6/test/test_unary.py +0 -53
- package/python3.6.2/lib/python3.6/test/test_unicode.py +0 -2894
- package/python3.6.2/lib/python3.6/test/test_unicode_file.py +0 -140
- package/python3.6.2/lib/python3.6/test/test_unicode_file_functions.py +0 -195
- package/python3.6.2/lib/python3.6/test/test_unicode_identifiers.py +0 -31
- package/python3.6.2/lib/python3.6/test/test_unicodedata.py +0 -316
- package/python3.6.2/lib/python3.6/test/test_unittest.py +0 -16
- package/python3.6.2/lib/python3.6/test/test_univnewlines.py +0 -123
- package/python3.6.2/lib/python3.6/test/test_unpack.py +0 -151
- package/python3.6.2/lib/python3.6/test/test_unpack_ex.py +0 -365
- package/python3.6.2/lib/python3.6/test/test_urllib.py +0 -1572
- package/python3.6.2/lib/python3.6/test/test_urllib2.py +0 -1930
- package/python3.6.2/lib/python3.6/test/test_urllib2_localnet.py +0 -679
- package/python3.6.2/lib/python3.6/test/test_urllib2net.py +0 -329
- package/python3.6.2/lib/python3.6/test/test_urllib_response.py +0 -59
- package/python3.6.2/lib/python3.6/test/test_urllibnet.py +0 -218
- package/python3.6.2/lib/python3.6/test/test_urlparse.py +0 -1122
- package/python3.6.2/lib/python3.6/test/test_userdict.py +0 -220
- package/python3.6.2/lib/python3.6/test/test_userlist.py +0 -63
- package/python3.6.2/lib/python3.6/test/test_userstring.py +0 -44
- package/python3.6.2/lib/python3.6/test/test_utf8source.py +0 -43
- package/python3.6.2/lib/python3.6/test/test_uu.py +0 -260
- package/python3.6.2/lib/python3.6/test/test_uuid.py +0 -511
- package/python3.6.2/lib/python3.6/test/test_venv.py +0 -433
- package/python3.6.2/lib/python3.6/test/test_wait3.py +0 -38
- package/python3.6.2/lib/python3.6/test/test_wait4.py +0 -39
- package/python3.6.2/lib/python3.6/test/test_warnings/__init__.py +0 -1216
- package/python3.6.2/lib/python3.6/test/test_warnings/__main__.py +0 -3
- package/python3.6.2/lib/python3.6/test/test_warnings/data/import_warning.py +0 -3
- package/python3.6.2/lib/python3.6/test/test_warnings/data/stacklevel.py +0 -9
- package/python3.6.2/lib/python3.6/test/test_wave.py +0 -113
- package/python3.6.2/lib/python3.6/test/test_weakref.py +0 -1952
- package/python3.6.2/lib/python3.6/test/test_weakset.py +0 -439
- package/python3.6.2/lib/python3.6/test/test_webbrowser.py +0 -217
- package/python3.6.2/lib/python3.6/test/test_winconsoleio.py +0 -191
- package/python3.6.2/lib/python3.6/test/test_winreg.py +0 -498
- package/python3.6.2/lib/python3.6/test/test_winsound.py +0 -150
- package/python3.6.2/lib/python3.6/test/test_with.py +0 -746
- package/python3.6.2/lib/python3.6/test/test_wsgiref.py +0 -785
- package/python3.6.2/lib/python3.6/test/test_xdrlib.py +0 -77
- package/python3.6.2/lib/python3.6/test/test_xml_dom_minicompat.py +0 -138
- package/python3.6.2/lib/python3.6/test/test_xml_etree.py +0 -3166
- package/python3.6.2/lib/python3.6/test/test_xml_etree_c.py +0 -188
- package/python3.6.2/lib/python3.6/test/test_xmlrpc.py +0 -1415
- package/python3.6.2/lib/python3.6/test/test_xmlrpc_net.py +0 -32
- package/python3.6.2/lib/python3.6/test/test_yield_from.py +0 -1052
- package/python3.6.2/lib/python3.6/test/test_zipapp.py +0 -349
- package/python3.6.2/lib/python3.6/test/test_zipfile.py +0 -2241
- package/python3.6.2/lib/python3.6/test/test_zipfile64.py +0 -155
- package/python3.6.2/lib/python3.6/test/test_zipimport.py +0 -759
- package/python3.6.2/lib/python3.6/test/test_zipimport_support.py +0 -244
- package/python3.6.2/lib/python3.6/test/test_zlib.py +0 -898
- package/python3.6.2/lib/python3.6/test/testcodec.py +0 -48
- package/python3.6.2/lib/python3.6/test/testtar.tar +0 -0
- package/python3.6.2/lib/python3.6/test/tf_inherit_check.py +0 -27
- package/python3.6.2/lib/python3.6/test/threaded_import_hangers.py +0 -45
- package/python3.6.2/lib/python3.6/test/time_hashlib.py +0 -88
- package/python3.6.2/lib/python3.6/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt +0 -13
- package/python3.6.2/lib/python3.6/test/tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt +0 -11
- package/python3.6.2/lib/python3.6/test/tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt +0 -13
- package/python3.6.2/lib/python3.6/test/tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt +0 -12
- package/python3.6.2/lib/python3.6/test/tokenize_tests.txt +0 -189
- package/python3.6.2/lib/python3.6/test/tracedmodules/__init__.py +0 -4
- package/python3.6.2/lib/python3.6/test/tracedmodules/testmod.py +0 -9
- package/python3.6.2/lib/python3.6/test/win_console_handler.py +0 -49
- package/python3.6.2/lib/python3.6/test/wrongcert.pem +0 -32
- package/python3.6.2/lib/python3.6/test/xmltestdata/expat224_utf8_bug.xml +0 -2
- package/python3.6.2/lib/python3.6/test/xmltestdata/simple-ns.xml +0 -7
- package/python3.6.2/lib/python3.6/test/xmltestdata/simple.xml +0 -6
- package/python3.6.2/lib/python3.6/test/xmltestdata/test.xml +0 -115
- package/python3.6.2/lib/python3.6/test/xmltestdata/test.xml.out +0 -115
- package/python3.6.2/lib/python3.6/test/xmltests.py +0 -21
- package/python3.6.2/lib/python3.6/test/zip_cp437_header.zip +0 -0
- package/python3.6.2/lib/python3.6/test/zipdir.zip +0 -0
- package/python3.6.2/lib/python3.6/textwrap.py +0 -488
- package/python3.6.2/lib/python3.6/this.py +0 -28
- package/python3.6.2/lib/python3.6/threading.py +0 -1357
- package/python3.6.2/lib/python3.6/timeit.py +0 -362
- package/python3.6.2/lib/python3.6/tkinter/__init__.py +0 -4002
- package/python3.6.2/lib/python3.6/tkinter/__main__.py +0 -7
- package/python3.6.2/lib/python3.6/tkinter/colorchooser.py +0 -72
- package/python3.6.2/lib/python3.6/tkinter/commondialog.py +0 -55
- package/python3.6.2/lib/python3.6/tkinter/constants.py +0 -110
- package/python3.6.2/lib/python3.6/tkinter/dialog.py +0 -46
- package/python3.6.2/lib/python3.6/tkinter/dnd.py +0 -321
- package/python3.6.2/lib/python3.6/tkinter/filedialog.py +0 -479
- package/python3.6.2/lib/python3.6/tkinter/font.py +0 -232
- package/python3.6.2/lib/python3.6/tkinter/messagebox.py +0 -134
- package/python3.6.2/lib/python3.6/tkinter/scrolledtext.py +0 -54
- package/python3.6.2/lib/python3.6/tkinter/simpledialog.py +0 -423
- package/python3.6.2/lib/python3.6/tkinter/test/README +0 -14
- package/python3.6.2/lib/python3.6/tkinter/test/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/tkinter/test/runtktests.py +0 -69
- package/python3.6.2/lib/python3.6/tkinter/test/support.py +0 -105
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_font.py +0 -96
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_geometry_managers.py +0 -906
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_images.py +0 -327
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_loadtk.py +0 -46
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_misc.py +0 -55
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_text.py +0 -47
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_variables.py +0 -310
- package/python3.6.2/lib/python3.6/tkinter/test/test_tkinter/test_widgets.py +0 -1204
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/test_extensions.py +0 -323
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/test_functions.py +0 -461
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/test_style.py +0 -92
- package/python3.6.2/lib/python3.6/tkinter/test/test_ttk/test_widgets.py +0 -1707
- package/python3.6.2/lib/python3.6/tkinter/test/widget_tests.py +0 -548
- package/python3.6.2/lib/python3.6/tkinter/tix.py +0 -1946
- package/python3.6.2/lib/python3.6/tkinter/ttk.py +0 -1655
- package/python3.6.2/lib/python3.6/token.py +0 -143
- package/python3.6.2/lib/python3.6/tokenize.py +0 -793
- package/python3.6.2/lib/python3.6/trace.py +0 -742
- package/python3.6.2/lib/python3.6/traceback.py +0 -600
- package/python3.6.2/lib/python3.6/tracemalloc.py +0 -524
- package/python3.6.2/lib/python3.6/tty.py +0 -36
- package/python3.6.2/lib/python3.6/turtle.py +0 -4139
- package/python3.6.2/lib/python3.6/turtledemo/__init__.py +0 -14
- package/python3.6.2/lib/python3.6/turtledemo/__main__.py +0 -386
- package/python3.6.2/lib/python3.6/turtledemo/bytedesign.py +0 -161
- package/python3.6.2/lib/python3.6/turtledemo/chaos.py +0 -59
- package/python3.6.2/lib/python3.6/turtledemo/clock.py +0 -132
- package/python3.6.2/lib/python3.6/turtledemo/colormixer.py +0 -58
- package/python3.6.2/lib/python3.6/turtledemo/forest.py +0 -108
- package/python3.6.2/lib/python3.6/turtledemo/fractalcurves.py +0 -138
- package/python3.6.2/lib/python3.6/turtledemo/lindenmayer.py +0 -119
- package/python3.6.2/lib/python3.6/turtledemo/minimal_hanoi.py +0 -79
- package/python3.6.2/lib/python3.6/turtledemo/nim.py +0 -226
- package/python3.6.2/lib/python3.6/turtledemo/paint.py +0 -54
- package/python3.6.2/lib/python3.6/turtledemo/peace.py +0 -61
- package/python3.6.2/lib/python3.6/turtledemo/penrose.py +0 -181
- package/python3.6.2/lib/python3.6/turtledemo/planet_and_moon.py +0 -111
- package/python3.6.2/lib/python3.6/turtledemo/round_dance.py +0 -86
- package/python3.6.2/lib/python3.6/turtledemo/sorting_animate.py +0 -204
- package/python3.6.2/lib/python3.6/turtledemo/tree.py +0 -63
- package/python3.6.2/lib/python3.6/turtledemo/turtle.cfg +0 -10
- package/python3.6.2/lib/python3.6/turtledemo/two_canvases.py +0 -54
- package/python3.6.2/lib/python3.6/turtledemo/wikipedia.py +0 -65
- package/python3.6.2/lib/python3.6/turtledemo/yinyang.py +0 -49
- package/python3.6.2/lib/python3.6/types.py +0 -266
- package/python3.6.2/lib/python3.6/typing.py +0 -2403
- package/python3.6.2/lib/python3.6/unittest/__init__.py +0 -78
- package/python3.6.2/lib/python3.6/unittest/__main__.py +0 -18
- package/python3.6.2/lib/python3.6/unittest/case.py +0 -1429
- package/python3.6.2/lib/python3.6/unittest/loader.py +0 -508
- package/python3.6.2/lib/python3.6/unittest/main.py +0 -260
- package/python3.6.2/lib/python3.6/unittest/mock.py +0 -2407
- package/python3.6.2/lib/python3.6/unittest/result.py +0 -216
- package/python3.6.2/lib/python3.6/unittest/runner.py +0 -221
- package/python3.6.2/lib/python3.6/unittest/signals.py +0 -71
- package/python3.6.2/lib/python3.6/unittest/suite.py +0 -321
- package/python3.6.2/lib/python3.6/unittest/test/__init__.py +0 -22
- package/python3.6.2/lib/python3.6/unittest/test/__main__.py +0 -18
- package/python3.6.2/lib/python3.6/unittest/test/_test_warnings.py +0 -73
- package/python3.6.2/lib/python3.6/unittest/test/dummy.py +0 -1
- package/python3.6.2/lib/python3.6/unittest/test/support.py +0 -138
- package/python3.6.2/lib/python3.6/unittest/test/test_assertions.py +0 -411
- package/python3.6.2/lib/python3.6/unittest/test/test_break.py +0 -291
- package/python3.6.2/lib/python3.6/unittest/test/test_case.py +0 -1833
- package/python3.6.2/lib/python3.6/unittest/test/test_discovery.py +0 -872
- package/python3.6.2/lib/python3.6/unittest/test/test_functiontestcase.py +0 -148
- package/python3.6.2/lib/python3.6/unittest/test/test_loader.py +0 -1529
- package/python3.6.2/lib/python3.6/unittest/test/test_program.py +0 -414
- package/python3.6.2/lib/python3.6/unittest/test/test_result.py +0 -695
- package/python3.6.2/lib/python3.6/unittest/test/test_runner.py +0 -353
- package/python3.6.2/lib/python3.6/unittest/test/test_setups.py +0 -507
- package/python3.6.2/lib/python3.6/unittest/test/test_skipping.py +0 -260
- package/python3.6.2/lib/python3.6/unittest/test/test_suite.py +0 -447
- package/python3.6.2/lib/python3.6/unittest/test/testmock/__init__.py +0 -17
- package/python3.6.2/lib/python3.6/unittest/test/testmock/__main__.py +0 -18
- package/python3.6.2/lib/python3.6/unittest/test/testmock/support.py +0 -21
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testcallable.py +0 -151
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testhelpers.py +0 -946
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testmagicmethods.py +0 -468
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testmock.py +0 -1569
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testpatch.py +0 -1853
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testsentinel.py +0 -28
- package/python3.6.2/lib/python3.6/unittest/test/testmock/testwith.py +0 -301
- package/python3.6.2/lib/python3.6/unittest/util.py +0 -177
- package/python3.6.2/lib/python3.6/urllib/__init__.py +0 -0
- package/python3.6.2/lib/python3.6/urllib/error.py +0 -77
- package/python3.6.2/lib/python3.6/urllib/parse.py +0 -1021
- package/python3.6.2/lib/python3.6/urllib/request.py +0 -2739
- package/python3.6.2/lib/python3.6/urllib/response.py +0 -80
- package/python3.6.2/lib/python3.6/urllib/robotparser.py +0 -250
- package/python3.6.2/lib/python3.6/uu.py +0 -199
- package/python3.6.2/lib/python3.6/uuid.py +0 -629
- package/python3.6.2/lib/python3.6/venv/__init__.py +0 -425
- package/python3.6.2/lib/python3.6/venv/__main__.py +0 -10
- package/python3.6.2/lib/python3.6/venv/scripts/nt/Activate.ps1 +0 -51
- package/python3.6.2/lib/python3.6/venv/scripts/nt/activate.bat +0 -32
- package/python3.6.2/lib/python3.6/venv/scripts/nt/deactivate.bat +0 -21
- package/python3.6.2/lib/python3.6/warnings.py +0 -526
- package/python3.6.2/lib/python3.6/wave.py +0 -505
- package/python3.6.2/lib/python3.6/weakref.py +0 -632
- package/python3.6.2/lib/python3.6/webbrowser.py +0 -664
- package/python3.6.2/lib/python3.6/wsgiref/__init__.py +0 -23
- package/python3.6.2/lib/python3.6/wsgiref/handlers.py +0 -557
- package/python3.6.2/lib/python3.6/wsgiref/headers.py +0 -184
- package/python3.6.2/lib/python3.6/wsgiref/simple_server.py +0 -164
- package/python3.6.2/lib/python3.6/wsgiref/util.py +0 -165
- package/python3.6.2/lib/python3.6/wsgiref/validate.py +0 -443
- package/python3.6.2/lib/python3.6/xdrlib.py +0 -241
- package/python3.6.2/lib/python3.6/xml/__init__.py +0 -20
- package/python3.6.2/lib/python3.6/xml/dom/NodeFilter.py +0 -27
- package/python3.6.2/lib/python3.6/xml/dom/__init__.py +0 -140
- package/python3.6.2/lib/python3.6/xml/dom/domreg.py +0 -97
- package/python3.6.2/lib/python3.6/xml/dom/expatbuilder.py +0 -965
- package/python3.6.2/lib/python3.6/xml/dom/minicompat.py +0 -109
- package/python3.6.2/lib/python3.6/xml/dom/minidom.py +0 -1981
- package/python3.6.2/lib/python3.6/xml/dom/pulldom.py +0 -342
- package/python3.6.2/lib/python3.6/xml/dom/xmlbuilder.py +0 -410
- package/python3.6.2/lib/python3.6/xml/etree/ElementInclude.py +0 -143
- package/python3.6.2/lib/python3.6/xml/etree/ElementPath.py +0 -314
- package/python3.6.2/lib/python3.6/xml/etree/ElementTree.py +0 -1656
- package/python3.6.2/lib/python3.6/xml/etree/__init__.py +0 -33
- package/python3.6.2/lib/python3.6/xml/etree/cElementTree.py +0 -3
- package/python3.6.2/lib/python3.6/xml/parsers/__init__.py +0 -8
- package/python3.6.2/lib/python3.6/xml/parsers/expat.py +0 -8
- package/python3.6.2/lib/python3.6/xml/sax/__init__.py +0 -107
- package/python3.6.2/lib/python3.6/xml/sax/_exceptions.py +0 -131
- package/python3.6.2/lib/python3.6/xml/sax/expatreader.py +0 -446
- package/python3.6.2/lib/python3.6/xml/sax/handler.py +0 -342
- package/python3.6.2/lib/python3.6/xml/sax/saxutils.py +0 -368
- package/python3.6.2/lib/python3.6/xml/sax/xmlreader.py +0 -380
- package/python3.6.2/lib/python3.6/xmlrpc/__init__.py +0 -1
- package/python3.6.2/lib/python3.6/xmlrpc/client.py +0 -1518
- package/python3.6.2/lib/python3.6/xmlrpc/server.py +0 -1002
- package/python3.6.2/lib/python3.6/zipapp.py +0 -201
- package/python3.6.2/lib/python3.6/zipfile.py +0 -2036
|
@@ -1,3663 +0,0 @@
|
|
|
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
|
-
try:
|
|
22
|
-
import ctypes
|
|
23
|
-
except ImportError:
|
|
24
|
-
ctypes = None
|
|
25
|
-
|
|
26
|
-
ssl = support.import_module("ssl")
|
|
27
|
-
|
|
28
|
-
try:
|
|
29
|
-
import threading
|
|
30
|
-
except ImportError:
|
|
31
|
-
_have_threads = False
|
|
32
|
-
else:
|
|
33
|
-
_have_threads = True
|
|
34
|
-
|
|
35
|
-
PROTOCOLS = sorted(ssl._PROTOCOL_NAMES)
|
|
36
|
-
HOST = support.HOST
|
|
37
|
-
IS_LIBRESSL = ssl.OPENSSL_VERSION.startswith('LibreSSL')
|
|
38
|
-
IS_OPENSSL_1_1 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def data_file(*name):
|
|
42
|
-
return os.path.join(os.path.dirname(__file__), *name)
|
|
43
|
-
|
|
44
|
-
# The custom key and certificate files used in test_ssl are generated
|
|
45
|
-
# using Lib/test/make_ssl_certs.py.
|
|
46
|
-
# Other certificates are simply fetched from the Internet servers they
|
|
47
|
-
# are meant to authenticate.
|
|
48
|
-
|
|
49
|
-
CERTFILE = data_file("keycert.pem")
|
|
50
|
-
BYTES_CERTFILE = os.fsencode(CERTFILE)
|
|
51
|
-
ONLYCERT = data_file("ssl_cert.pem")
|
|
52
|
-
ONLYKEY = data_file("ssl_key.pem")
|
|
53
|
-
BYTES_ONLYCERT = os.fsencode(ONLYCERT)
|
|
54
|
-
BYTES_ONLYKEY = os.fsencode(ONLYKEY)
|
|
55
|
-
CERTFILE_PROTECTED = data_file("keycert.passwd.pem")
|
|
56
|
-
ONLYKEY_PROTECTED = data_file("ssl_key.passwd.pem")
|
|
57
|
-
KEY_PASSWORD = "somepass"
|
|
58
|
-
CAPATH = data_file("capath")
|
|
59
|
-
BYTES_CAPATH = os.fsencode(CAPATH)
|
|
60
|
-
CAFILE_NEURONIO = data_file("capath", "4e1295a3.0")
|
|
61
|
-
CAFILE_CACERT = data_file("capath", "5ed36f99.0")
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
# empty CRL
|
|
65
|
-
CRLFILE = data_file("revocation.crl")
|
|
66
|
-
|
|
67
|
-
# Two keys and certs signed by the same CA (for SNI tests)
|
|
68
|
-
SIGNED_CERTFILE = data_file("keycert3.pem")
|
|
69
|
-
SIGNED_CERTFILE2 = data_file("keycert4.pem")
|
|
70
|
-
# Same certificate as pycacert.pem, but without extra text in file
|
|
71
|
-
SIGNING_CA = data_file("capath", "ceff1710.0")
|
|
72
|
-
# cert with all kinds of subject alt names
|
|
73
|
-
ALLSANFILE = data_file("allsans.pem")
|
|
74
|
-
|
|
75
|
-
REMOTE_HOST = "self-signed.pythontest.net"
|
|
76
|
-
|
|
77
|
-
EMPTYCERT = data_file("nullcert.pem")
|
|
78
|
-
BADCERT = data_file("badcert.pem")
|
|
79
|
-
NONEXISTINGCERT = data_file("XXXnonexisting.pem")
|
|
80
|
-
BADKEY = data_file("badkey.pem")
|
|
81
|
-
NOKIACERT = data_file("nokia.pem")
|
|
82
|
-
NULLBYTECERT = data_file("nullbytecert.pem")
|
|
83
|
-
|
|
84
|
-
DHFILE = data_file("dh1024.pem")
|
|
85
|
-
BYTES_DHFILE = os.fsencode(DHFILE)
|
|
86
|
-
|
|
87
|
-
# Not defined in all versions of OpenSSL
|
|
88
|
-
OP_NO_COMPRESSION = getattr(ssl, "OP_NO_COMPRESSION", 0)
|
|
89
|
-
OP_SINGLE_DH_USE = getattr(ssl, "OP_SINGLE_DH_USE", 0)
|
|
90
|
-
OP_SINGLE_ECDH_USE = getattr(ssl, "OP_SINGLE_ECDH_USE", 0)
|
|
91
|
-
OP_CIPHER_SERVER_PREFERENCE = getattr(ssl, "OP_CIPHER_SERVER_PREFERENCE", 0)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
def handle_error(prefix):
|
|
95
|
-
exc_format = ' '.join(traceback.format_exception(*sys.exc_info()))
|
|
96
|
-
if support.verbose:
|
|
97
|
-
sys.stdout.write(prefix + exc_format)
|
|
98
|
-
|
|
99
|
-
def can_clear_options():
|
|
100
|
-
# 0.9.8m or higher
|
|
101
|
-
return ssl._OPENSSL_API_VERSION >= (0, 9, 8, 13, 15)
|
|
102
|
-
|
|
103
|
-
def no_sslv2_implies_sslv3_hello():
|
|
104
|
-
# 0.9.7h or higher
|
|
105
|
-
return ssl.OPENSSL_VERSION_INFO >= (0, 9, 7, 8, 15)
|
|
106
|
-
|
|
107
|
-
def have_verify_flags():
|
|
108
|
-
# 0.9.8 or higher
|
|
109
|
-
return ssl.OPENSSL_VERSION_INFO >= (0, 9, 8, 0, 15)
|
|
110
|
-
|
|
111
|
-
def utc_offset(): #NOTE: ignore issues like #1647654
|
|
112
|
-
# local time = utc time + utc offset
|
|
113
|
-
if time.daylight and time.localtime().tm_isdst > 0:
|
|
114
|
-
return -time.altzone # seconds
|
|
115
|
-
return -time.timezone
|
|
116
|
-
|
|
117
|
-
def asn1time(cert_time):
|
|
118
|
-
# Some versions of OpenSSL ignore seconds, see #18207
|
|
119
|
-
# 0.9.8.i
|
|
120
|
-
if ssl._OPENSSL_API_VERSION == (0, 9, 8, 9, 15):
|
|
121
|
-
fmt = "%b %d %H:%M:%S %Y GMT"
|
|
122
|
-
dt = datetime.datetime.strptime(cert_time, fmt)
|
|
123
|
-
dt = dt.replace(second=0)
|
|
124
|
-
cert_time = dt.strftime(fmt)
|
|
125
|
-
# %d adds leading zero but ASN1_TIME_print() uses leading space
|
|
126
|
-
if cert_time[4] == "0":
|
|
127
|
-
cert_time = cert_time[:4] + " " + cert_time[5:]
|
|
128
|
-
|
|
129
|
-
return cert_time
|
|
130
|
-
|
|
131
|
-
# Issue #9415: Ubuntu hijacks their OpenSSL and forcefully disables SSLv2
|
|
132
|
-
def skip_if_broken_ubuntu_ssl(func):
|
|
133
|
-
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
134
|
-
@functools.wraps(func)
|
|
135
|
-
def f(*args, **kwargs):
|
|
136
|
-
try:
|
|
137
|
-
ssl.SSLContext(ssl.PROTOCOL_SSLv2)
|
|
138
|
-
except ssl.SSLError:
|
|
139
|
-
if (ssl.OPENSSL_VERSION_INFO == (0, 9, 8, 15, 15) and
|
|
140
|
-
platform.linux_distribution() == ('debian', 'squeeze/sid', '')):
|
|
141
|
-
raise unittest.SkipTest("Patched Ubuntu OpenSSL breaks behaviour")
|
|
142
|
-
return func(*args, **kwargs)
|
|
143
|
-
return f
|
|
144
|
-
else:
|
|
145
|
-
return func
|
|
146
|
-
|
|
147
|
-
needs_sni = unittest.skipUnless(ssl.HAS_SNI, "SNI support needed for this test")
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
def test_wrap_socket(sock, ssl_version=ssl.PROTOCOL_TLS, *,
|
|
151
|
-
cert_reqs=ssl.CERT_NONE, ca_certs=None,
|
|
152
|
-
ciphers=None, certfile=None, keyfile=None,
|
|
153
|
-
**kwargs):
|
|
154
|
-
context = ssl.SSLContext(ssl_version)
|
|
155
|
-
if cert_reqs is not None:
|
|
156
|
-
context.verify_mode = cert_reqs
|
|
157
|
-
if ca_certs is not None:
|
|
158
|
-
context.load_verify_locations(ca_certs)
|
|
159
|
-
if certfile is not None or keyfile is not None:
|
|
160
|
-
context.load_cert_chain(certfile, keyfile)
|
|
161
|
-
if ciphers is not None:
|
|
162
|
-
context.set_ciphers(ciphers)
|
|
163
|
-
return context.wrap_socket(sock, **kwargs)
|
|
164
|
-
|
|
165
|
-
class BasicSocketTests(unittest.TestCase):
|
|
166
|
-
|
|
167
|
-
def test_constants(self):
|
|
168
|
-
ssl.CERT_NONE
|
|
169
|
-
ssl.CERT_OPTIONAL
|
|
170
|
-
ssl.CERT_REQUIRED
|
|
171
|
-
ssl.OP_CIPHER_SERVER_PREFERENCE
|
|
172
|
-
ssl.OP_SINGLE_DH_USE
|
|
173
|
-
if ssl.HAS_ECDH:
|
|
174
|
-
ssl.OP_SINGLE_ECDH_USE
|
|
175
|
-
if ssl.OPENSSL_VERSION_INFO >= (1, 0):
|
|
176
|
-
ssl.OP_NO_COMPRESSION
|
|
177
|
-
self.assertIn(ssl.HAS_SNI, {True, False})
|
|
178
|
-
self.assertIn(ssl.HAS_ECDH, {True, False})
|
|
179
|
-
ssl.OP_NO_SSLv2
|
|
180
|
-
ssl.OP_NO_SSLv3
|
|
181
|
-
ssl.OP_NO_TLSv1
|
|
182
|
-
ssl.OP_NO_TLSv1_3
|
|
183
|
-
if ssl.OPENSSL_VERSION_INFO >= (1, 0, 1):
|
|
184
|
-
ssl.OP_NO_TLSv1_1
|
|
185
|
-
ssl.OP_NO_TLSv1_2
|
|
186
|
-
|
|
187
|
-
def test_str_for_enums(self):
|
|
188
|
-
# Make sure that the PROTOCOL_* constants have enum-like string
|
|
189
|
-
# reprs.
|
|
190
|
-
proto = ssl.PROTOCOL_TLS
|
|
191
|
-
self.assertEqual(str(proto), '_SSLMethod.PROTOCOL_TLS')
|
|
192
|
-
ctx = ssl.SSLContext(proto)
|
|
193
|
-
self.assertIs(ctx.protocol, proto)
|
|
194
|
-
|
|
195
|
-
def test_random(self):
|
|
196
|
-
v = ssl.RAND_status()
|
|
197
|
-
if support.verbose:
|
|
198
|
-
sys.stdout.write("\n RAND_status is %d (%s)\n"
|
|
199
|
-
% (v, (v and "sufficient randomness") or
|
|
200
|
-
"insufficient randomness"))
|
|
201
|
-
|
|
202
|
-
data, is_cryptographic = ssl.RAND_pseudo_bytes(16)
|
|
203
|
-
self.assertEqual(len(data), 16)
|
|
204
|
-
self.assertEqual(is_cryptographic, v == 1)
|
|
205
|
-
if v:
|
|
206
|
-
data = ssl.RAND_bytes(16)
|
|
207
|
-
self.assertEqual(len(data), 16)
|
|
208
|
-
else:
|
|
209
|
-
self.assertRaises(ssl.SSLError, ssl.RAND_bytes, 16)
|
|
210
|
-
|
|
211
|
-
# negative num is invalid
|
|
212
|
-
self.assertRaises(ValueError, ssl.RAND_bytes, -5)
|
|
213
|
-
self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5)
|
|
214
|
-
|
|
215
|
-
if hasattr(ssl, 'RAND_egd'):
|
|
216
|
-
self.assertRaises(TypeError, ssl.RAND_egd, 1)
|
|
217
|
-
self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
|
|
218
|
-
ssl.RAND_add("this is a random string", 75.0)
|
|
219
|
-
ssl.RAND_add(b"this is a random bytes object", 75.0)
|
|
220
|
-
ssl.RAND_add(bytearray(b"this is a random bytearray object"), 75.0)
|
|
221
|
-
|
|
222
|
-
@unittest.skipUnless(os.name == 'posix', 'requires posix')
|
|
223
|
-
def test_random_fork(self):
|
|
224
|
-
status = ssl.RAND_status()
|
|
225
|
-
if not status:
|
|
226
|
-
self.fail("OpenSSL's PRNG has insufficient randomness")
|
|
227
|
-
|
|
228
|
-
rfd, wfd = os.pipe()
|
|
229
|
-
pid = os.fork()
|
|
230
|
-
if pid == 0:
|
|
231
|
-
try:
|
|
232
|
-
os.close(rfd)
|
|
233
|
-
child_random = ssl.RAND_pseudo_bytes(16)[0]
|
|
234
|
-
self.assertEqual(len(child_random), 16)
|
|
235
|
-
os.write(wfd, child_random)
|
|
236
|
-
os.close(wfd)
|
|
237
|
-
except BaseException:
|
|
238
|
-
os._exit(1)
|
|
239
|
-
else:
|
|
240
|
-
os._exit(0)
|
|
241
|
-
else:
|
|
242
|
-
os.close(wfd)
|
|
243
|
-
self.addCleanup(os.close, rfd)
|
|
244
|
-
_, status = os.waitpid(pid, 0)
|
|
245
|
-
self.assertEqual(status, 0)
|
|
246
|
-
|
|
247
|
-
child_random = os.read(rfd, 16)
|
|
248
|
-
self.assertEqual(len(child_random), 16)
|
|
249
|
-
parent_random = ssl.RAND_pseudo_bytes(16)[0]
|
|
250
|
-
self.assertEqual(len(parent_random), 16)
|
|
251
|
-
|
|
252
|
-
self.assertNotEqual(child_random, parent_random)
|
|
253
|
-
|
|
254
|
-
def test_parse_cert(self):
|
|
255
|
-
# note that this uses an 'unofficial' function in _ssl.c,
|
|
256
|
-
# provided solely for this test, to exercise the certificate
|
|
257
|
-
# parsing code
|
|
258
|
-
p = ssl._ssl._test_decode_cert(CERTFILE)
|
|
259
|
-
if support.verbose:
|
|
260
|
-
sys.stdout.write("\n" + pprint.pformat(p) + "\n")
|
|
261
|
-
self.assertEqual(p['issuer'],
|
|
262
|
-
((('countryName', 'XY'),),
|
|
263
|
-
(('localityName', 'Castle Anthrax'),),
|
|
264
|
-
(('organizationName', 'Python Software Foundation'),),
|
|
265
|
-
(('commonName', 'localhost'),))
|
|
266
|
-
)
|
|
267
|
-
# Note the next three asserts will fail if the keys are regenerated
|
|
268
|
-
self.assertEqual(p['notAfter'], asn1time('Oct 5 23:01:56 2020 GMT'))
|
|
269
|
-
self.assertEqual(p['notBefore'], asn1time('Oct 8 23:01:56 2010 GMT'))
|
|
270
|
-
self.assertEqual(p['serialNumber'], 'D7C7381919AFC24E')
|
|
271
|
-
self.assertEqual(p['subject'],
|
|
272
|
-
((('countryName', 'XY'),),
|
|
273
|
-
(('localityName', 'Castle Anthrax'),),
|
|
274
|
-
(('organizationName', 'Python Software Foundation'),),
|
|
275
|
-
(('commonName', 'localhost'),))
|
|
276
|
-
)
|
|
277
|
-
self.assertEqual(p['subjectAltName'], (('DNS', 'localhost'),))
|
|
278
|
-
# Issue #13034: the subjectAltName in some certificates
|
|
279
|
-
# (notably projects.developer.nokia.com:443) wasn't parsed
|
|
280
|
-
p = ssl._ssl._test_decode_cert(NOKIACERT)
|
|
281
|
-
if support.verbose:
|
|
282
|
-
sys.stdout.write("\n" + pprint.pformat(p) + "\n")
|
|
283
|
-
self.assertEqual(p['subjectAltName'],
|
|
284
|
-
(('DNS', 'projects.developer.nokia.com'),
|
|
285
|
-
('DNS', 'projects.forum.nokia.com'))
|
|
286
|
-
)
|
|
287
|
-
# extra OCSP and AIA fields
|
|
288
|
-
self.assertEqual(p['OCSP'], ('http://ocsp.verisign.com',))
|
|
289
|
-
self.assertEqual(p['caIssuers'],
|
|
290
|
-
('http://SVRIntl-G3-aia.verisign.com/SVRIntlG3.cer',))
|
|
291
|
-
self.assertEqual(p['crlDistributionPoints'],
|
|
292
|
-
('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',))
|
|
293
|
-
|
|
294
|
-
def test_parse_cert_CVE_2013_4238(self):
|
|
295
|
-
p = ssl._ssl._test_decode_cert(NULLBYTECERT)
|
|
296
|
-
if support.verbose:
|
|
297
|
-
sys.stdout.write("\n" + pprint.pformat(p) + "\n")
|
|
298
|
-
subject = ((('countryName', 'US'),),
|
|
299
|
-
(('stateOrProvinceName', 'Oregon'),),
|
|
300
|
-
(('localityName', 'Beaverton'),),
|
|
301
|
-
(('organizationName', 'Python Software Foundation'),),
|
|
302
|
-
(('organizationalUnitName', 'Python Core Development'),),
|
|
303
|
-
(('commonName', 'null.python.org\x00example.org'),),
|
|
304
|
-
(('emailAddress', 'python-dev@python.org'),))
|
|
305
|
-
self.assertEqual(p['subject'], subject)
|
|
306
|
-
self.assertEqual(p['issuer'], subject)
|
|
307
|
-
if ssl._OPENSSL_API_VERSION >= (0, 9, 8):
|
|
308
|
-
san = (('DNS', 'altnull.python.org\x00example.com'),
|
|
309
|
-
('email', 'null@python.org\x00user@example.org'),
|
|
310
|
-
('URI', 'http://null.python.org\x00http://example.org'),
|
|
311
|
-
('IP Address', '192.0.2.1'),
|
|
312
|
-
('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
|
|
313
|
-
else:
|
|
314
|
-
# OpenSSL 0.9.7 doesn't support IPv6 addresses in subjectAltName
|
|
315
|
-
san = (('DNS', 'altnull.python.org\x00example.com'),
|
|
316
|
-
('email', 'null@python.org\x00user@example.org'),
|
|
317
|
-
('URI', 'http://null.python.org\x00http://example.org'),
|
|
318
|
-
('IP Address', '192.0.2.1'),
|
|
319
|
-
('IP Address', '<invalid>'))
|
|
320
|
-
|
|
321
|
-
self.assertEqual(p['subjectAltName'], san)
|
|
322
|
-
|
|
323
|
-
def test_parse_all_sans(self):
|
|
324
|
-
p = ssl._ssl._test_decode_cert(ALLSANFILE)
|
|
325
|
-
self.assertEqual(p['subjectAltName'],
|
|
326
|
-
(
|
|
327
|
-
('DNS', 'allsans'),
|
|
328
|
-
('othername', '<unsupported>'),
|
|
329
|
-
('othername', '<unsupported>'),
|
|
330
|
-
('email', 'user@example.org'),
|
|
331
|
-
('DNS', 'www.example.org'),
|
|
332
|
-
('DirName',
|
|
333
|
-
((('countryName', 'XY'),),
|
|
334
|
-
(('localityName', 'Castle Anthrax'),),
|
|
335
|
-
(('organizationName', 'Python Software Foundation'),),
|
|
336
|
-
(('commonName', 'dirname example'),))),
|
|
337
|
-
('URI', 'https://www.python.org/'),
|
|
338
|
-
('IP Address', '127.0.0.1'),
|
|
339
|
-
('IP Address', '0:0:0:0:0:0:0:1\n'),
|
|
340
|
-
('Registered ID', '1.2.3.4.5')
|
|
341
|
-
)
|
|
342
|
-
)
|
|
343
|
-
|
|
344
|
-
def test_DER_to_PEM(self):
|
|
345
|
-
with open(CAFILE_CACERT, 'r') as f:
|
|
346
|
-
pem = f.read()
|
|
347
|
-
d1 = ssl.PEM_cert_to_DER_cert(pem)
|
|
348
|
-
p2 = ssl.DER_cert_to_PEM_cert(d1)
|
|
349
|
-
d2 = ssl.PEM_cert_to_DER_cert(p2)
|
|
350
|
-
self.assertEqual(d1, d2)
|
|
351
|
-
if not p2.startswith(ssl.PEM_HEADER + '\n'):
|
|
352
|
-
self.fail("DER-to-PEM didn't include correct header:\n%r\n" % p2)
|
|
353
|
-
if not p2.endswith('\n' + ssl.PEM_FOOTER + '\n'):
|
|
354
|
-
self.fail("DER-to-PEM didn't include correct footer:\n%r\n" % p2)
|
|
355
|
-
|
|
356
|
-
def test_openssl_version(self):
|
|
357
|
-
n = ssl.OPENSSL_VERSION_NUMBER
|
|
358
|
-
t = ssl.OPENSSL_VERSION_INFO
|
|
359
|
-
s = ssl.OPENSSL_VERSION
|
|
360
|
-
self.assertIsInstance(n, int)
|
|
361
|
-
self.assertIsInstance(t, tuple)
|
|
362
|
-
self.assertIsInstance(s, str)
|
|
363
|
-
# Some sanity checks follow
|
|
364
|
-
# >= 0.9
|
|
365
|
-
self.assertGreaterEqual(n, 0x900000)
|
|
366
|
-
# < 3.0
|
|
367
|
-
self.assertLess(n, 0x30000000)
|
|
368
|
-
major, minor, fix, patch, status = t
|
|
369
|
-
self.assertGreaterEqual(major, 0)
|
|
370
|
-
self.assertLess(major, 3)
|
|
371
|
-
self.assertGreaterEqual(minor, 0)
|
|
372
|
-
self.assertLess(minor, 256)
|
|
373
|
-
self.assertGreaterEqual(fix, 0)
|
|
374
|
-
self.assertLess(fix, 256)
|
|
375
|
-
self.assertGreaterEqual(patch, 0)
|
|
376
|
-
self.assertLessEqual(patch, 63)
|
|
377
|
-
self.assertGreaterEqual(status, 0)
|
|
378
|
-
self.assertLessEqual(status, 15)
|
|
379
|
-
# Version string as returned by {Open,Libre}SSL, the format might change
|
|
380
|
-
if IS_LIBRESSL:
|
|
381
|
-
self.assertTrue(s.startswith("LibreSSL {:d}".format(major)),
|
|
382
|
-
(s, t, hex(n)))
|
|
383
|
-
else:
|
|
384
|
-
self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
|
|
385
|
-
(s, t, hex(n)))
|
|
386
|
-
|
|
387
|
-
@support.cpython_only
|
|
388
|
-
def test_refcycle(self):
|
|
389
|
-
# Issue #7943: an SSL object doesn't create reference cycles with
|
|
390
|
-
# itself.
|
|
391
|
-
s = socket.socket(socket.AF_INET)
|
|
392
|
-
ss = test_wrap_socket(s)
|
|
393
|
-
wr = weakref.ref(ss)
|
|
394
|
-
with support.check_warnings(("", ResourceWarning)):
|
|
395
|
-
del ss
|
|
396
|
-
self.assertEqual(wr(), None)
|
|
397
|
-
|
|
398
|
-
def test_wrapped_unconnected(self):
|
|
399
|
-
# Methods on an unconnected SSLSocket propagate the original
|
|
400
|
-
# OSError raise by the underlying socket object.
|
|
401
|
-
s = socket.socket(socket.AF_INET)
|
|
402
|
-
with test_wrap_socket(s) as ss:
|
|
403
|
-
self.assertRaises(OSError, ss.recv, 1)
|
|
404
|
-
self.assertRaises(OSError, ss.recv_into, bytearray(b'x'))
|
|
405
|
-
self.assertRaises(OSError, ss.recvfrom, 1)
|
|
406
|
-
self.assertRaises(OSError, ss.recvfrom_into, bytearray(b'x'), 1)
|
|
407
|
-
self.assertRaises(OSError, ss.send, b'x')
|
|
408
|
-
self.assertRaises(OSError, ss.sendto, b'x', ('0.0.0.0', 0))
|
|
409
|
-
|
|
410
|
-
def test_timeout(self):
|
|
411
|
-
# Issue #8524: when creating an SSL socket, the timeout of the
|
|
412
|
-
# original socket should be retained.
|
|
413
|
-
for timeout in (None, 0.0, 5.0):
|
|
414
|
-
s = socket.socket(socket.AF_INET)
|
|
415
|
-
s.settimeout(timeout)
|
|
416
|
-
with test_wrap_socket(s) as ss:
|
|
417
|
-
self.assertEqual(timeout, ss.gettimeout())
|
|
418
|
-
|
|
419
|
-
def test_errors_sslwrap(self):
|
|
420
|
-
sock = socket.socket()
|
|
421
|
-
self.assertRaisesRegex(ValueError,
|
|
422
|
-
"certfile must be specified",
|
|
423
|
-
ssl.wrap_socket, sock, keyfile=CERTFILE)
|
|
424
|
-
self.assertRaisesRegex(ValueError,
|
|
425
|
-
"certfile must be specified for server-side operations",
|
|
426
|
-
ssl.wrap_socket, sock, server_side=True)
|
|
427
|
-
self.assertRaisesRegex(ValueError,
|
|
428
|
-
"certfile must be specified for server-side operations",
|
|
429
|
-
ssl.wrap_socket, sock, server_side=True, certfile="")
|
|
430
|
-
with ssl.wrap_socket(sock, server_side=True, certfile=CERTFILE) as s:
|
|
431
|
-
self.assertRaisesRegex(ValueError, "can't connect in server-side mode",
|
|
432
|
-
s.connect, (HOST, 8080))
|
|
433
|
-
with self.assertRaises(OSError) as cm:
|
|
434
|
-
with socket.socket() as sock:
|
|
435
|
-
ssl.wrap_socket(sock, certfile=NONEXISTINGCERT)
|
|
436
|
-
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
437
|
-
with self.assertRaises(OSError) as cm:
|
|
438
|
-
with socket.socket() as sock:
|
|
439
|
-
ssl.wrap_socket(sock,
|
|
440
|
-
certfile=CERTFILE, keyfile=NONEXISTINGCERT)
|
|
441
|
-
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
442
|
-
with self.assertRaises(OSError) as cm:
|
|
443
|
-
with socket.socket() as sock:
|
|
444
|
-
ssl.wrap_socket(sock,
|
|
445
|
-
certfile=NONEXISTINGCERT, keyfile=NONEXISTINGCERT)
|
|
446
|
-
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
447
|
-
|
|
448
|
-
def bad_cert_test(self, certfile):
|
|
449
|
-
"""Check that trying to use the given client certificate fails"""
|
|
450
|
-
certfile = os.path.join(os.path.dirname(__file__) or os.curdir,
|
|
451
|
-
certfile)
|
|
452
|
-
sock = socket.socket()
|
|
453
|
-
self.addCleanup(sock.close)
|
|
454
|
-
with self.assertRaises(ssl.SSLError):
|
|
455
|
-
test_wrap_socket(sock,
|
|
456
|
-
certfile=certfile,
|
|
457
|
-
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
458
|
-
|
|
459
|
-
def test_empty_cert(self):
|
|
460
|
-
"""Wrapping with an empty cert file"""
|
|
461
|
-
self.bad_cert_test("nullcert.pem")
|
|
462
|
-
|
|
463
|
-
def test_malformed_cert(self):
|
|
464
|
-
"""Wrapping with a badly formatted certificate (syntax error)"""
|
|
465
|
-
self.bad_cert_test("badcert.pem")
|
|
466
|
-
|
|
467
|
-
def test_malformed_key(self):
|
|
468
|
-
"""Wrapping with a badly formatted key (syntax error)"""
|
|
469
|
-
self.bad_cert_test("badkey.pem")
|
|
470
|
-
|
|
471
|
-
def test_match_hostname(self):
|
|
472
|
-
def ok(cert, hostname):
|
|
473
|
-
ssl.match_hostname(cert, hostname)
|
|
474
|
-
def fail(cert, hostname):
|
|
475
|
-
self.assertRaises(ssl.CertificateError,
|
|
476
|
-
ssl.match_hostname, cert, hostname)
|
|
477
|
-
|
|
478
|
-
# -- Hostname matching --
|
|
479
|
-
|
|
480
|
-
cert = {'subject': ((('commonName', 'example.com'),),)}
|
|
481
|
-
ok(cert, 'example.com')
|
|
482
|
-
ok(cert, 'ExAmple.cOm')
|
|
483
|
-
fail(cert, 'www.example.com')
|
|
484
|
-
fail(cert, '.example.com')
|
|
485
|
-
fail(cert, 'example.org')
|
|
486
|
-
fail(cert, 'exampleXcom')
|
|
487
|
-
|
|
488
|
-
cert = {'subject': ((('commonName', '*.a.com'),),)}
|
|
489
|
-
ok(cert, 'foo.a.com')
|
|
490
|
-
fail(cert, 'bar.foo.a.com')
|
|
491
|
-
fail(cert, 'a.com')
|
|
492
|
-
fail(cert, 'Xa.com')
|
|
493
|
-
fail(cert, '.a.com')
|
|
494
|
-
|
|
495
|
-
# only match one left-most wildcard
|
|
496
|
-
cert = {'subject': ((('commonName', 'f*.com'),),)}
|
|
497
|
-
ok(cert, 'foo.com')
|
|
498
|
-
ok(cert, 'f.com')
|
|
499
|
-
fail(cert, 'bar.com')
|
|
500
|
-
fail(cert, 'foo.a.com')
|
|
501
|
-
fail(cert, 'bar.foo.com')
|
|
502
|
-
|
|
503
|
-
# NULL bytes are bad, CVE-2013-4073
|
|
504
|
-
cert = {'subject': ((('commonName',
|
|
505
|
-
'null.python.org\x00example.org'),),)}
|
|
506
|
-
ok(cert, 'null.python.org\x00example.org') # or raise an error?
|
|
507
|
-
fail(cert, 'example.org')
|
|
508
|
-
fail(cert, 'null.python.org')
|
|
509
|
-
|
|
510
|
-
# error cases with wildcards
|
|
511
|
-
cert = {'subject': ((('commonName', '*.*.a.com'),),)}
|
|
512
|
-
fail(cert, 'bar.foo.a.com')
|
|
513
|
-
fail(cert, 'a.com')
|
|
514
|
-
fail(cert, 'Xa.com')
|
|
515
|
-
fail(cert, '.a.com')
|
|
516
|
-
|
|
517
|
-
cert = {'subject': ((('commonName', 'a.*.com'),),)}
|
|
518
|
-
fail(cert, 'a.foo.com')
|
|
519
|
-
fail(cert, 'a..com')
|
|
520
|
-
fail(cert, 'a.com')
|
|
521
|
-
|
|
522
|
-
# wildcard doesn't match IDNA prefix 'xn--'
|
|
523
|
-
idna = 'püthon.python.org'.encode("idna").decode("ascii")
|
|
524
|
-
cert = {'subject': ((('commonName', idna),),)}
|
|
525
|
-
ok(cert, idna)
|
|
526
|
-
cert = {'subject': ((('commonName', 'x*.python.org'),),)}
|
|
527
|
-
fail(cert, idna)
|
|
528
|
-
cert = {'subject': ((('commonName', 'xn--p*.python.org'),),)}
|
|
529
|
-
fail(cert, idna)
|
|
530
|
-
|
|
531
|
-
# wildcard in first fragment and IDNA A-labels in sequent fragments
|
|
532
|
-
# are supported.
|
|
533
|
-
idna = 'www*.pythön.org'.encode("idna").decode("ascii")
|
|
534
|
-
cert = {'subject': ((('commonName', idna),),)}
|
|
535
|
-
ok(cert, 'www.pythön.org'.encode("idna").decode("ascii"))
|
|
536
|
-
ok(cert, 'www1.pythön.org'.encode("idna").decode("ascii"))
|
|
537
|
-
fail(cert, 'ftp.pythön.org'.encode("idna").decode("ascii"))
|
|
538
|
-
fail(cert, 'pythön.org'.encode("idna").decode("ascii"))
|
|
539
|
-
|
|
540
|
-
# Slightly fake real-world example
|
|
541
|
-
cert = {'notAfter': 'Jun 26 21:41:46 2011 GMT',
|
|
542
|
-
'subject': ((('commonName', 'linuxfrz.org'),),),
|
|
543
|
-
'subjectAltName': (('DNS', 'linuxfr.org'),
|
|
544
|
-
('DNS', 'linuxfr.com'),
|
|
545
|
-
('othername', '<unsupported>'))}
|
|
546
|
-
ok(cert, 'linuxfr.org')
|
|
547
|
-
ok(cert, 'linuxfr.com')
|
|
548
|
-
# Not a "DNS" entry
|
|
549
|
-
fail(cert, '<unsupported>')
|
|
550
|
-
# When there is a subjectAltName, commonName isn't used
|
|
551
|
-
fail(cert, 'linuxfrz.org')
|
|
552
|
-
|
|
553
|
-
# A pristine real-world example
|
|
554
|
-
cert = {'notAfter': 'Dec 18 23:59:59 2011 GMT',
|
|
555
|
-
'subject': ((('countryName', 'US'),),
|
|
556
|
-
(('stateOrProvinceName', 'California'),),
|
|
557
|
-
(('localityName', 'Mountain View'),),
|
|
558
|
-
(('organizationName', 'Google Inc'),),
|
|
559
|
-
(('commonName', 'mail.google.com'),))}
|
|
560
|
-
ok(cert, 'mail.google.com')
|
|
561
|
-
fail(cert, 'gmail.com')
|
|
562
|
-
# Only commonName is considered
|
|
563
|
-
fail(cert, 'California')
|
|
564
|
-
|
|
565
|
-
# -- IPv4 matching --
|
|
566
|
-
cert = {'subject': ((('commonName', 'example.com'),),),
|
|
567
|
-
'subjectAltName': (('DNS', 'example.com'),
|
|
568
|
-
('IP Address', '10.11.12.13'),
|
|
569
|
-
('IP Address', '14.15.16.17'))}
|
|
570
|
-
ok(cert, '10.11.12.13')
|
|
571
|
-
ok(cert, '14.15.16.17')
|
|
572
|
-
fail(cert, '14.15.16.18')
|
|
573
|
-
fail(cert, 'example.net')
|
|
574
|
-
|
|
575
|
-
# -- IPv6 matching --
|
|
576
|
-
cert = {'subject': ((('commonName', 'example.com'),),),
|
|
577
|
-
'subjectAltName': (('DNS', 'example.com'),
|
|
578
|
-
('IP Address', '2001:0:0:0:0:0:0:CAFE\n'),
|
|
579
|
-
('IP Address', '2003:0:0:0:0:0:0:BABA\n'))}
|
|
580
|
-
ok(cert, '2001::cafe')
|
|
581
|
-
ok(cert, '2003::baba')
|
|
582
|
-
fail(cert, '2003::bebe')
|
|
583
|
-
fail(cert, 'example.net')
|
|
584
|
-
|
|
585
|
-
# -- Miscellaneous --
|
|
586
|
-
|
|
587
|
-
# Neither commonName nor subjectAltName
|
|
588
|
-
cert = {'notAfter': 'Dec 18 23:59:59 2011 GMT',
|
|
589
|
-
'subject': ((('countryName', 'US'),),
|
|
590
|
-
(('stateOrProvinceName', 'California'),),
|
|
591
|
-
(('localityName', 'Mountain View'),),
|
|
592
|
-
(('organizationName', 'Google Inc'),))}
|
|
593
|
-
fail(cert, 'mail.google.com')
|
|
594
|
-
|
|
595
|
-
# No DNS entry in subjectAltName but a commonName
|
|
596
|
-
cert = {'notAfter': 'Dec 18 23:59:59 2099 GMT',
|
|
597
|
-
'subject': ((('countryName', 'US'),),
|
|
598
|
-
(('stateOrProvinceName', 'California'),),
|
|
599
|
-
(('localityName', 'Mountain View'),),
|
|
600
|
-
(('commonName', 'mail.google.com'),)),
|
|
601
|
-
'subjectAltName': (('othername', 'blabla'), )}
|
|
602
|
-
ok(cert, 'mail.google.com')
|
|
603
|
-
|
|
604
|
-
# No DNS entry subjectAltName and no commonName
|
|
605
|
-
cert = {'notAfter': 'Dec 18 23:59:59 2099 GMT',
|
|
606
|
-
'subject': ((('countryName', 'US'),),
|
|
607
|
-
(('stateOrProvinceName', 'California'),),
|
|
608
|
-
(('localityName', 'Mountain View'),),
|
|
609
|
-
(('organizationName', 'Google Inc'),)),
|
|
610
|
-
'subjectAltName': (('othername', 'blabla'),)}
|
|
611
|
-
fail(cert, 'google.com')
|
|
612
|
-
|
|
613
|
-
# Empty cert / no cert
|
|
614
|
-
self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com')
|
|
615
|
-
self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com')
|
|
616
|
-
|
|
617
|
-
# Issue #17980: avoid denials of service by refusing more than one
|
|
618
|
-
# wildcard per fragment.
|
|
619
|
-
cert = {'subject': ((('commonName', 'a*b.com'),),)}
|
|
620
|
-
ok(cert, 'axxb.com')
|
|
621
|
-
cert = {'subject': ((('commonName', 'a*b.co*'),),)}
|
|
622
|
-
fail(cert, 'axxb.com')
|
|
623
|
-
cert = {'subject': ((('commonName', 'a*b*.com'),),)}
|
|
624
|
-
with self.assertRaises(ssl.CertificateError) as cm:
|
|
625
|
-
ssl.match_hostname(cert, 'axxbxxc.com')
|
|
626
|
-
self.assertIn("too many wildcards", str(cm.exception))
|
|
627
|
-
|
|
628
|
-
def test_server_side(self):
|
|
629
|
-
# server_hostname doesn't work for server sockets
|
|
630
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
631
|
-
with socket.socket() as sock:
|
|
632
|
-
self.assertRaises(ValueError, ctx.wrap_socket, sock, True,
|
|
633
|
-
server_hostname="some.hostname")
|
|
634
|
-
|
|
635
|
-
def test_unknown_channel_binding(self):
|
|
636
|
-
# should raise ValueError for unknown type
|
|
637
|
-
s = socket.socket(socket.AF_INET)
|
|
638
|
-
s.bind(('127.0.0.1', 0))
|
|
639
|
-
s.listen()
|
|
640
|
-
c = socket.socket(socket.AF_INET)
|
|
641
|
-
c.connect(s.getsockname())
|
|
642
|
-
with test_wrap_socket(c, do_handshake_on_connect=False) as ss:
|
|
643
|
-
with self.assertRaises(ValueError):
|
|
644
|
-
ss.get_channel_binding("unknown-type")
|
|
645
|
-
s.close()
|
|
646
|
-
|
|
647
|
-
@unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
|
|
648
|
-
"'tls-unique' channel binding not available")
|
|
649
|
-
def test_tls_unique_channel_binding(self):
|
|
650
|
-
# unconnected should return None for known type
|
|
651
|
-
s = socket.socket(socket.AF_INET)
|
|
652
|
-
with test_wrap_socket(s) as ss:
|
|
653
|
-
self.assertIsNone(ss.get_channel_binding("tls-unique"))
|
|
654
|
-
# the same for server-side
|
|
655
|
-
s = socket.socket(socket.AF_INET)
|
|
656
|
-
with test_wrap_socket(s, server_side=True, certfile=CERTFILE) as ss:
|
|
657
|
-
self.assertIsNone(ss.get_channel_binding("tls-unique"))
|
|
658
|
-
|
|
659
|
-
def test_dealloc_warn(self):
|
|
660
|
-
ss = test_wrap_socket(socket.socket(socket.AF_INET))
|
|
661
|
-
r = repr(ss)
|
|
662
|
-
with self.assertWarns(ResourceWarning) as cm:
|
|
663
|
-
ss = None
|
|
664
|
-
support.gc_collect()
|
|
665
|
-
self.assertIn(r, str(cm.warning.args[0]))
|
|
666
|
-
|
|
667
|
-
def test_get_default_verify_paths(self):
|
|
668
|
-
paths = ssl.get_default_verify_paths()
|
|
669
|
-
self.assertEqual(len(paths), 6)
|
|
670
|
-
self.assertIsInstance(paths, ssl.DefaultVerifyPaths)
|
|
671
|
-
|
|
672
|
-
with support.EnvironmentVarGuard() as env:
|
|
673
|
-
env["SSL_CERT_DIR"] = CAPATH
|
|
674
|
-
env["SSL_CERT_FILE"] = CERTFILE
|
|
675
|
-
paths = ssl.get_default_verify_paths()
|
|
676
|
-
self.assertEqual(paths.cafile, CERTFILE)
|
|
677
|
-
self.assertEqual(paths.capath, CAPATH)
|
|
678
|
-
|
|
679
|
-
@unittest.skipUnless(sys.platform == "win32", "Windows specific")
|
|
680
|
-
def test_enum_certificates(self):
|
|
681
|
-
self.assertTrue(ssl.enum_certificates("CA"))
|
|
682
|
-
self.assertTrue(ssl.enum_certificates("ROOT"))
|
|
683
|
-
|
|
684
|
-
self.assertRaises(TypeError, ssl.enum_certificates)
|
|
685
|
-
self.assertRaises(WindowsError, ssl.enum_certificates, "")
|
|
686
|
-
|
|
687
|
-
trust_oids = set()
|
|
688
|
-
for storename in ("CA", "ROOT"):
|
|
689
|
-
store = ssl.enum_certificates(storename)
|
|
690
|
-
self.assertIsInstance(store, list)
|
|
691
|
-
for element in store:
|
|
692
|
-
self.assertIsInstance(element, tuple)
|
|
693
|
-
self.assertEqual(len(element), 3)
|
|
694
|
-
cert, enc, trust = element
|
|
695
|
-
self.assertIsInstance(cert, bytes)
|
|
696
|
-
self.assertIn(enc, {"x509_asn", "pkcs_7_asn"})
|
|
697
|
-
self.assertIsInstance(trust, (set, bool))
|
|
698
|
-
if isinstance(trust, set):
|
|
699
|
-
trust_oids.update(trust)
|
|
700
|
-
|
|
701
|
-
serverAuth = "1.3.6.1.5.5.7.3.1"
|
|
702
|
-
self.assertIn(serverAuth, trust_oids)
|
|
703
|
-
|
|
704
|
-
@unittest.skipUnless(sys.platform == "win32", "Windows specific")
|
|
705
|
-
def test_enum_crls(self):
|
|
706
|
-
self.assertTrue(ssl.enum_crls("CA"))
|
|
707
|
-
self.assertRaises(TypeError, ssl.enum_crls)
|
|
708
|
-
self.assertRaises(WindowsError, ssl.enum_crls, "")
|
|
709
|
-
|
|
710
|
-
crls = ssl.enum_crls("CA")
|
|
711
|
-
self.assertIsInstance(crls, list)
|
|
712
|
-
for element in crls:
|
|
713
|
-
self.assertIsInstance(element, tuple)
|
|
714
|
-
self.assertEqual(len(element), 2)
|
|
715
|
-
self.assertIsInstance(element[0], bytes)
|
|
716
|
-
self.assertIn(element[1], {"x509_asn", "pkcs_7_asn"})
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
def test_asn1object(self):
|
|
720
|
-
expected = (129, 'serverAuth', 'TLS Web Server Authentication',
|
|
721
|
-
'1.3.6.1.5.5.7.3.1')
|
|
722
|
-
|
|
723
|
-
val = ssl._ASN1Object('1.3.6.1.5.5.7.3.1')
|
|
724
|
-
self.assertEqual(val, expected)
|
|
725
|
-
self.assertEqual(val.nid, 129)
|
|
726
|
-
self.assertEqual(val.shortname, 'serverAuth')
|
|
727
|
-
self.assertEqual(val.longname, 'TLS Web Server Authentication')
|
|
728
|
-
self.assertEqual(val.oid, '1.3.6.1.5.5.7.3.1')
|
|
729
|
-
self.assertIsInstance(val, ssl._ASN1Object)
|
|
730
|
-
self.assertRaises(ValueError, ssl._ASN1Object, 'serverAuth')
|
|
731
|
-
|
|
732
|
-
val = ssl._ASN1Object.fromnid(129)
|
|
733
|
-
self.assertEqual(val, expected)
|
|
734
|
-
self.assertIsInstance(val, ssl._ASN1Object)
|
|
735
|
-
self.assertRaises(ValueError, ssl._ASN1Object.fromnid, -1)
|
|
736
|
-
with self.assertRaisesRegex(ValueError, "unknown NID 100000"):
|
|
737
|
-
ssl._ASN1Object.fromnid(100000)
|
|
738
|
-
for i in range(1000):
|
|
739
|
-
try:
|
|
740
|
-
obj = ssl._ASN1Object.fromnid(i)
|
|
741
|
-
except ValueError:
|
|
742
|
-
pass
|
|
743
|
-
else:
|
|
744
|
-
self.assertIsInstance(obj.nid, int)
|
|
745
|
-
self.assertIsInstance(obj.shortname, str)
|
|
746
|
-
self.assertIsInstance(obj.longname, str)
|
|
747
|
-
self.assertIsInstance(obj.oid, (str, type(None)))
|
|
748
|
-
|
|
749
|
-
val = ssl._ASN1Object.fromname('TLS Web Server Authentication')
|
|
750
|
-
self.assertEqual(val, expected)
|
|
751
|
-
self.assertIsInstance(val, ssl._ASN1Object)
|
|
752
|
-
self.assertEqual(ssl._ASN1Object.fromname('serverAuth'), expected)
|
|
753
|
-
self.assertEqual(ssl._ASN1Object.fromname('1.3.6.1.5.5.7.3.1'),
|
|
754
|
-
expected)
|
|
755
|
-
with self.assertRaisesRegex(ValueError, "unknown object 'serverauth'"):
|
|
756
|
-
ssl._ASN1Object.fromname('serverauth')
|
|
757
|
-
|
|
758
|
-
def test_purpose_enum(self):
|
|
759
|
-
val = ssl._ASN1Object('1.3.6.1.5.5.7.3.1')
|
|
760
|
-
self.assertIsInstance(ssl.Purpose.SERVER_AUTH, ssl._ASN1Object)
|
|
761
|
-
self.assertEqual(ssl.Purpose.SERVER_AUTH, val)
|
|
762
|
-
self.assertEqual(ssl.Purpose.SERVER_AUTH.nid, 129)
|
|
763
|
-
self.assertEqual(ssl.Purpose.SERVER_AUTH.shortname, 'serverAuth')
|
|
764
|
-
self.assertEqual(ssl.Purpose.SERVER_AUTH.oid,
|
|
765
|
-
'1.3.6.1.5.5.7.3.1')
|
|
766
|
-
|
|
767
|
-
val = ssl._ASN1Object('1.3.6.1.5.5.7.3.2')
|
|
768
|
-
self.assertIsInstance(ssl.Purpose.CLIENT_AUTH, ssl._ASN1Object)
|
|
769
|
-
self.assertEqual(ssl.Purpose.CLIENT_AUTH, val)
|
|
770
|
-
self.assertEqual(ssl.Purpose.CLIENT_AUTH.nid, 130)
|
|
771
|
-
self.assertEqual(ssl.Purpose.CLIENT_AUTH.shortname, 'clientAuth')
|
|
772
|
-
self.assertEqual(ssl.Purpose.CLIENT_AUTH.oid,
|
|
773
|
-
'1.3.6.1.5.5.7.3.2')
|
|
774
|
-
|
|
775
|
-
def test_unsupported_dtls(self):
|
|
776
|
-
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
777
|
-
self.addCleanup(s.close)
|
|
778
|
-
with self.assertRaises(NotImplementedError) as cx:
|
|
779
|
-
test_wrap_socket(s, cert_reqs=ssl.CERT_NONE)
|
|
780
|
-
self.assertEqual(str(cx.exception), "only stream sockets are supported")
|
|
781
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
782
|
-
with self.assertRaises(NotImplementedError) as cx:
|
|
783
|
-
ctx.wrap_socket(s)
|
|
784
|
-
self.assertEqual(str(cx.exception), "only stream sockets are supported")
|
|
785
|
-
|
|
786
|
-
def cert_time_ok(self, timestring, timestamp):
|
|
787
|
-
self.assertEqual(ssl.cert_time_to_seconds(timestring), timestamp)
|
|
788
|
-
|
|
789
|
-
def cert_time_fail(self, timestring):
|
|
790
|
-
with self.assertRaises(ValueError):
|
|
791
|
-
ssl.cert_time_to_seconds(timestring)
|
|
792
|
-
|
|
793
|
-
@unittest.skipUnless(utc_offset(),
|
|
794
|
-
'local time needs to be different from UTC')
|
|
795
|
-
def test_cert_time_to_seconds_timezone(self):
|
|
796
|
-
# Issue #19940: ssl.cert_time_to_seconds() returns wrong
|
|
797
|
-
# results if local timezone is not UTC
|
|
798
|
-
self.cert_time_ok("May 9 00:00:00 2007 GMT", 1178668800.0)
|
|
799
|
-
self.cert_time_ok("Jan 5 09:34:43 2018 GMT", 1515144883.0)
|
|
800
|
-
|
|
801
|
-
def test_cert_time_to_seconds(self):
|
|
802
|
-
timestring = "Jan 5 09:34:43 2018 GMT"
|
|
803
|
-
ts = 1515144883.0
|
|
804
|
-
self.cert_time_ok(timestring, ts)
|
|
805
|
-
# accept keyword parameter, assert its name
|
|
806
|
-
self.assertEqual(ssl.cert_time_to_seconds(cert_time=timestring), ts)
|
|
807
|
-
# accept both %e and %d (space or zero generated by strftime)
|
|
808
|
-
self.cert_time_ok("Jan 05 09:34:43 2018 GMT", ts)
|
|
809
|
-
# case-insensitive
|
|
810
|
-
self.cert_time_ok("JaN 5 09:34:43 2018 GmT", ts)
|
|
811
|
-
self.cert_time_fail("Jan 5 09:34 2018 GMT") # no seconds
|
|
812
|
-
self.cert_time_fail("Jan 5 09:34:43 2018") # no GMT
|
|
813
|
-
self.cert_time_fail("Jan 5 09:34:43 2018 UTC") # not GMT timezone
|
|
814
|
-
self.cert_time_fail("Jan 35 09:34:43 2018 GMT") # invalid day
|
|
815
|
-
self.cert_time_fail("Jon 5 09:34:43 2018 GMT") # invalid month
|
|
816
|
-
self.cert_time_fail("Jan 5 24:00:00 2018 GMT") # invalid hour
|
|
817
|
-
self.cert_time_fail("Jan 5 09:60:43 2018 GMT") # invalid minute
|
|
818
|
-
|
|
819
|
-
newyear_ts = 1230768000.0
|
|
820
|
-
# leap seconds
|
|
821
|
-
self.cert_time_ok("Dec 31 23:59:60 2008 GMT", newyear_ts)
|
|
822
|
-
# same timestamp
|
|
823
|
-
self.cert_time_ok("Jan 1 00:00:00 2009 GMT", newyear_ts)
|
|
824
|
-
|
|
825
|
-
self.cert_time_ok("Jan 5 09:34:59 2018 GMT", 1515144899)
|
|
826
|
-
# allow 60th second (even if it is not a leap second)
|
|
827
|
-
self.cert_time_ok("Jan 5 09:34:60 2018 GMT", 1515144900)
|
|
828
|
-
# allow 2nd leap second for compatibility with time.strptime()
|
|
829
|
-
self.cert_time_ok("Jan 5 09:34:61 2018 GMT", 1515144901)
|
|
830
|
-
self.cert_time_fail("Jan 5 09:34:62 2018 GMT") # invalid seconds
|
|
831
|
-
|
|
832
|
-
# no special treatement for the special value:
|
|
833
|
-
# 99991231235959Z (rfc 5280)
|
|
834
|
-
self.cert_time_ok("Dec 31 23:59:59 9999 GMT", 253402300799.0)
|
|
835
|
-
|
|
836
|
-
@support.run_with_locale('LC_ALL', '')
|
|
837
|
-
def test_cert_time_to_seconds_locale(self):
|
|
838
|
-
# `cert_time_to_seconds()` should be locale independent
|
|
839
|
-
|
|
840
|
-
def local_february_name():
|
|
841
|
-
return time.strftime('%b', (1, 2, 3, 4, 5, 6, 0, 0, 0))
|
|
842
|
-
|
|
843
|
-
if local_february_name().lower() == 'feb':
|
|
844
|
-
self.skipTest("locale-specific month name needs to be "
|
|
845
|
-
"different from C locale")
|
|
846
|
-
|
|
847
|
-
# locale-independent
|
|
848
|
-
self.cert_time_ok("Feb 9 00:00:00 2007 GMT", 1170979200.0)
|
|
849
|
-
self.cert_time_fail(local_february_name() + " 9 00:00:00 2007 GMT")
|
|
850
|
-
|
|
851
|
-
def test_connect_ex_error(self):
|
|
852
|
-
server = socket.socket(socket.AF_INET)
|
|
853
|
-
self.addCleanup(server.close)
|
|
854
|
-
port = support.bind_port(server) # Reserve port but don't listen
|
|
855
|
-
s = test_wrap_socket(socket.socket(socket.AF_INET),
|
|
856
|
-
cert_reqs=ssl.CERT_REQUIRED)
|
|
857
|
-
self.addCleanup(s.close)
|
|
858
|
-
rc = s.connect_ex((HOST, port))
|
|
859
|
-
# Issue #19919: Windows machines or VMs hosted on Windows
|
|
860
|
-
# machines sometimes return EWOULDBLOCK.
|
|
861
|
-
errors = (
|
|
862
|
-
errno.ECONNREFUSED, errno.EHOSTUNREACH, errno.ETIMEDOUT,
|
|
863
|
-
errno.EWOULDBLOCK,
|
|
864
|
-
)
|
|
865
|
-
self.assertIn(rc, errors)
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
class ContextTests(unittest.TestCase):
|
|
869
|
-
|
|
870
|
-
@skip_if_broken_ubuntu_ssl
|
|
871
|
-
def test_constructor(self):
|
|
872
|
-
for protocol in PROTOCOLS:
|
|
873
|
-
ssl.SSLContext(protocol)
|
|
874
|
-
ctx = ssl.SSLContext()
|
|
875
|
-
self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS)
|
|
876
|
-
self.assertRaises(ValueError, ssl.SSLContext, -1)
|
|
877
|
-
self.assertRaises(ValueError, ssl.SSLContext, 42)
|
|
878
|
-
|
|
879
|
-
@skip_if_broken_ubuntu_ssl
|
|
880
|
-
def test_protocol(self):
|
|
881
|
-
for proto in PROTOCOLS:
|
|
882
|
-
ctx = ssl.SSLContext(proto)
|
|
883
|
-
self.assertEqual(ctx.protocol, proto)
|
|
884
|
-
|
|
885
|
-
def test_ciphers(self):
|
|
886
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
887
|
-
ctx.set_ciphers("ALL")
|
|
888
|
-
ctx.set_ciphers("DEFAULT")
|
|
889
|
-
with self.assertRaisesRegex(ssl.SSLError, "No cipher can be selected"):
|
|
890
|
-
ctx.set_ciphers("^$:,;?*'dorothyx")
|
|
891
|
-
|
|
892
|
-
@unittest.skipIf(ssl.OPENSSL_VERSION_INFO < (1, 0, 2, 0, 0), 'OpenSSL too old')
|
|
893
|
-
def test_get_ciphers(self):
|
|
894
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
895
|
-
ctx.set_ciphers('AESGCM')
|
|
896
|
-
names = set(d['name'] for d in ctx.get_ciphers())
|
|
897
|
-
self.assertIn('AES256-GCM-SHA384', names)
|
|
898
|
-
self.assertIn('AES128-GCM-SHA256', names)
|
|
899
|
-
|
|
900
|
-
@skip_if_broken_ubuntu_ssl
|
|
901
|
-
def test_options(self):
|
|
902
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
903
|
-
# OP_ALL | OP_NO_SSLv2 | OP_NO_SSLv3 is the default value
|
|
904
|
-
default = (ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
|
|
905
|
-
# SSLContext also enables these by default
|
|
906
|
-
default |= (OP_NO_COMPRESSION | OP_CIPHER_SERVER_PREFERENCE |
|
|
907
|
-
OP_SINGLE_DH_USE | OP_SINGLE_ECDH_USE)
|
|
908
|
-
self.assertEqual(default, ctx.options)
|
|
909
|
-
ctx.options |= ssl.OP_NO_TLSv1
|
|
910
|
-
self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options)
|
|
911
|
-
if can_clear_options():
|
|
912
|
-
ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1)
|
|
913
|
-
self.assertEqual(default, ctx.options)
|
|
914
|
-
ctx.options = 0
|
|
915
|
-
# Ubuntu has OP_NO_SSLv3 forced on by default
|
|
916
|
-
self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3)
|
|
917
|
-
else:
|
|
918
|
-
with self.assertRaises(ValueError):
|
|
919
|
-
ctx.options = 0
|
|
920
|
-
|
|
921
|
-
def test_verify_mode(self):
|
|
922
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
923
|
-
# Default value
|
|
924
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
925
|
-
ctx.verify_mode = ssl.CERT_OPTIONAL
|
|
926
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_OPTIONAL)
|
|
927
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
928
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
|
|
929
|
-
ctx.verify_mode = ssl.CERT_NONE
|
|
930
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
931
|
-
with self.assertRaises(TypeError):
|
|
932
|
-
ctx.verify_mode = None
|
|
933
|
-
with self.assertRaises(ValueError):
|
|
934
|
-
ctx.verify_mode = 42
|
|
935
|
-
|
|
936
|
-
@unittest.skipUnless(have_verify_flags(),
|
|
937
|
-
"verify_flags need OpenSSL > 0.9.8")
|
|
938
|
-
def test_verify_flags(self):
|
|
939
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
940
|
-
# default value
|
|
941
|
-
tf = getattr(ssl, "VERIFY_X509_TRUSTED_FIRST", 0)
|
|
942
|
-
self.assertEqual(ctx.verify_flags, ssl.VERIFY_DEFAULT | tf)
|
|
943
|
-
ctx.verify_flags = ssl.VERIFY_CRL_CHECK_LEAF
|
|
944
|
-
self.assertEqual(ctx.verify_flags, ssl.VERIFY_CRL_CHECK_LEAF)
|
|
945
|
-
ctx.verify_flags = ssl.VERIFY_CRL_CHECK_CHAIN
|
|
946
|
-
self.assertEqual(ctx.verify_flags, ssl.VERIFY_CRL_CHECK_CHAIN)
|
|
947
|
-
ctx.verify_flags = ssl.VERIFY_DEFAULT
|
|
948
|
-
self.assertEqual(ctx.verify_flags, ssl.VERIFY_DEFAULT)
|
|
949
|
-
# supports any value
|
|
950
|
-
ctx.verify_flags = ssl.VERIFY_CRL_CHECK_LEAF | ssl.VERIFY_X509_STRICT
|
|
951
|
-
self.assertEqual(ctx.verify_flags,
|
|
952
|
-
ssl.VERIFY_CRL_CHECK_LEAF | ssl.VERIFY_X509_STRICT)
|
|
953
|
-
with self.assertRaises(TypeError):
|
|
954
|
-
ctx.verify_flags = None
|
|
955
|
-
|
|
956
|
-
def test_load_cert_chain(self):
|
|
957
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
958
|
-
# Combined key and cert in a single file
|
|
959
|
-
ctx.load_cert_chain(CERTFILE, keyfile=None)
|
|
960
|
-
ctx.load_cert_chain(CERTFILE, keyfile=CERTFILE)
|
|
961
|
-
self.assertRaises(TypeError, ctx.load_cert_chain, keyfile=CERTFILE)
|
|
962
|
-
with self.assertRaises(OSError) as cm:
|
|
963
|
-
ctx.load_cert_chain(NONEXISTINGCERT)
|
|
964
|
-
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
965
|
-
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
966
|
-
ctx.load_cert_chain(BADCERT)
|
|
967
|
-
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
968
|
-
ctx.load_cert_chain(EMPTYCERT)
|
|
969
|
-
# Separate key and cert
|
|
970
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
971
|
-
ctx.load_cert_chain(ONLYCERT, ONLYKEY)
|
|
972
|
-
ctx.load_cert_chain(certfile=ONLYCERT, keyfile=ONLYKEY)
|
|
973
|
-
ctx.load_cert_chain(certfile=BYTES_ONLYCERT, keyfile=BYTES_ONLYKEY)
|
|
974
|
-
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
975
|
-
ctx.load_cert_chain(ONLYCERT)
|
|
976
|
-
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
977
|
-
ctx.load_cert_chain(ONLYKEY)
|
|
978
|
-
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
979
|
-
ctx.load_cert_chain(certfile=ONLYKEY, keyfile=ONLYCERT)
|
|
980
|
-
# Mismatching key and cert
|
|
981
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
982
|
-
with self.assertRaisesRegex(ssl.SSLError, "key values mismatch"):
|
|
983
|
-
ctx.load_cert_chain(CAFILE_CACERT, ONLYKEY)
|
|
984
|
-
# Password protected key and cert
|
|
985
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=KEY_PASSWORD)
|
|
986
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=KEY_PASSWORD.encode())
|
|
987
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED,
|
|
988
|
-
password=bytearray(KEY_PASSWORD.encode()))
|
|
989
|
-
ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED, KEY_PASSWORD)
|
|
990
|
-
ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED, KEY_PASSWORD.encode())
|
|
991
|
-
ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED,
|
|
992
|
-
bytearray(KEY_PASSWORD.encode()))
|
|
993
|
-
with self.assertRaisesRegex(TypeError, "should be a string"):
|
|
994
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=True)
|
|
995
|
-
with self.assertRaises(ssl.SSLError):
|
|
996
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password="badpass")
|
|
997
|
-
with self.assertRaisesRegex(ValueError, "cannot be longer"):
|
|
998
|
-
# openssl has a fixed limit on the password buffer.
|
|
999
|
-
# PEM_BUFSIZE is generally set to 1kb.
|
|
1000
|
-
# Return a string larger than this.
|
|
1001
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=b'a' * 102400)
|
|
1002
|
-
# Password callback
|
|
1003
|
-
def getpass_unicode():
|
|
1004
|
-
return KEY_PASSWORD
|
|
1005
|
-
def getpass_bytes():
|
|
1006
|
-
return KEY_PASSWORD.encode()
|
|
1007
|
-
def getpass_bytearray():
|
|
1008
|
-
return bytearray(KEY_PASSWORD.encode())
|
|
1009
|
-
def getpass_badpass():
|
|
1010
|
-
return "badpass"
|
|
1011
|
-
def getpass_huge():
|
|
1012
|
-
return b'a' * (1024 * 1024)
|
|
1013
|
-
def getpass_bad_type():
|
|
1014
|
-
return 9
|
|
1015
|
-
def getpass_exception():
|
|
1016
|
-
raise Exception('getpass error')
|
|
1017
|
-
class GetPassCallable:
|
|
1018
|
-
def __call__(self):
|
|
1019
|
-
return KEY_PASSWORD
|
|
1020
|
-
def getpass(self):
|
|
1021
|
-
return KEY_PASSWORD
|
|
1022
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_unicode)
|
|
1023
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_bytes)
|
|
1024
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_bytearray)
|
|
1025
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=GetPassCallable())
|
|
1026
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED,
|
|
1027
|
-
password=GetPassCallable().getpass)
|
|
1028
|
-
with self.assertRaises(ssl.SSLError):
|
|
1029
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_badpass)
|
|
1030
|
-
with self.assertRaisesRegex(ValueError, "cannot be longer"):
|
|
1031
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_huge)
|
|
1032
|
-
with self.assertRaisesRegex(TypeError, "must return a string"):
|
|
1033
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_bad_type)
|
|
1034
|
-
with self.assertRaisesRegex(Exception, "getpass error"):
|
|
1035
|
-
ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_exception)
|
|
1036
|
-
# Make sure the password function isn't called if it isn't needed
|
|
1037
|
-
ctx.load_cert_chain(CERTFILE, password=getpass_exception)
|
|
1038
|
-
|
|
1039
|
-
def test_load_verify_locations(self):
|
|
1040
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1041
|
-
ctx.load_verify_locations(CERTFILE)
|
|
1042
|
-
ctx.load_verify_locations(cafile=CERTFILE, capath=None)
|
|
1043
|
-
ctx.load_verify_locations(BYTES_CERTFILE)
|
|
1044
|
-
ctx.load_verify_locations(cafile=BYTES_CERTFILE, capath=None)
|
|
1045
|
-
self.assertRaises(TypeError, ctx.load_verify_locations)
|
|
1046
|
-
self.assertRaises(TypeError, ctx.load_verify_locations, None, None, None)
|
|
1047
|
-
with self.assertRaises(OSError) as cm:
|
|
1048
|
-
ctx.load_verify_locations(NONEXISTINGCERT)
|
|
1049
|
-
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
1050
|
-
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
|
|
1051
|
-
ctx.load_verify_locations(BADCERT)
|
|
1052
|
-
ctx.load_verify_locations(CERTFILE, CAPATH)
|
|
1053
|
-
ctx.load_verify_locations(CERTFILE, capath=BYTES_CAPATH)
|
|
1054
|
-
|
|
1055
|
-
# Issue #10989: crash if the second argument type is invalid
|
|
1056
|
-
self.assertRaises(TypeError, ctx.load_verify_locations, None, True)
|
|
1057
|
-
|
|
1058
|
-
def test_load_verify_cadata(self):
|
|
1059
|
-
# test cadata
|
|
1060
|
-
with open(CAFILE_CACERT) as f:
|
|
1061
|
-
cacert_pem = f.read()
|
|
1062
|
-
cacert_der = ssl.PEM_cert_to_DER_cert(cacert_pem)
|
|
1063
|
-
with open(CAFILE_NEURONIO) as f:
|
|
1064
|
-
neuronio_pem = f.read()
|
|
1065
|
-
neuronio_der = ssl.PEM_cert_to_DER_cert(neuronio_pem)
|
|
1066
|
-
|
|
1067
|
-
# test PEM
|
|
1068
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1069
|
-
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 0)
|
|
1070
|
-
ctx.load_verify_locations(cadata=cacert_pem)
|
|
1071
|
-
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 1)
|
|
1072
|
-
ctx.load_verify_locations(cadata=neuronio_pem)
|
|
1073
|
-
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
1074
|
-
# cert already in hash table
|
|
1075
|
-
ctx.load_verify_locations(cadata=neuronio_pem)
|
|
1076
|
-
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
1077
|
-
|
|
1078
|
-
# combined
|
|
1079
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1080
|
-
combined = "\n".join((cacert_pem, neuronio_pem))
|
|
1081
|
-
ctx.load_verify_locations(cadata=combined)
|
|
1082
|
-
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
1083
|
-
|
|
1084
|
-
# with junk around the certs
|
|
1085
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1086
|
-
combined = ["head", cacert_pem, "other", neuronio_pem, "again",
|
|
1087
|
-
neuronio_pem, "tail"]
|
|
1088
|
-
ctx.load_verify_locations(cadata="\n".join(combined))
|
|
1089
|
-
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
1090
|
-
|
|
1091
|
-
# test DER
|
|
1092
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1093
|
-
ctx.load_verify_locations(cadata=cacert_der)
|
|
1094
|
-
ctx.load_verify_locations(cadata=neuronio_der)
|
|
1095
|
-
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
1096
|
-
# cert already in hash table
|
|
1097
|
-
ctx.load_verify_locations(cadata=cacert_der)
|
|
1098
|
-
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
1099
|
-
|
|
1100
|
-
# combined
|
|
1101
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1102
|
-
combined = b"".join((cacert_der, neuronio_der))
|
|
1103
|
-
ctx.load_verify_locations(cadata=combined)
|
|
1104
|
-
self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
|
|
1105
|
-
|
|
1106
|
-
# error cases
|
|
1107
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1108
|
-
self.assertRaises(TypeError, ctx.load_verify_locations, cadata=object)
|
|
1109
|
-
|
|
1110
|
-
with self.assertRaisesRegex(ssl.SSLError, "no start line"):
|
|
1111
|
-
ctx.load_verify_locations(cadata="broken")
|
|
1112
|
-
with self.assertRaisesRegex(ssl.SSLError, "not enough data"):
|
|
1113
|
-
ctx.load_verify_locations(cadata=b"broken")
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
def test_load_dh_params(self):
|
|
1117
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1118
|
-
ctx.load_dh_params(DHFILE)
|
|
1119
|
-
if os.name != 'nt':
|
|
1120
|
-
ctx.load_dh_params(BYTES_DHFILE)
|
|
1121
|
-
self.assertRaises(TypeError, ctx.load_dh_params)
|
|
1122
|
-
self.assertRaises(TypeError, ctx.load_dh_params, None)
|
|
1123
|
-
with self.assertRaises(FileNotFoundError) as cm:
|
|
1124
|
-
ctx.load_dh_params(NONEXISTINGCERT)
|
|
1125
|
-
self.assertEqual(cm.exception.errno, errno.ENOENT)
|
|
1126
|
-
with self.assertRaises(ssl.SSLError) as cm:
|
|
1127
|
-
ctx.load_dh_params(CERTFILE)
|
|
1128
|
-
|
|
1129
|
-
@skip_if_broken_ubuntu_ssl
|
|
1130
|
-
def test_session_stats(self):
|
|
1131
|
-
for proto in PROTOCOLS:
|
|
1132
|
-
ctx = ssl.SSLContext(proto)
|
|
1133
|
-
self.assertEqual(ctx.session_stats(), {
|
|
1134
|
-
'number': 0,
|
|
1135
|
-
'connect': 0,
|
|
1136
|
-
'connect_good': 0,
|
|
1137
|
-
'connect_renegotiate': 0,
|
|
1138
|
-
'accept': 0,
|
|
1139
|
-
'accept_good': 0,
|
|
1140
|
-
'accept_renegotiate': 0,
|
|
1141
|
-
'hits': 0,
|
|
1142
|
-
'misses': 0,
|
|
1143
|
-
'timeouts': 0,
|
|
1144
|
-
'cache_full': 0,
|
|
1145
|
-
})
|
|
1146
|
-
|
|
1147
|
-
def test_set_default_verify_paths(self):
|
|
1148
|
-
# There's not much we can do to test that it acts as expected,
|
|
1149
|
-
# so just check it doesn't crash or raise an exception.
|
|
1150
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1151
|
-
ctx.set_default_verify_paths()
|
|
1152
|
-
|
|
1153
|
-
@unittest.skipUnless(ssl.HAS_ECDH, "ECDH disabled on this OpenSSL build")
|
|
1154
|
-
def test_set_ecdh_curve(self):
|
|
1155
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1156
|
-
ctx.set_ecdh_curve("prime256v1")
|
|
1157
|
-
ctx.set_ecdh_curve(b"prime256v1")
|
|
1158
|
-
self.assertRaises(TypeError, ctx.set_ecdh_curve)
|
|
1159
|
-
self.assertRaises(TypeError, ctx.set_ecdh_curve, None)
|
|
1160
|
-
self.assertRaises(ValueError, ctx.set_ecdh_curve, "foo")
|
|
1161
|
-
self.assertRaises(ValueError, ctx.set_ecdh_curve, b"foo")
|
|
1162
|
-
|
|
1163
|
-
@needs_sni
|
|
1164
|
-
def test_sni_callback(self):
|
|
1165
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1166
|
-
|
|
1167
|
-
# set_servername_callback expects a callable, or None
|
|
1168
|
-
self.assertRaises(TypeError, ctx.set_servername_callback)
|
|
1169
|
-
self.assertRaises(TypeError, ctx.set_servername_callback, 4)
|
|
1170
|
-
self.assertRaises(TypeError, ctx.set_servername_callback, "")
|
|
1171
|
-
self.assertRaises(TypeError, ctx.set_servername_callback, ctx)
|
|
1172
|
-
|
|
1173
|
-
def dummycallback(sock, servername, ctx):
|
|
1174
|
-
pass
|
|
1175
|
-
ctx.set_servername_callback(None)
|
|
1176
|
-
ctx.set_servername_callback(dummycallback)
|
|
1177
|
-
|
|
1178
|
-
@needs_sni
|
|
1179
|
-
def test_sni_callback_refcycle(self):
|
|
1180
|
-
# Reference cycles through the servername callback are detected
|
|
1181
|
-
# and cleared.
|
|
1182
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1183
|
-
def dummycallback(sock, servername, ctx, cycle=ctx):
|
|
1184
|
-
pass
|
|
1185
|
-
ctx.set_servername_callback(dummycallback)
|
|
1186
|
-
wr = weakref.ref(ctx)
|
|
1187
|
-
del ctx, dummycallback
|
|
1188
|
-
gc.collect()
|
|
1189
|
-
self.assertIs(wr(), None)
|
|
1190
|
-
|
|
1191
|
-
def test_cert_store_stats(self):
|
|
1192
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1193
|
-
self.assertEqual(ctx.cert_store_stats(),
|
|
1194
|
-
{'x509_ca': 0, 'crl': 0, 'x509': 0})
|
|
1195
|
-
ctx.load_cert_chain(CERTFILE)
|
|
1196
|
-
self.assertEqual(ctx.cert_store_stats(),
|
|
1197
|
-
{'x509_ca': 0, 'crl': 0, 'x509': 0})
|
|
1198
|
-
ctx.load_verify_locations(CERTFILE)
|
|
1199
|
-
self.assertEqual(ctx.cert_store_stats(),
|
|
1200
|
-
{'x509_ca': 0, 'crl': 0, 'x509': 1})
|
|
1201
|
-
ctx.load_verify_locations(CAFILE_CACERT)
|
|
1202
|
-
self.assertEqual(ctx.cert_store_stats(),
|
|
1203
|
-
{'x509_ca': 1, 'crl': 0, 'x509': 2})
|
|
1204
|
-
|
|
1205
|
-
def test_get_ca_certs(self):
|
|
1206
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1207
|
-
self.assertEqual(ctx.get_ca_certs(), [])
|
|
1208
|
-
# CERTFILE is not flagged as X509v3 Basic Constraints: CA:TRUE
|
|
1209
|
-
ctx.load_verify_locations(CERTFILE)
|
|
1210
|
-
self.assertEqual(ctx.get_ca_certs(), [])
|
|
1211
|
-
# but CAFILE_CACERT is a CA cert
|
|
1212
|
-
ctx.load_verify_locations(CAFILE_CACERT)
|
|
1213
|
-
self.assertEqual(ctx.get_ca_certs(),
|
|
1214
|
-
[{'issuer': ((('organizationName', 'Root CA'),),
|
|
1215
|
-
(('organizationalUnitName', 'http://www.cacert.org'),),
|
|
1216
|
-
(('commonName', 'CA Cert Signing Authority'),),
|
|
1217
|
-
(('emailAddress', 'support@cacert.org'),)),
|
|
1218
|
-
'notAfter': asn1time('Mar 29 12:29:49 2033 GMT'),
|
|
1219
|
-
'notBefore': asn1time('Mar 30 12:29:49 2003 GMT'),
|
|
1220
|
-
'serialNumber': '00',
|
|
1221
|
-
'crlDistributionPoints': ('https://www.cacert.org/revoke.crl',),
|
|
1222
|
-
'subject': ((('organizationName', 'Root CA'),),
|
|
1223
|
-
(('organizationalUnitName', 'http://www.cacert.org'),),
|
|
1224
|
-
(('commonName', 'CA Cert Signing Authority'),),
|
|
1225
|
-
(('emailAddress', 'support@cacert.org'),)),
|
|
1226
|
-
'version': 3}])
|
|
1227
|
-
|
|
1228
|
-
with open(CAFILE_CACERT) as f:
|
|
1229
|
-
pem = f.read()
|
|
1230
|
-
der = ssl.PEM_cert_to_DER_cert(pem)
|
|
1231
|
-
self.assertEqual(ctx.get_ca_certs(True), [der])
|
|
1232
|
-
|
|
1233
|
-
def test_load_default_certs(self):
|
|
1234
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1235
|
-
ctx.load_default_certs()
|
|
1236
|
-
|
|
1237
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1238
|
-
ctx.load_default_certs(ssl.Purpose.SERVER_AUTH)
|
|
1239
|
-
ctx.load_default_certs()
|
|
1240
|
-
|
|
1241
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1242
|
-
ctx.load_default_certs(ssl.Purpose.CLIENT_AUTH)
|
|
1243
|
-
|
|
1244
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1245
|
-
self.assertRaises(TypeError, ctx.load_default_certs, None)
|
|
1246
|
-
self.assertRaises(TypeError, ctx.load_default_certs, 'SERVER_AUTH')
|
|
1247
|
-
|
|
1248
|
-
@unittest.skipIf(sys.platform == "win32", "not-Windows specific")
|
|
1249
|
-
@unittest.skipIf(IS_LIBRESSL, "LibreSSL doesn't support env vars")
|
|
1250
|
-
def test_load_default_certs_env(self):
|
|
1251
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1252
|
-
with support.EnvironmentVarGuard() as env:
|
|
1253
|
-
env["SSL_CERT_DIR"] = CAPATH
|
|
1254
|
-
env["SSL_CERT_FILE"] = CERTFILE
|
|
1255
|
-
ctx.load_default_certs()
|
|
1256
|
-
self.assertEqual(ctx.cert_store_stats(), {"crl": 0, "x509": 1, "x509_ca": 0})
|
|
1257
|
-
|
|
1258
|
-
@unittest.skipUnless(sys.platform == "win32", "Windows specific")
|
|
1259
|
-
def test_load_default_certs_env_windows(self):
|
|
1260
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1261
|
-
ctx.load_default_certs()
|
|
1262
|
-
stats = ctx.cert_store_stats()
|
|
1263
|
-
|
|
1264
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1265
|
-
with support.EnvironmentVarGuard() as env:
|
|
1266
|
-
env["SSL_CERT_DIR"] = CAPATH
|
|
1267
|
-
env["SSL_CERT_FILE"] = CERTFILE
|
|
1268
|
-
ctx.load_default_certs()
|
|
1269
|
-
stats["x509"] += 1
|
|
1270
|
-
self.assertEqual(ctx.cert_store_stats(), stats)
|
|
1271
|
-
|
|
1272
|
-
def _assert_context_options(self, ctx):
|
|
1273
|
-
self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)
|
|
1274
|
-
if OP_NO_COMPRESSION != 0:
|
|
1275
|
-
self.assertEqual(ctx.options & OP_NO_COMPRESSION,
|
|
1276
|
-
OP_NO_COMPRESSION)
|
|
1277
|
-
if OP_SINGLE_DH_USE != 0:
|
|
1278
|
-
self.assertEqual(ctx.options & OP_SINGLE_DH_USE,
|
|
1279
|
-
OP_SINGLE_DH_USE)
|
|
1280
|
-
if OP_SINGLE_ECDH_USE != 0:
|
|
1281
|
-
self.assertEqual(ctx.options & OP_SINGLE_ECDH_USE,
|
|
1282
|
-
OP_SINGLE_ECDH_USE)
|
|
1283
|
-
if OP_CIPHER_SERVER_PREFERENCE != 0:
|
|
1284
|
-
self.assertEqual(ctx.options & OP_CIPHER_SERVER_PREFERENCE,
|
|
1285
|
-
OP_CIPHER_SERVER_PREFERENCE)
|
|
1286
|
-
|
|
1287
|
-
def test_create_default_context(self):
|
|
1288
|
-
ctx = ssl.create_default_context()
|
|
1289
|
-
|
|
1290
|
-
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1291
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
|
|
1292
|
-
self.assertTrue(ctx.check_hostname)
|
|
1293
|
-
self._assert_context_options(ctx)
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
with open(SIGNING_CA) as f:
|
|
1297
|
-
cadata = f.read()
|
|
1298
|
-
ctx = ssl.create_default_context(cafile=SIGNING_CA, capath=CAPATH,
|
|
1299
|
-
cadata=cadata)
|
|
1300
|
-
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1301
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
|
|
1302
|
-
self._assert_context_options(ctx)
|
|
1303
|
-
|
|
1304
|
-
ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
|
1305
|
-
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1306
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
1307
|
-
self._assert_context_options(ctx)
|
|
1308
|
-
|
|
1309
|
-
def test__create_stdlib_context(self):
|
|
1310
|
-
ctx = ssl._create_stdlib_context()
|
|
1311
|
-
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1312
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
1313
|
-
self.assertFalse(ctx.check_hostname)
|
|
1314
|
-
self._assert_context_options(ctx)
|
|
1315
|
-
|
|
1316
|
-
ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1)
|
|
1317
|
-
self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1)
|
|
1318
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
1319
|
-
self._assert_context_options(ctx)
|
|
1320
|
-
|
|
1321
|
-
ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1,
|
|
1322
|
-
cert_reqs=ssl.CERT_REQUIRED,
|
|
1323
|
-
check_hostname=True)
|
|
1324
|
-
self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1)
|
|
1325
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
|
|
1326
|
-
self.assertTrue(ctx.check_hostname)
|
|
1327
|
-
self._assert_context_options(ctx)
|
|
1328
|
-
|
|
1329
|
-
ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH)
|
|
1330
|
-
self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
|
|
1331
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
1332
|
-
self._assert_context_options(ctx)
|
|
1333
|
-
|
|
1334
|
-
def test_check_hostname(self):
|
|
1335
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1336
|
-
self.assertFalse(ctx.check_hostname)
|
|
1337
|
-
|
|
1338
|
-
# Requires CERT_REQUIRED or CERT_OPTIONAL
|
|
1339
|
-
with self.assertRaises(ValueError):
|
|
1340
|
-
ctx.check_hostname = True
|
|
1341
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1342
|
-
self.assertFalse(ctx.check_hostname)
|
|
1343
|
-
ctx.check_hostname = True
|
|
1344
|
-
self.assertTrue(ctx.check_hostname)
|
|
1345
|
-
|
|
1346
|
-
ctx.verify_mode = ssl.CERT_OPTIONAL
|
|
1347
|
-
ctx.check_hostname = True
|
|
1348
|
-
self.assertTrue(ctx.check_hostname)
|
|
1349
|
-
|
|
1350
|
-
# Cannot set CERT_NONE with check_hostname enabled
|
|
1351
|
-
with self.assertRaises(ValueError):
|
|
1352
|
-
ctx.verify_mode = ssl.CERT_NONE
|
|
1353
|
-
ctx.check_hostname = False
|
|
1354
|
-
self.assertFalse(ctx.check_hostname)
|
|
1355
|
-
|
|
1356
|
-
def test_context_client_server(self):
|
|
1357
|
-
# PROTOCOL_TLS_CLIENT has sane defaults
|
|
1358
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
|
1359
|
-
self.assertTrue(ctx.check_hostname)
|
|
1360
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
|
|
1361
|
-
|
|
1362
|
-
# PROTOCOL_TLS_SERVER has different but also sane defaults
|
|
1363
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
|
1364
|
-
self.assertFalse(ctx.check_hostname)
|
|
1365
|
-
self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
class SSLErrorTests(unittest.TestCase):
|
|
1369
|
-
|
|
1370
|
-
def test_str(self):
|
|
1371
|
-
# The str() of a SSLError doesn't include the errno
|
|
1372
|
-
e = ssl.SSLError(1, "foo")
|
|
1373
|
-
self.assertEqual(str(e), "foo")
|
|
1374
|
-
self.assertEqual(e.errno, 1)
|
|
1375
|
-
# Same for a subclass
|
|
1376
|
-
e = ssl.SSLZeroReturnError(1, "foo")
|
|
1377
|
-
self.assertEqual(str(e), "foo")
|
|
1378
|
-
self.assertEqual(e.errno, 1)
|
|
1379
|
-
|
|
1380
|
-
def test_lib_reason(self):
|
|
1381
|
-
# Test the library and reason attributes
|
|
1382
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1383
|
-
with self.assertRaises(ssl.SSLError) as cm:
|
|
1384
|
-
ctx.load_dh_params(CERTFILE)
|
|
1385
|
-
self.assertEqual(cm.exception.library, 'PEM')
|
|
1386
|
-
self.assertEqual(cm.exception.reason, 'NO_START_LINE')
|
|
1387
|
-
s = str(cm.exception)
|
|
1388
|
-
self.assertTrue(s.startswith("[PEM: NO_START_LINE] no start line"), s)
|
|
1389
|
-
|
|
1390
|
-
def test_subclass(self):
|
|
1391
|
-
# Check that the appropriate SSLError subclass is raised
|
|
1392
|
-
# (this only tests one of them)
|
|
1393
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1394
|
-
with socket.socket() as s:
|
|
1395
|
-
s.bind(("127.0.0.1", 0))
|
|
1396
|
-
s.listen()
|
|
1397
|
-
c = socket.socket()
|
|
1398
|
-
c.connect(s.getsockname())
|
|
1399
|
-
c.setblocking(False)
|
|
1400
|
-
with ctx.wrap_socket(c, False, do_handshake_on_connect=False) as c:
|
|
1401
|
-
with self.assertRaises(ssl.SSLWantReadError) as cm:
|
|
1402
|
-
c.do_handshake()
|
|
1403
|
-
s = str(cm.exception)
|
|
1404
|
-
self.assertTrue(s.startswith("The operation did not complete (read)"), s)
|
|
1405
|
-
# For compatibility
|
|
1406
|
-
self.assertEqual(cm.exception.errno, ssl.SSL_ERROR_WANT_READ)
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
class MemoryBIOTests(unittest.TestCase):
|
|
1410
|
-
|
|
1411
|
-
def test_read_write(self):
|
|
1412
|
-
bio = ssl.MemoryBIO()
|
|
1413
|
-
bio.write(b'foo')
|
|
1414
|
-
self.assertEqual(bio.read(), b'foo')
|
|
1415
|
-
self.assertEqual(bio.read(), b'')
|
|
1416
|
-
bio.write(b'foo')
|
|
1417
|
-
bio.write(b'bar')
|
|
1418
|
-
self.assertEqual(bio.read(), b'foobar')
|
|
1419
|
-
self.assertEqual(bio.read(), b'')
|
|
1420
|
-
bio.write(b'baz')
|
|
1421
|
-
self.assertEqual(bio.read(2), b'ba')
|
|
1422
|
-
self.assertEqual(bio.read(1), b'z')
|
|
1423
|
-
self.assertEqual(bio.read(1), b'')
|
|
1424
|
-
|
|
1425
|
-
def test_eof(self):
|
|
1426
|
-
bio = ssl.MemoryBIO()
|
|
1427
|
-
self.assertFalse(bio.eof)
|
|
1428
|
-
self.assertEqual(bio.read(), b'')
|
|
1429
|
-
self.assertFalse(bio.eof)
|
|
1430
|
-
bio.write(b'foo')
|
|
1431
|
-
self.assertFalse(bio.eof)
|
|
1432
|
-
bio.write_eof()
|
|
1433
|
-
self.assertFalse(bio.eof)
|
|
1434
|
-
self.assertEqual(bio.read(2), b'fo')
|
|
1435
|
-
self.assertFalse(bio.eof)
|
|
1436
|
-
self.assertEqual(bio.read(1), b'o')
|
|
1437
|
-
self.assertTrue(bio.eof)
|
|
1438
|
-
self.assertEqual(bio.read(), b'')
|
|
1439
|
-
self.assertTrue(bio.eof)
|
|
1440
|
-
|
|
1441
|
-
def test_pending(self):
|
|
1442
|
-
bio = ssl.MemoryBIO()
|
|
1443
|
-
self.assertEqual(bio.pending, 0)
|
|
1444
|
-
bio.write(b'foo')
|
|
1445
|
-
self.assertEqual(bio.pending, 3)
|
|
1446
|
-
for i in range(3):
|
|
1447
|
-
bio.read(1)
|
|
1448
|
-
self.assertEqual(bio.pending, 3-i-1)
|
|
1449
|
-
for i in range(3):
|
|
1450
|
-
bio.write(b'x')
|
|
1451
|
-
self.assertEqual(bio.pending, i+1)
|
|
1452
|
-
bio.read()
|
|
1453
|
-
self.assertEqual(bio.pending, 0)
|
|
1454
|
-
|
|
1455
|
-
def test_buffer_types(self):
|
|
1456
|
-
bio = ssl.MemoryBIO()
|
|
1457
|
-
bio.write(b'foo')
|
|
1458
|
-
self.assertEqual(bio.read(), b'foo')
|
|
1459
|
-
bio.write(bytearray(b'bar'))
|
|
1460
|
-
self.assertEqual(bio.read(), b'bar')
|
|
1461
|
-
bio.write(memoryview(b'baz'))
|
|
1462
|
-
self.assertEqual(bio.read(), b'baz')
|
|
1463
|
-
|
|
1464
|
-
def test_error_types(self):
|
|
1465
|
-
bio = ssl.MemoryBIO()
|
|
1466
|
-
self.assertRaises(TypeError, bio.write, 'foo')
|
|
1467
|
-
self.assertRaises(TypeError, bio.write, None)
|
|
1468
|
-
self.assertRaises(TypeError, bio.write, True)
|
|
1469
|
-
self.assertRaises(TypeError, bio.write, 1)
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
@unittest.skipUnless(_have_threads, "Needs threading module")
|
|
1473
|
-
class SimpleBackgroundTests(unittest.TestCase):
|
|
1474
|
-
|
|
1475
|
-
"""Tests that connect to a simple server running in the background"""
|
|
1476
|
-
|
|
1477
|
-
def setUp(self):
|
|
1478
|
-
server = ThreadedEchoServer(SIGNED_CERTFILE)
|
|
1479
|
-
self.server_addr = (HOST, server.port)
|
|
1480
|
-
server.__enter__()
|
|
1481
|
-
self.addCleanup(server.__exit__, None, None, None)
|
|
1482
|
-
|
|
1483
|
-
def test_connect(self):
|
|
1484
|
-
with test_wrap_socket(socket.socket(socket.AF_INET),
|
|
1485
|
-
cert_reqs=ssl.CERT_NONE) as s:
|
|
1486
|
-
s.connect(self.server_addr)
|
|
1487
|
-
self.assertEqual({}, s.getpeercert())
|
|
1488
|
-
self.assertFalse(s.server_side)
|
|
1489
|
-
|
|
1490
|
-
# this should succeed because we specify the root cert
|
|
1491
|
-
with test_wrap_socket(socket.socket(socket.AF_INET),
|
|
1492
|
-
cert_reqs=ssl.CERT_REQUIRED,
|
|
1493
|
-
ca_certs=SIGNING_CA) as s:
|
|
1494
|
-
s.connect(self.server_addr)
|
|
1495
|
-
self.assertTrue(s.getpeercert())
|
|
1496
|
-
self.assertFalse(s.server_side)
|
|
1497
|
-
|
|
1498
|
-
def test_connect_fail(self):
|
|
1499
|
-
# This should fail because we have no verification certs. Connection
|
|
1500
|
-
# failure crashes ThreadedEchoServer, so run this in an independent
|
|
1501
|
-
# test method.
|
|
1502
|
-
s = test_wrap_socket(socket.socket(socket.AF_INET),
|
|
1503
|
-
cert_reqs=ssl.CERT_REQUIRED)
|
|
1504
|
-
self.addCleanup(s.close)
|
|
1505
|
-
self.assertRaisesRegex(ssl.SSLError, "certificate verify failed",
|
|
1506
|
-
s.connect, self.server_addr)
|
|
1507
|
-
|
|
1508
|
-
def test_connect_ex(self):
|
|
1509
|
-
# Issue #11326: check connect_ex() implementation
|
|
1510
|
-
s = test_wrap_socket(socket.socket(socket.AF_INET),
|
|
1511
|
-
cert_reqs=ssl.CERT_REQUIRED,
|
|
1512
|
-
ca_certs=SIGNING_CA)
|
|
1513
|
-
self.addCleanup(s.close)
|
|
1514
|
-
self.assertEqual(0, s.connect_ex(self.server_addr))
|
|
1515
|
-
self.assertTrue(s.getpeercert())
|
|
1516
|
-
|
|
1517
|
-
def test_non_blocking_connect_ex(self):
|
|
1518
|
-
# Issue #11326: non-blocking connect_ex() should allow handshake
|
|
1519
|
-
# to proceed after the socket gets ready.
|
|
1520
|
-
s = test_wrap_socket(socket.socket(socket.AF_INET),
|
|
1521
|
-
cert_reqs=ssl.CERT_REQUIRED,
|
|
1522
|
-
ca_certs=SIGNING_CA,
|
|
1523
|
-
do_handshake_on_connect=False)
|
|
1524
|
-
self.addCleanup(s.close)
|
|
1525
|
-
s.setblocking(False)
|
|
1526
|
-
rc = s.connect_ex(self.server_addr)
|
|
1527
|
-
# EWOULDBLOCK under Windows, EINPROGRESS elsewhere
|
|
1528
|
-
self.assertIn(rc, (0, errno.EINPROGRESS, errno.EWOULDBLOCK))
|
|
1529
|
-
# Wait for connect to finish
|
|
1530
|
-
select.select([], [s], [], 5.0)
|
|
1531
|
-
# Non-blocking handshake
|
|
1532
|
-
while True:
|
|
1533
|
-
try:
|
|
1534
|
-
s.do_handshake()
|
|
1535
|
-
break
|
|
1536
|
-
except ssl.SSLWantReadError:
|
|
1537
|
-
select.select([s], [], [], 5.0)
|
|
1538
|
-
except ssl.SSLWantWriteError:
|
|
1539
|
-
select.select([], [s], [], 5.0)
|
|
1540
|
-
# SSL established
|
|
1541
|
-
self.assertTrue(s.getpeercert())
|
|
1542
|
-
|
|
1543
|
-
def test_connect_with_context(self):
|
|
1544
|
-
# Same as test_connect, but with a separately created context
|
|
1545
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1546
|
-
with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s:
|
|
1547
|
-
s.connect(self.server_addr)
|
|
1548
|
-
self.assertEqual({}, s.getpeercert())
|
|
1549
|
-
# Same with a server hostname
|
|
1550
|
-
with ctx.wrap_socket(socket.socket(socket.AF_INET),
|
|
1551
|
-
server_hostname="dummy") as s:
|
|
1552
|
-
s.connect(self.server_addr)
|
|
1553
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1554
|
-
# This should succeed because we specify the root cert
|
|
1555
|
-
ctx.load_verify_locations(SIGNING_CA)
|
|
1556
|
-
with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s:
|
|
1557
|
-
s.connect(self.server_addr)
|
|
1558
|
-
cert = s.getpeercert()
|
|
1559
|
-
self.assertTrue(cert)
|
|
1560
|
-
|
|
1561
|
-
def test_connect_with_context_fail(self):
|
|
1562
|
-
# This should fail because we have no verification certs. Connection
|
|
1563
|
-
# failure crashes ThreadedEchoServer, so run this in an independent
|
|
1564
|
-
# test method.
|
|
1565
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1566
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1567
|
-
s = ctx.wrap_socket(socket.socket(socket.AF_INET))
|
|
1568
|
-
self.addCleanup(s.close)
|
|
1569
|
-
self.assertRaisesRegex(ssl.SSLError, "certificate verify failed",
|
|
1570
|
-
s.connect, self.server_addr)
|
|
1571
|
-
|
|
1572
|
-
def test_connect_capath(self):
|
|
1573
|
-
# Verify server certificates using the `capath` argument
|
|
1574
|
-
# NOTE: the subject hashing algorithm has been changed between
|
|
1575
|
-
# OpenSSL 0.9.8n and 1.0.0, as a result the capath directory must
|
|
1576
|
-
# contain both versions of each certificate (same content, different
|
|
1577
|
-
# filename) for this test to be portable across OpenSSL releases.
|
|
1578
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1579
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1580
|
-
ctx.load_verify_locations(capath=CAPATH)
|
|
1581
|
-
with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s:
|
|
1582
|
-
s.connect(self.server_addr)
|
|
1583
|
-
cert = s.getpeercert()
|
|
1584
|
-
self.assertTrue(cert)
|
|
1585
|
-
# Same with a bytes `capath` argument
|
|
1586
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1587
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1588
|
-
ctx.load_verify_locations(capath=BYTES_CAPATH)
|
|
1589
|
-
with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s:
|
|
1590
|
-
s.connect(self.server_addr)
|
|
1591
|
-
cert = s.getpeercert()
|
|
1592
|
-
self.assertTrue(cert)
|
|
1593
|
-
|
|
1594
|
-
def test_connect_cadata(self):
|
|
1595
|
-
with open(SIGNING_CA) as f:
|
|
1596
|
-
pem = f.read()
|
|
1597
|
-
der = ssl.PEM_cert_to_DER_cert(pem)
|
|
1598
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1599
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1600
|
-
ctx.load_verify_locations(cadata=pem)
|
|
1601
|
-
with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s:
|
|
1602
|
-
s.connect(self.server_addr)
|
|
1603
|
-
cert = s.getpeercert()
|
|
1604
|
-
self.assertTrue(cert)
|
|
1605
|
-
|
|
1606
|
-
# same with DER
|
|
1607
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1608
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1609
|
-
ctx.load_verify_locations(cadata=der)
|
|
1610
|
-
with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s:
|
|
1611
|
-
s.connect(self.server_addr)
|
|
1612
|
-
cert = s.getpeercert()
|
|
1613
|
-
self.assertTrue(cert)
|
|
1614
|
-
|
|
1615
|
-
@unittest.skipIf(os.name == "nt", "Can't use a socket as a file under Windows")
|
|
1616
|
-
def test_makefile_close(self):
|
|
1617
|
-
# Issue #5238: creating a file-like object with makefile() shouldn't
|
|
1618
|
-
# delay closing the underlying "real socket" (here tested with its
|
|
1619
|
-
# file descriptor, hence skipping the test under Windows).
|
|
1620
|
-
ss = test_wrap_socket(socket.socket(socket.AF_INET))
|
|
1621
|
-
ss.connect(self.server_addr)
|
|
1622
|
-
fd = ss.fileno()
|
|
1623
|
-
f = ss.makefile()
|
|
1624
|
-
f.close()
|
|
1625
|
-
# The fd is still open
|
|
1626
|
-
os.read(fd, 0)
|
|
1627
|
-
# Closing the SSL socket should close the fd too
|
|
1628
|
-
ss.close()
|
|
1629
|
-
gc.collect()
|
|
1630
|
-
with self.assertRaises(OSError) as e:
|
|
1631
|
-
os.read(fd, 0)
|
|
1632
|
-
self.assertEqual(e.exception.errno, errno.EBADF)
|
|
1633
|
-
|
|
1634
|
-
def test_non_blocking_handshake(self):
|
|
1635
|
-
s = socket.socket(socket.AF_INET)
|
|
1636
|
-
s.connect(self.server_addr)
|
|
1637
|
-
s.setblocking(False)
|
|
1638
|
-
s = test_wrap_socket(s,
|
|
1639
|
-
cert_reqs=ssl.CERT_NONE,
|
|
1640
|
-
do_handshake_on_connect=False)
|
|
1641
|
-
self.addCleanup(s.close)
|
|
1642
|
-
count = 0
|
|
1643
|
-
while True:
|
|
1644
|
-
try:
|
|
1645
|
-
count += 1
|
|
1646
|
-
s.do_handshake()
|
|
1647
|
-
break
|
|
1648
|
-
except ssl.SSLWantReadError:
|
|
1649
|
-
select.select([s], [], [])
|
|
1650
|
-
except ssl.SSLWantWriteError:
|
|
1651
|
-
select.select([], [s], [])
|
|
1652
|
-
if support.verbose:
|
|
1653
|
-
sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count)
|
|
1654
|
-
|
|
1655
|
-
def test_get_server_certificate(self):
|
|
1656
|
-
_test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA)
|
|
1657
|
-
|
|
1658
|
-
def test_get_server_certificate_fail(self):
|
|
1659
|
-
# Connection failure crashes ThreadedEchoServer, so run this in an
|
|
1660
|
-
# independent test method
|
|
1661
|
-
_test_get_server_certificate_fail(self, *self.server_addr)
|
|
1662
|
-
|
|
1663
|
-
def test_ciphers(self):
|
|
1664
|
-
with test_wrap_socket(socket.socket(socket.AF_INET),
|
|
1665
|
-
cert_reqs=ssl.CERT_NONE, ciphers="ALL") as s:
|
|
1666
|
-
s.connect(self.server_addr)
|
|
1667
|
-
with test_wrap_socket(socket.socket(socket.AF_INET),
|
|
1668
|
-
cert_reqs=ssl.CERT_NONE, ciphers="DEFAULT") as s:
|
|
1669
|
-
s.connect(self.server_addr)
|
|
1670
|
-
# Error checking can happen at instantiation or when connecting
|
|
1671
|
-
with self.assertRaisesRegex(ssl.SSLError, "No cipher can be selected"):
|
|
1672
|
-
with socket.socket(socket.AF_INET) as sock:
|
|
1673
|
-
s = test_wrap_socket(sock,
|
|
1674
|
-
cert_reqs=ssl.CERT_NONE, ciphers="^$:,;?*'dorothyx")
|
|
1675
|
-
s.connect(self.server_addr)
|
|
1676
|
-
|
|
1677
|
-
def test_get_ca_certs_capath(self):
|
|
1678
|
-
# capath certs are loaded on request
|
|
1679
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1680
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1681
|
-
ctx.load_verify_locations(capath=CAPATH)
|
|
1682
|
-
self.assertEqual(ctx.get_ca_certs(), [])
|
|
1683
|
-
with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s:
|
|
1684
|
-
s.connect(self.server_addr)
|
|
1685
|
-
cert = s.getpeercert()
|
|
1686
|
-
self.assertTrue(cert)
|
|
1687
|
-
self.assertEqual(len(ctx.get_ca_certs()), 1)
|
|
1688
|
-
|
|
1689
|
-
@needs_sni
|
|
1690
|
-
def test_context_setget(self):
|
|
1691
|
-
# Check that the context of a connected socket can be replaced.
|
|
1692
|
-
ctx1 = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
1693
|
-
ctx2 = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1694
|
-
s = socket.socket(socket.AF_INET)
|
|
1695
|
-
with ctx1.wrap_socket(s) as ss:
|
|
1696
|
-
ss.connect(self.server_addr)
|
|
1697
|
-
self.assertIs(ss.context, ctx1)
|
|
1698
|
-
self.assertIs(ss._sslobj.context, ctx1)
|
|
1699
|
-
ss.context = ctx2
|
|
1700
|
-
self.assertIs(ss.context, ctx2)
|
|
1701
|
-
self.assertIs(ss._sslobj.context, ctx2)
|
|
1702
|
-
|
|
1703
|
-
def ssl_io_loop(self, sock, incoming, outgoing, func, *args, **kwargs):
|
|
1704
|
-
# A simple IO loop. Call func(*args) depending on the error we get
|
|
1705
|
-
# (WANT_READ or WANT_WRITE) move data between the socket and the BIOs.
|
|
1706
|
-
timeout = kwargs.get('timeout', 10)
|
|
1707
|
-
count = 0
|
|
1708
|
-
while True:
|
|
1709
|
-
errno = None
|
|
1710
|
-
count += 1
|
|
1711
|
-
try:
|
|
1712
|
-
ret = func(*args)
|
|
1713
|
-
except ssl.SSLError as e:
|
|
1714
|
-
if e.errno not in (ssl.SSL_ERROR_WANT_READ,
|
|
1715
|
-
ssl.SSL_ERROR_WANT_WRITE):
|
|
1716
|
-
raise
|
|
1717
|
-
errno = e.errno
|
|
1718
|
-
# Get any data from the outgoing BIO irrespective of any error, and
|
|
1719
|
-
# send it to the socket.
|
|
1720
|
-
buf = outgoing.read()
|
|
1721
|
-
sock.sendall(buf)
|
|
1722
|
-
# If there's no error, we're done. For WANT_READ, we need to get
|
|
1723
|
-
# data from the socket and put it in the incoming BIO.
|
|
1724
|
-
if errno is None:
|
|
1725
|
-
break
|
|
1726
|
-
elif errno == ssl.SSL_ERROR_WANT_READ:
|
|
1727
|
-
buf = sock.recv(32768)
|
|
1728
|
-
if buf:
|
|
1729
|
-
incoming.write(buf)
|
|
1730
|
-
else:
|
|
1731
|
-
incoming.write_eof()
|
|
1732
|
-
if support.verbose:
|
|
1733
|
-
sys.stdout.write("Needed %d calls to complete %s().\n"
|
|
1734
|
-
% (count, func.__name__))
|
|
1735
|
-
return ret
|
|
1736
|
-
|
|
1737
|
-
def test_bio_handshake(self):
|
|
1738
|
-
sock = socket.socket(socket.AF_INET)
|
|
1739
|
-
self.addCleanup(sock.close)
|
|
1740
|
-
sock.connect(self.server_addr)
|
|
1741
|
-
incoming = ssl.MemoryBIO()
|
|
1742
|
-
outgoing = ssl.MemoryBIO()
|
|
1743
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1744
|
-
ctx.verify_mode = ssl.CERT_REQUIRED
|
|
1745
|
-
ctx.load_verify_locations(SIGNING_CA)
|
|
1746
|
-
ctx.check_hostname = True
|
|
1747
|
-
sslobj = ctx.wrap_bio(incoming, outgoing, False, 'localhost')
|
|
1748
|
-
self.assertIs(sslobj._sslobj.owner, sslobj)
|
|
1749
|
-
self.assertIsNone(sslobj.cipher())
|
|
1750
|
-
self.assertIsNone(sslobj.version())
|
|
1751
|
-
self.assertIsNotNone(sslobj.shared_ciphers())
|
|
1752
|
-
self.assertRaises(ValueError, sslobj.getpeercert)
|
|
1753
|
-
if 'tls-unique' in ssl.CHANNEL_BINDING_TYPES:
|
|
1754
|
-
self.assertIsNone(sslobj.get_channel_binding('tls-unique'))
|
|
1755
|
-
self.ssl_io_loop(sock, incoming, outgoing, sslobj.do_handshake)
|
|
1756
|
-
self.assertTrue(sslobj.cipher())
|
|
1757
|
-
self.assertIsNotNone(sslobj.shared_ciphers())
|
|
1758
|
-
self.assertIsNotNone(sslobj.version())
|
|
1759
|
-
self.assertTrue(sslobj.getpeercert())
|
|
1760
|
-
if 'tls-unique' in ssl.CHANNEL_BINDING_TYPES:
|
|
1761
|
-
self.assertTrue(sslobj.get_channel_binding('tls-unique'))
|
|
1762
|
-
try:
|
|
1763
|
-
self.ssl_io_loop(sock, incoming, outgoing, sslobj.unwrap)
|
|
1764
|
-
except ssl.SSLSyscallError:
|
|
1765
|
-
# If the server shuts down the TCP connection without sending a
|
|
1766
|
-
# secure shutdown message, this is reported as SSL_ERROR_SYSCALL
|
|
1767
|
-
pass
|
|
1768
|
-
self.assertRaises(ssl.SSLError, sslobj.write, b'foo')
|
|
1769
|
-
|
|
1770
|
-
def test_bio_read_write_data(self):
|
|
1771
|
-
sock = socket.socket(socket.AF_INET)
|
|
1772
|
-
self.addCleanup(sock.close)
|
|
1773
|
-
sock.connect(self.server_addr)
|
|
1774
|
-
incoming = ssl.MemoryBIO()
|
|
1775
|
-
outgoing = ssl.MemoryBIO()
|
|
1776
|
-
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
1777
|
-
ctx.verify_mode = ssl.CERT_NONE
|
|
1778
|
-
sslobj = ctx.wrap_bio(incoming, outgoing, False)
|
|
1779
|
-
self.ssl_io_loop(sock, incoming, outgoing, sslobj.do_handshake)
|
|
1780
|
-
req = b'FOO\n'
|
|
1781
|
-
self.ssl_io_loop(sock, incoming, outgoing, sslobj.write, req)
|
|
1782
|
-
buf = self.ssl_io_loop(sock, incoming, outgoing, sslobj.read, 1024)
|
|
1783
|
-
self.assertEqual(buf, b'foo\n')
|
|
1784
|
-
self.ssl_io_loop(sock, incoming, outgoing, sslobj.unwrap)
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
class NetworkedTests(unittest.TestCase):
|
|
1788
|
-
|
|
1789
|
-
def test_timeout_connect_ex(self):
|
|
1790
|
-
# Issue #12065: on a timeout, connect_ex() should return the original
|
|
1791
|
-
# errno (mimicking the behaviour of non-SSL sockets).
|
|
1792
|
-
with support.transient_internet(REMOTE_HOST):
|
|
1793
|
-
s = test_wrap_socket(socket.socket(socket.AF_INET),
|
|
1794
|
-
cert_reqs=ssl.CERT_REQUIRED,
|
|
1795
|
-
do_handshake_on_connect=False)
|
|
1796
|
-
self.addCleanup(s.close)
|
|
1797
|
-
s.settimeout(0.0000001)
|
|
1798
|
-
rc = s.connect_ex((REMOTE_HOST, 443))
|
|
1799
|
-
if rc == 0:
|
|
1800
|
-
self.skipTest("REMOTE_HOST responded too quickly")
|
|
1801
|
-
self.assertIn(rc, (errno.EAGAIN, errno.EWOULDBLOCK))
|
|
1802
|
-
|
|
1803
|
-
@unittest.skipUnless(support.IPV6_ENABLED, 'Needs IPv6')
|
|
1804
|
-
def test_get_server_certificate_ipv6(self):
|
|
1805
|
-
with support.transient_internet('ipv6.google.com'):
|
|
1806
|
-
_test_get_server_certificate(self, 'ipv6.google.com', 443)
|
|
1807
|
-
_test_get_server_certificate_fail(self, 'ipv6.google.com', 443)
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
def _test_get_server_certificate(test, host, port, cert=None):
|
|
1811
|
-
pem = ssl.get_server_certificate((host, port))
|
|
1812
|
-
if not pem:
|
|
1813
|
-
test.fail("No server certificate on %s:%s!" % (host, port))
|
|
1814
|
-
|
|
1815
|
-
pem = ssl.get_server_certificate((host, port), ca_certs=cert)
|
|
1816
|
-
if not pem:
|
|
1817
|
-
test.fail("No server certificate on %s:%s!" % (host, port))
|
|
1818
|
-
if support.verbose:
|
|
1819
|
-
sys.stdout.write("\nVerified certificate for %s:%s is\n%s\n" % (host, port ,pem))
|
|
1820
|
-
|
|
1821
|
-
def _test_get_server_certificate_fail(test, host, port):
|
|
1822
|
-
try:
|
|
1823
|
-
pem = ssl.get_server_certificate((host, port), ca_certs=CERTFILE)
|
|
1824
|
-
except ssl.SSLError as x:
|
|
1825
|
-
#should fail
|
|
1826
|
-
if support.verbose:
|
|
1827
|
-
sys.stdout.write("%s\n" % x)
|
|
1828
|
-
else:
|
|
1829
|
-
test.fail("Got server certificate %s for %s:%s!" % (pem, host, port))
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
if _have_threads:
|
|
1833
|
-
from test.ssl_servers import make_https_server
|
|
1834
|
-
|
|
1835
|
-
class ThreadedEchoServer(threading.Thread):
|
|
1836
|
-
|
|
1837
|
-
class ConnectionHandler(threading.Thread):
|
|
1838
|
-
|
|
1839
|
-
"""A mildly complicated class, because we want it to work both
|
|
1840
|
-
with and without the SSL wrapper around the socket connection, so
|
|
1841
|
-
that we can test the STARTTLS functionality."""
|
|
1842
|
-
|
|
1843
|
-
def __init__(self, server, connsock, addr):
|
|
1844
|
-
self.server = server
|
|
1845
|
-
self.running = False
|
|
1846
|
-
self.sock = connsock
|
|
1847
|
-
self.addr = addr
|
|
1848
|
-
self.sock.setblocking(1)
|
|
1849
|
-
self.sslconn = None
|
|
1850
|
-
threading.Thread.__init__(self)
|
|
1851
|
-
self.daemon = True
|
|
1852
|
-
|
|
1853
|
-
def wrap_conn(self):
|
|
1854
|
-
try:
|
|
1855
|
-
self.sslconn = self.server.context.wrap_socket(
|
|
1856
|
-
self.sock, server_side=True)
|
|
1857
|
-
self.server.selected_npn_protocols.append(self.sslconn.selected_npn_protocol())
|
|
1858
|
-
self.server.selected_alpn_protocols.append(self.sslconn.selected_alpn_protocol())
|
|
1859
|
-
except (ssl.SSLError, ConnectionResetError, OSError) as e:
|
|
1860
|
-
# We treat ConnectionResetError as though it were an
|
|
1861
|
-
# SSLError - OpenSSL on Ubuntu abruptly closes the
|
|
1862
|
-
# connection when asked to use an unsupported protocol.
|
|
1863
|
-
#
|
|
1864
|
-
# OSError may occur with wrong protocols, e.g. both
|
|
1865
|
-
# sides use PROTOCOL_TLS_SERVER.
|
|
1866
|
-
#
|
|
1867
|
-
# XXX Various errors can have happened here, for example
|
|
1868
|
-
# a mismatching protocol version, an invalid certificate,
|
|
1869
|
-
# or a low-level bug. This should be made more discriminating.
|
|
1870
|
-
#
|
|
1871
|
-
# bpo-31323: Store the exception as string to prevent
|
|
1872
|
-
# a reference leak: server -> conn_errors -> exception
|
|
1873
|
-
# -> traceback -> self (ConnectionHandler) -> server
|
|
1874
|
-
self.server.conn_errors.append(str(e))
|
|
1875
|
-
if self.server.chatty:
|
|
1876
|
-
handle_error("\n server: bad connection attempt from " + repr(self.addr) + ":\n")
|
|
1877
|
-
self.running = False
|
|
1878
|
-
self.server.stop()
|
|
1879
|
-
self.close()
|
|
1880
|
-
return False
|
|
1881
|
-
else:
|
|
1882
|
-
self.server.shared_ciphers.append(self.sslconn.shared_ciphers())
|
|
1883
|
-
if self.server.context.verify_mode == ssl.CERT_REQUIRED:
|
|
1884
|
-
cert = self.sslconn.getpeercert()
|
|
1885
|
-
if support.verbose and self.server.chatty:
|
|
1886
|
-
sys.stdout.write(" client cert is " + pprint.pformat(cert) + "\n")
|
|
1887
|
-
cert_binary = self.sslconn.getpeercert(True)
|
|
1888
|
-
if support.verbose and self.server.chatty:
|
|
1889
|
-
sys.stdout.write(" cert binary is " + str(len(cert_binary)) + " bytes\n")
|
|
1890
|
-
cipher = self.sslconn.cipher()
|
|
1891
|
-
if support.verbose and self.server.chatty:
|
|
1892
|
-
sys.stdout.write(" server: connection cipher is now " + str(cipher) + "\n")
|
|
1893
|
-
sys.stdout.write(" server: selected protocol is now "
|
|
1894
|
-
+ str(self.sslconn.selected_npn_protocol()) + "\n")
|
|
1895
|
-
return True
|
|
1896
|
-
|
|
1897
|
-
def read(self):
|
|
1898
|
-
if self.sslconn:
|
|
1899
|
-
return self.sslconn.read()
|
|
1900
|
-
else:
|
|
1901
|
-
return self.sock.recv(1024)
|
|
1902
|
-
|
|
1903
|
-
def write(self, bytes):
|
|
1904
|
-
if self.sslconn:
|
|
1905
|
-
return self.sslconn.write(bytes)
|
|
1906
|
-
else:
|
|
1907
|
-
return self.sock.send(bytes)
|
|
1908
|
-
|
|
1909
|
-
def close(self):
|
|
1910
|
-
if self.sslconn:
|
|
1911
|
-
self.sslconn.close()
|
|
1912
|
-
else:
|
|
1913
|
-
self.sock.close()
|
|
1914
|
-
|
|
1915
|
-
def run(self):
|
|
1916
|
-
self.running = True
|
|
1917
|
-
if not self.server.starttls_server:
|
|
1918
|
-
if not self.wrap_conn():
|
|
1919
|
-
return
|
|
1920
|
-
while self.running:
|
|
1921
|
-
try:
|
|
1922
|
-
msg = self.read()
|
|
1923
|
-
stripped = msg.strip()
|
|
1924
|
-
if not stripped:
|
|
1925
|
-
# eof, so quit this handler
|
|
1926
|
-
self.running = False
|
|
1927
|
-
try:
|
|
1928
|
-
self.sock = self.sslconn.unwrap()
|
|
1929
|
-
except OSError:
|
|
1930
|
-
# Many tests shut the TCP connection down
|
|
1931
|
-
# without an SSL shutdown. This causes
|
|
1932
|
-
# unwrap() to raise OSError with errno=0!
|
|
1933
|
-
pass
|
|
1934
|
-
else:
|
|
1935
|
-
self.sslconn = None
|
|
1936
|
-
self.close()
|
|
1937
|
-
elif stripped == b'over':
|
|
1938
|
-
if support.verbose and self.server.connectionchatty:
|
|
1939
|
-
sys.stdout.write(" server: client closed connection\n")
|
|
1940
|
-
self.close()
|
|
1941
|
-
return
|
|
1942
|
-
elif (self.server.starttls_server and
|
|
1943
|
-
stripped == b'STARTTLS'):
|
|
1944
|
-
if support.verbose and self.server.connectionchatty:
|
|
1945
|
-
sys.stdout.write(" server: read STARTTLS from client, sending OK...\n")
|
|
1946
|
-
self.write(b"OK\n")
|
|
1947
|
-
if not self.wrap_conn():
|
|
1948
|
-
return
|
|
1949
|
-
elif (self.server.starttls_server and self.sslconn
|
|
1950
|
-
and stripped == b'ENDTLS'):
|
|
1951
|
-
if support.verbose and self.server.connectionchatty:
|
|
1952
|
-
sys.stdout.write(" server: read ENDTLS from client, sending OK...\n")
|
|
1953
|
-
self.write(b"OK\n")
|
|
1954
|
-
self.sock = self.sslconn.unwrap()
|
|
1955
|
-
self.sslconn = None
|
|
1956
|
-
if support.verbose and self.server.connectionchatty:
|
|
1957
|
-
sys.stdout.write(" server: connection is now unencrypted...\n")
|
|
1958
|
-
elif stripped == b'CB tls-unique':
|
|
1959
|
-
if support.verbose and self.server.connectionchatty:
|
|
1960
|
-
sys.stdout.write(" server: read CB tls-unique from client, sending our CB data...\n")
|
|
1961
|
-
data = self.sslconn.get_channel_binding("tls-unique")
|
|
1962
|
-
self.write(repr(data).encode("us-ascii") + b"\n")
|
|
1963
|
-
else:
|
|
1964
|
-
if (support.verbose and
|
|
1965
|
-
self.server.connectionchatty):
|
|
1966
|
-
ctype = (self.sslconn and "encrypted") or "unencrypted"
|
|
1967
|
-
sys.stdout.write(" server: read %r (%s), sending back %r (%s)...\n"
|
|
1968
|
-
% (msg, ctype, msg.lower(), ctype))
|
|
1969
|
-
self.write(msg.lower())
|
|
1970
|
-
except OSError:
|
|
1971
|
-
if self.server.chatty:
|
|
1972
|
-
handle_error("Test server failure:\n")
|
|
1973
|
-
self.close()
|
|
1974
|
-
self.running = False
|
|
1975
|
-
# normally, we'd just stop here, but for the test
|
|
1976
|
-
# harness, we want to stop the server
|
|
1977
|
-
self.server.stop()
|
|
1978
|
-
|
|
1979
|
-
def __init__(self, certificate=None, ssl_version=None,
|
|
1980
|
-
certreqs=None, cacerts=None,
|
|
1981
|
-
chatty=True, connectionchatty=False, starttls_server=False,
|
|
1982
|
-
npn_protocols=None, alpn_protocols=None,
|
|
1983
|
-
ciphers=None, context=None):
|
|
1984
|
-
if context:
|
|
1985
|
-
self.context = context
|
|
1986
|
-
else:
|
|
1987
|
-
self.context = ssl.SSLContext(ssl_version
|
|
1988
|
-
if ssl_version is not None
|
|
1989
|
-
else ssl.PROTOCOL_TLSv1)
|
|
1990
|
-
self.context.verify_mode = (certreqs if certreqs is not None
|
|
1991
|
-
else ssl.CERT_NONE)
|
|
1992
|
-
if cacerts:
|
|
1993
|
-
self.context.load_verify_locations(cacerts)
|
|
1994
|
-
if certificate:
|
|
1995
|
-
self.context.load_cert_chain(certificate)
|
|
1996
|
-
if npn_protocols:
|
|
1997
|
-
self.context.set_npn_protocols(npn_protocols)
|
|
1998
|
-
if alpn_protocols:
|
|
1999
|
-
self.context.set_alpn_protocols(alpn_protocols)
|
|
2000
|
-
if ciphers:
|
|
2001
|
-
self.context.set_ciphers(ciphers)
|
|
2002
|
-
self.chatty = chatty
|
|
2003
|
-
self.connectionchatty = connectionchatty
|
|
2004
|
-
self.starttls_server = starttls_server
|
|
2005
|
-
self.sock = socket.socket()
|
|
2006
|
-
self.port = support.bind_port(self.sock)
|
|
2007
|
-
self.flag = None
|
|
2008
|
-
self.active = False
|
|
2009
|
-
self.selected_npn_protocols = []
|
|
2010
|
-
self.selected_alpn_protocols = []
|
|
2011
|
-
self.shared_ciphers = []
|
|
2012
|
-
self.conn_errors = []
|
|
2013
|
-
threading.Thread.__init__(self)
|
|
2014
|
-
self.daemon = True
|
|
2015
|
-
|
|
2016
|
-
def __enter__(self):
|
|
2017
|
-
self.start(threading.Event())
|
|
2018
|
-
self.flag.wait()
|
|
2019
|
-
return self
|
|
2020
|
-
|
|
2021
|
-
def __exit__(self, *args):
|
|
2022
|
-
self.stop()
|
|
2023
|
-
self.join()
|
|
2024
|
-
|
|
2025
|
-
def start(self, flag=None):
|
|
2026
|
-
self.flag = flag
|
|
2027
|
-
threading.Thread.start(self)
|
|
2028
|
-
|
|
2029
|
-
def run(self):
|
|
2030
|
-
self.sock.settimeout(0.05)
|
|
2031
|
-
self.sock.listen()
|
|
2032
|
-
self.active = True
|
|
2033
|
-
if self.flag:
|
|
2034
|
-
# signal an event
|
|
2035
|
-
self.flag.set()
|
|
2036
|
-
while self.active:
|
|
2037
|
-
try:
|
|
2038
|
-
newconn, connaddr = self.sock.accept()
|
|
2039
|
-
if support.verbose and self.chatty:
|
|
2040
|
-
sys.stdout.write(' server: new connection from '
|
|
2041
|
-
+ repr(connaddr) + '\n')
|
|
2042
|
-
handler = self.ConnectionHandler(self, newconn, connaddr)
|
|
2043
|
-
handler.start()
|
|
2044
|
-
handler.join()
|
|
2045
|
-
except socket.timeout:
|
|
2046
|
-
pass
|
|
2047
|
-
except KeyboardInterrupt:
|
|
2048
|
-
self.stop()
|
|
2049
|
-
self.sock.close()
|
|
2050
|
-
|
|
2051
|
-
def stop(self):
|
|
2052
|
-
self.active = False
|
|
2053
|
-
|
|
2054
|
-
class AsyncoreEchoServer(threading.Thread):
|
|
2055
|
-
|
|
2056
|
-
# this one's based on asyncore.dispatcher
|
|
2057
|
-
|
|
2058
|
-
class EchoServer (asyncore.dispatcher):
|
|
2059
|
-
|
|
2060
|
-
class ConnectionHandler(asyncore.dispatcher_with_send):
|
|
2061
|
-
|
|
2062
|
-
def __init__(self, conn, certfile):
|
|
2063
|
-
self.socket = test_wrap_socket(conn, server_side=True,
|
|
2064
|
-
certfile=certfile,
|
|
2065
|
-
do_handshake_on_connect=False)
|
|
2066
|
-
asyncore.dispatcher_with_send.__init__(self, self.socket)
|
|
2067
|
-
self._ssl_accepting = True
|
|
2068
|
-
self._do_ssl_handshake()
|
|
2069
|
-
|
|
2070
|
-
def readable(self):
|
|
2071
|
-
if isinstance(self.socket, ssl.SSLSocket):
|
|
2072
|
-
while self.socket.pending() > 0:
|
|
2073
|
-
self.handle_read_event()
|
|
2074
|
-
return True
|
|
2075
|
-
|
|
2076
|
-
def _do_ssl_handshake(self):
|
|
2077
|
-
try:
|
|
2078
|
-
self.socket.do_handshake()
|
|
2079
|
-
except (ssl.SSLWantReadError, ssl.SSLWantWriteError):
|
|
2080
|
-
return
|
|
2081
|
-
except ssl.SSLEOFError:
|
|
2082
|
-
return self.handle_close()
|
|
2083
|
-
except ssl.SSLError:
|
|
2084
|
-
raise
|
|
2085
|
-
except OSError as err:
|
|
2086
|
-
if err.args[0] == errno.ECONNABORTED:
|
|
2087
|
-
return self.handle_close()
|
|
2088
|
-
else:
|
|
2089
|
-
self._ssl_accepting = False
|
|
2090
|
-
|
|
2091
|
-
def handle_read(self):
|
|
2092
|
-
if self._ssl_accepting:
|
|
2093
|
-
self._do_ssl_handshake()
|
|
2094
|
-
else:
|
|
2095
|
-
data = self.recv(1024)
|
|
2096
|
-
if support.verbose:
|
|
2097
|
-
sys.stdout.write(" server: read %s from client\n" % repr(data))
|
|
2098
|
-
if not data:
|
|
2099
|
-
self.close()
|
|
2100
|
-
else:
|
|
2101
|
-
self.send(data.lower())
|
|
2102
|
-
|
|
2103
|
-
def handle_close(self):
|
|
2104
|
-
self.close()
|
|
2105
|
-
if support.verbose:
|
|
2106
|
-
sys.stdout.write(" server: closed connection %s\n" % self.socket)
|
|
2107
|
-
|
|
2108
|
-
def handle_error(self):
|
|
2109
|
-
raise
|
|
2110
|
-
|
|
2111
|
-
def __init__(self, certfile):
|
|
2112
|
-
self.certfile = certfile
|
|
2113
|
-
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
2114
|
-
self.port = support.bind_port(sock, '')
|
|
2115
|
-
asyncore.dispatcher.__init__(self, sock)
|
|
2116
|
-
self.listen(5)
|
|
2117
|
-
|
|
2118
|
-
def handle_accepted(self, sock_obj, addr):
|
|
2119
|
-
if support.verbose:
|
|
2120
|
-
sys.stdout.write(" server: new connection from %s:%s\n" %addr)
|
|
2121
|
-
self.ConnectionHandler(sock_obj, self.certfile)
|
|
2122
|
-
|
|
2123
|
-
def handle_error(self):
|
|
2124
|
-
raise
|
|
2125
|
-
|
|
2126
|
-
def __init__(self, certfile):
|
|
2127
|
-
self.flag = None
|
|
2128
|
-
self.active = False
|
|
2129
|
-
self.server = self.EchoServer(certfile)
|
|
2130
|
-
self.port = self.server.port
|
|
2131
|
-
threading.Thread.__init__(self)
|
|
2132
|
-
self.daemon = True
|
|
2133
|
-
|
|
2134
|
-
def __str__(self):
|
|
2135
|
-
return "<%s %s>" % (self.__class__.__name__, self.server)
|
|
2136
|
-
|
|
2137
|
-
def __enter__(self):
|
|
2138
|
-
self.start(threading.Event())
|
|
2139
|
-
self.flag.wait()
|
|
2140
|
-
return self
|
|
2141
|
-
|
|
2142
|
-
def __exit__(self, *args):
|
|
2143
|
-
if support.verbose:
|
|
2144
|
-
sys.stdout.write(" cleanup: stopping server.\n")
|
|
2145
|
-
self.stop()
|
|
2146
|
-
if support.verbose:
|
|
2147
|
-
sys.stdout.write(" cleanup: joining server thread.\n")
|
|
2148
|
-
self.join()
|
|
2149
|
-
if support.verbose:
|
|
2150
|
-
sys.stdout.write(" cleanup: successfully joined.\n")
|
|
2151
|
-
# make sure that ConnectionHandler is removed from socket_map
|
|
2152
|
-
asyncore.close_all(ignore_all=True)
|
|
2153
|
-
|
|
2154
|
-
def start (self, flag=None):
|
|
2155
|
-
self.flag = flag
|
|
2156
|
-
threading.Thread.start(self)
|
|
2157
|
-
|
|
2158
|
-
def run(self):
|
|
2159
|
-
self.active = True
|
|
2160
|
-
if self.flag:
|
|
2161
|
-
self.flag.set()
|
|
2162
|
-
while self.active:
|
|
2163
|
-
try:
|
|
2164
|
-
asyncore.loop(1)
|
|
2165
|
-
except:
|
|
2166
|
-
pass
|
|
2167
|
-
|
|
2168
|
-
def stop(self):
|
|
2169
|
-
self.active = False
|
|
2170
|
-
self.server.close()
|
|
2171
|
-
|
|
2172
|
-
def server_params_test(client_context, server_context, indata=b"FOO\n",
|
|
2173
|
-
chatty=True, connectionchatty=False, sni_name=None,
|
|
2174
|
-
session=None):
|
|
2175
|
-
"""
|
|
2176
|
-
Launch a server, connect a client to it and try various reads
|
|
2177
|
-
and writes.
|
|
2178
|
-
"""
|
|
2179
|
-
stats = {}
|
|
2180
|
-
server = ThreadedEchoServer(context=server_context,
|
|
2181
|
-
chatty=chatty,
|
|
2182
|
-
connectionchatty=False)
|
|
2183
|
-
with server:
|
|
2184
|
-
with client_context.wrap_socket(socket.socket(),
|
|
2185
|
-
server_hostname=sni_name, session=session) as s:
|
|
2186
|
-
s.connect((HOST, server.port))
|
|
2187
|
-
for arg in [indata, bytearray(indata), memoryview(indata)]:
|
|
2188
|
-
if connectionchatty:
|
|
2189
|
-
if support.verbose:
|
|
2190
|
-
sys.stdout.write(
|
|
2191
|
-
" client: sending %r...\n" % indata)
|
|
2192
|
-
s.write(arg)
|
|
2193
|
-
outdata = s.read()
|
|
2194
|
-
if connectionchatty:
|
|
2195
|
-
if support.verbose:
|
|
2196
|
-
sys.stdout.write(" client: read %r\n" % outdata)
|
|
2197
|
-
if outdata != indata.lower():
|
|
2198
|
-
raise AssertionError(
|
|
2199
|
-
"bad data <<%r>> (%d) received; expected <<%r>> (%d)\n"
|
|
2200
|
-
% (outdata[:20], len(outdata),
|
|
2201
|
-
indata[:20].lower(), len(indata)))
|
|
2202
|
-
s.write(b"over\n")
|
|
2203
|
-
if connectionchatty:
|
|
2204
|
-
if support.verbose:
|
|
2205
|
-
sys.stdout.write(" client: closing connection.\n")
|
|
2206
|
-
stats.update({
|
|
2207
|
-
'compression': s.compression(),
|
|
2208
|
-
'cipher': s.cipher(),
|
|
2209
|
-
'peercert': s.getpeercert(),
|
|
2210
|
-
'client_alpn_protocol': s.selected_alpn_protocol(),
|
|
2211
|
-
'client_npn_protocol': s.selected_npn_protocol(),
|
|
2212
|
-
'version': s.version(),
|
|
2213
|
-
'session_reused': s.session_reused,
|
|
2214
|
-
'session': s.session,
|
|
2215
|
-
})
|
|
2216
|
-
s.close()
|
|
2217
|
-
stats['server_alpn_protocols'] = server.selected_alpn_protocols
|
|
2218
|
-
stats['server_npn_protocols'] = server.selected_npn_protocols
|
|
2219
|
-
stats['server_shared_ciphers'] = server.shared_ciphers
|
|
2220
|
-
return stats
|
|
2221
|
-
|
|
2222
|
-
def try_protocol_combo(server_protocol, client_protocol, expect_success,
|
|
2223
|
-
certsreqs=None, server_options=0, client_options=0):
|
|
2224
|
-
"""
|
|
2225
|
-
Try to SSL-connect using *client_protocol* to *server_protocol*.
|
|
2226
|
-
If *expect_success* is true, assert that the connection succeeds,
|
|
2227
|
-
if it's false, assert that the connection fails.
|
|
2228
|
-
Also, if *expect_success* is a string, assert that it is the protocol
|
|
2229
|
-
version actually used by the connection.
|
|
2230
|
-
"""
|
|
2231
|
-
if certsreqs is None:
|
|
2232
|
-
certsreqs = ssl.CERT_NONE
|
|
2233
|
-
certtype = {
|
|
2234
|
-
ssl.CERT_NONE: "CERT_NONE",
|
|
2235
|
-
ssl.CERT_OPTIONAL: "CERT_OPTIONAL",
|
|
2236
|
-
ssl.CERT_REQUIRED: "CERT_REQUIRED",
|
|
2237
|
-
}[certsreqs]
|
|
2238
|
-
if support.verbose:
|
|
2239
|
-
formatstr = (expect_success and " %s->%s %s\n") or " {%s->%s} %s\n"
|
|
2240
|
-
sys.stdout.write(formatstr %
|
|
2241
|
-
(ssl.get_protocol_name(client_protocol),
|
|
2242
|
-
ssl.get_protocol_name(server_protocol),
|
|
2243
|
-
certtype))
|
|
2244
|
-
client_context = ssl.SSLContext(client_protocol)
|
|
2245
|
-
client_context.options |= client_options
|
|
2246
|
-
server_context = ssl.SSLContext(server_protocol)
|
|
2247
|
-
server_context.options |= server_options
|
|
2248
|
-
|
|
2249
|
-
# NOTE: we must enable "ALL" ciphers on the client, otherwise an
|
|
2250
|
-
# SSLv23 client will send an SSLv3 hello (rather than SSLv2)
|
|
2251
|
-
# starting from OpenSSL 1.0.0 (see issue #8322).
|
|
2252
|
-
if client_context.protocol == ssl.PROTOCOL_SSLv23:
|
|
2253
|
-
client_context.set_ciphers("ALL")
|
|
2254
|
-
|
|
2255
|
-
for ctx in (client_context, server_context):
|
|
2256
|
-
ctx.verify_mode = certsreqs
|
|
2257
|
-
ctx.load_cert_chain(CERTFILE)
|
|
2258
|
-
ctx.load_verify_locations(CERTFILE)
|
|
2259
|
-
try:
|
|
2260
|
-
stats = server_params_test(client_context, server_context,
|
|
2261
|
-
chatty=False, connectionchatty=False)
|
|
2262
|
-
# Protocol mismatch can result in either an SSLError, or a
|
|
2263
|
-
# "Connection reset by peer" error.
|
|
2264
|
-
except ssl.SSLError:
|
|
2265
|
-
if expect_success:
|
|
2266
|
-
raise
|
|
2267
|
-
except OSError as e:
|
|
2268
|
-
if expect_success or e.errno != errno.ECONNRESET:
|
|
2269
|
-
raise
|
|
2270
|
-
else:
|
|
2271
|
-
if not expect_success:
|
|
2272
|
-
raise AssertionError(
|
|
2273
|
-
"Client protocol %s succeeded with server protocol %s!"
|
|
2274
|
-
% (ssl.get_protocol_name(client_protocol),
|
|
2275
|
-
ssl.get_protocol_name(server_protocol)))
|
|
2276
|
-
elif (expect_success is not True
|
|
2277
|
-
and expect_success != stats['version']):
|
|
2278
|
-
raise AssertionError("version mismatch: expected %r, got %r"
|
|
2279
|
-
% (expect_success, stats['version']))
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
class ThreadedTests(unittest.TestCase):
|
|
2283
|
-
|
|
2284
|
-
@skip_if_broken_ubuntu_ssl
|
|
2285
|
-
def test_echo(self):
|
|
2286
|
-
"""Basic test of an SSL client connecting to a server"""
|
|
2287
|
-
if support.verbose:
|
|
2288
|
-
sys.stdout.write("\n")
|
|
2289
|
-
for protocol in PROTOCOLS:
|
|
2290
|
-
if protocol in {ssl.PROTOCOL_TLS_CLIENT, ssl.PROTOCOL_TLS_SERVER}:
|
|
2291
|
-
continue
|
|
2292
|
-
with self.subTest(protocol=ssl._PROTOCOL_NAMES[protocol]):
|
|
2293
|
-
context = ssl.SSLContext(protocol)
|
|
2294
|
-
context.load_cert_chain(CERTFILE)
|
|
2295
|
-
server_params_test(context, context,
|
|
2296
|
-
chatty=True, connectionchatty=True)
|
|
2297
|
-
|
|
2298
|
-
client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
|
2299
|
-
client_context.load_verify_locations(SIGNING_CA)
|
|
2300
|
-
server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
|
2301
|
-
# server_context.load_verify_locations(SIGNING_CA)
|
|
2302
|
-
server_context.load_cert_chain(SIGNED_CERTFILE2)
|
|
2303
|
-
|
|
2304
|
-
with self.subTest(client=ssl.PROTOCOL_TLS_CLIENT, server=ssl.PROTOCOL_TLS_SERVER):
|
|
2305
|
-
server_params_test(client_context=client_context,
|
|
2306
|
-
server_context=server_context,
|
|
2307
|
-
chatty=True, connectionchatty=True,
|
|
2308
|
-
sni_name='fakehostname')
|
|
2309
|
-
|
|
2310
|
-
client_context.check_hostname = False
|
|
2311
|
-
with self.subTest(client=ssl.PROTOCOL_TLS_SERVER, server=ssl.PROTOCOL_TLS_CLIENT):
|
|
2312
|
-
with self.assertRaises(ssl.SSLError) as e:
|
|
2313
|
-
server_params_test(client_context=server_context,
|
|
2314
|
-
server_context=client_context,
|
|
2315
|
-
chatty=True, connectionchatty=True,
|
|
2316
|
-
sni_name='fakehostname')
|
|
2317
|
-
self.assertIn('called a function you should not call',
|
|
2318
|
-
str(e.exception))
|
|
2319
|
-
|
|
2320
|
-
with self.subTest(client=ssl.PROTOCOL_TLS_SERVER, server=ssl.PROTOCOL_TLS_SERVER):
|
|
2321
|
-
with self.assertRaises(ssl.SSLError) as e:
|
|
2322
|
-
server_params_test(client_context=server_context,
|
|
2323
|
-
server_context=server_context,
|
|
2324
|
-
chatty=True, connectionchatty=True)
|
|
2325
|
-
self.assertIn('called a function you should not call',
|
|
2326
|
-
str(e.exception))
|
|
2327
|
-
|
|
2328
|
-
with self.subTest(client=ssl.PROTOCOL_TLS_CLIENT, server=ssl.PROTOCOL_TLS_CLIENT):
|
|
2329
|
-
with self.assertRaises(ssl.SSLError) as e:
|
|
2330
|
-
server_params_test(client_context=server_context,
|
|
2331
|
-
server_context=client_context,
|
|
2332
|
-
chatty=True, connectionchatty=True)
|
|
2333
|
-
self.assertIn('called a function you should not call',
|
|
2334
|
-
str(e.exception))
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
def test_getpeercert(self):
|
|
2338
|
-
if support.verbose:
|
|
2339
|
-
sys.stdout.write("\n")
|
|
2340
|
-
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
2341
|
-
context.verify_mode = ssl.CERT_REQUIRED
|
|
2342
|
-
context.load_verify_locations(CERTFILE)
|
|
2343
|
-
context.load_cert_chain(CERTFILE)
|
|
2344
|
-
server = ThreadedEchoServer(context=context, chatty=False)
|
|
2345
|
-
with server:
|
|
2346
|
-
s = context.wrap_socket(socket.socket(),
|
|
2347
|
-
do_handshake_on_connect=False)
|
|
2348
|
-
s.connect((HOST, server.port))
|
|
2349
|
-
# getpeercert() raise ValueError while the handshake isn't
|
|
2350
|
-
# done.
|
|
2351
|
-
with self.assertRaises(ValueError):
|
|
2352
|
-
s.getpeercert()
|
|
2353
|
-
s.do_handshake()
|
|
2354
|
-
cert = s.getpeercert()
|
|
2355
|
-
self.assertTrue(cert, "Can't get peer certificate.")
|
|
2356
|
-
cipher = s.cipher()
|
|
2357
|
-
if support.verbose:
|
|
2358
|
-
sys.stdout.write(pprint.pformat(cert) + '\n')
|
|
2359
|
-
sys.stdout.write("Connection cipher is " + str(cipher) + '.\n')
|
|
2360
|
-
if 'subject' not in cert:
|
|
2361
|
-
self.fail("No subject field in certificate: %s." %
|
|
2362
|
-
pprint.pformat(cert))
|
|
2363
|
-
if ((('organizationName', 'Python Software Foundation'),)
|
|
2364
|
-
not in cert['subject']):
|
|
2365
|
-
self.fail(
|
|
2366
|
-
"Missing or invalid 'organizationName' field in certificate subject; "
|
|
2367
|
-
"should be 'Python Software Foundation'.")
|
|
2368
|
-
self.assertIn('notBefore', cert)
|
|
2369
|
-
self.assertIn('notAfter', cert)
|
|
2370
|
-
before = ssl.cert_time_to_seconds(cert['notBefore'])
|
|
2371
|
-
after = ssl.cert_time_to_seconds(cert['notAfter'])
|
|
2372
|
-
self.assertLess(before, after)
|
|
2373
|
-
s.close()
|
|
2374
|
-
|
|
2375
|
-
@unittest.skipUnless(have_verify_flags(),
|
|
2376
|
-
"verify_flags need OpenSSL > 0.9.8")
|
|
2377
|
-
def test_crl_check(self):
|
|
2378
|
-
if support.verbose:
|
|
2379
|
-
sys.stdout.write("\n")
|
|
2380
|
-
|
|
2381
|
-
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2382
|
-
server_context.load_cert_chain(SIGNED_CERTFILE)
|
|
2383
|
-
|
|
2384
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2385
|
-
context.verify_mode = ssl.CERT_REQUIRED
|
|
2386
|
-
context.load_verify_locations(SIGNING_CA)
|
|
2387
|
-
tf = getattr(ssl, "VERIFY_X509_TRUSTED_FIRST", 0)
|
|
2388
|
-
self.assertEqual(context.verify_flags, ssl.VERIFY_DEFAULT | tf)
|
|
2389
|
-
|
|
2390
|
-
# VERIFY_DEFAULT should pass
|
|
2391
|
-
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2392
|
-
with server:
|
|
2393
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
2394
|
-
s.connect((HOST, server.port))
|
|
2395
|
-
cert = s.getpeercert()
|
|
2396
|
-
self.assertTrue(cert, "Can't get peer certificate.")
|
|
2397
|
-
|
|
2398
|
-
# VERIFY_CRL_CHECK_LEAF without a loaded CRL file fails
|
|
2399
|
-
context.verify_flags |= ssl.VERIFY_CRL_CHECK_LEAF
|
|
2400
|
-
|
|
2401
|
-
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2402
|
-
with server:
|
|
2403
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
2404
|
-
with self.assertRaisesRegex(ssl.SSLError,
|
|
2405
|
-
"certificate verify failed"):
|
|
2406
|
-
s.connect((HOST, server.port))
|
|
2407
|
-
|
|
2408
|
-
# now load a CRL file. The CRL file is signed by the CA.
|
|
2409
|
-
context.load_verify_locations(CRLFILE)
|
|
2410
|
-
|
|
2411
|
-
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2412
|
-
with server:
|
|
2413
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
2414
|
-
s.connect((HOST, server.port))
|
|
2415
|
-
cert = s.getpeercert()
|
|
2416
|
-
self.assertTrue(cert, "Can't get peer certificate.")
|
|
2417
|
-
|
|
2418
|
-
def test_check_hostname(self):
|
|
2419
|
-
if support.verbose:
|
|
2420
|
-
sys.stdout.write("\n")
|
|
2421
|
-
|
|
2422
|
-
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2423
|
-
server_context.load_cert_chain(SIGNED_CERTFILE)
|
|
2424
|
-
|
|
2425
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
2426
|
-
context.verify_mode = ssl.CERT_REQUIRED
|
|
2427
|
-
context.check_hostname = True
|
|
2428
|
-
context.load_verify_locations(SIGNING_CA)
|
|
2429
|
-
|
|
2430
|
-
# correct hostname should verify
|
|
2431
|
-
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2432
|
-
with server:
|
|
2433
|
-
with context.wrap_socket(socket.socket(),
|
|
2434
|
-
server_hostname="localhost") as s:
|
|
2435
|
-
s.connect((HOST, server.port))
|
|
2436
|
-
cert = s.getpeercert()
|
|
2437
|
-
self.assertTrue(cert, "Can't get peer certificate.")
|
|
2438
|
-
|
|
2439
|
-
# incorrect hostname should raise an exception
|
|
2440
|
-
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2441
|
-
with server:
|
|
2442
|
-
with context.wrap_socket(socket.socket(),
|
|
2443
|
-
server_hostname="invalid") as s:
|
|
2444
|
-
with self.assertRaisesRegex(ssl.CertificateError,
|
|
2445
|
-
"hostname 'invalid' doesn't match 'localhost'"):
|
|
2446
|
-
s.connect((HOST, server.port))
|
|
2447
|
-
|
|
2448
|
-
# missing server_hostname arg should cause an exception, too
|
|
2449
|
-
server = ThreadedEchoServer(context=server_context, chatty=True)
|
|
2450
|
-
with server:
|
|
2451
|
-
with socket.socket() as s:
|
|
2452
|
-
with self.assertRaisesRegex(ValueError,
|
|
2453
|
-
"check_hostname requires server_hostname"):
|
|
2454
|
-
context.wrap_socket(s)
|
|
2455
|
-
|
|
2456
|
-
def test_wrong_cert(self):
|
|
2457
|
-
"""Connecting when the server rejects the client's certificate
|
|
2458
|
-
|
|
2459
|
-
Launch a server with CERT_REQUIRED, and check that trying to
|
|
2460
|
-
connect to it with a wrong client certificate fails.
|
|
2461
|
-
"""
|
|
2462
|
-
certfile = os.path.join(os.path.dirname(__file__) or os.curdir,
|
|
2463
|
-
"wrongcert.pem")
|
|
2464
|
-
server = ThreadedEchoServer(CERTFILE,
|
|
2465
|
-
certreqs=ssl.CERT_REQUIRED,
|
|
2466
|
-
cacerts=CERTFILE, chatty=False,
|
|
2467
|
-
connectionchatty=False)
|
|
2468
|
-
with server, \
|
|
2469
|
-
socket.socket() as sock, \
|
|
2470
|
-
test_wrap_socket(sock,
|
|
2471
|
-
certfile=certfile,
|
|
2472
|
-
ssl_version=ssl.PROTOCOL_TLSv1) as s:
|
|
2473
|
-
try:
|
|
2474
|
-
# Expect either an SSL error about the server rejecting
|
|
2475
|
-
# the connection, or a low-level connection reset (which
|
|
2476
|
-
# sometimes happens on Windows)
|
|
2477
|
-
s.connect((HOST, server.port))
|
|
2478
|
-
except ssl.SSLError as e:
|
|
2479
|
-
if support.verbose:
|
|
2480
|
-
sys.stdout.write("\nSSLError is %r\n" % e)
|
|
2481
|
-
except OSError as e:
|
|
2482
|
-
if e.errno != errno.ECONNRESET:
|
|
2483
|
-
raise
|
|
2484
|
-
if support.verbose:
|
|
2485
|
-
sys.stdout.write("\nsocket.error is %r\n" % e)
|
|
2486
|
-
else:
|
|
2487
|
-
self.fail("Use of invalid cert should have failed!")
|
|
2488
|
-
|
|
2489
|
-
def test_rude_shutdown(self):
|
|
2490
|
-
"""A brutal shutdown of an SSL server should raise an OSError
|
|
2491
|
-
in the client when attempting handshake.
|
|
2492
|
-
"""
|
|
2493
|
-
listener_ready = threading.Event()
|
|
2494
|
-
listener_gone = threading.Event()
|
|
2495
|
-
|
|
2496
|
-
s = socket.socket()
|
|
2497
|
-
port = support.bind_port(s, HOST)
|
|
2498
|
-
|
|
2499
|
-
# `listener` runs in a thread. It sits in an accept() until
|
|
2500
|
-
# the main thread connects. Then it rudely closes the socket,
|
|
2501
|
-
# and sets Event `listener_gone` to let the main thread know
|
|
2502
|
-
# the socket is gone.
|
|
2503
|
-
def listener():
|
|
2504
|
-
s.listen()
|
|
2505
|
-
listener_ready.set()
|
|
2506
|
-
newsock, addr = s.accept()
|
|
2507
|
-
newsock.close()
|
|
2508
|
-
s.close()
|
|
2509
|
-
listener_gone.set()
|
|
2510
|
-
|
|
2511
|
-
def connector():
|
|
2512
|
-
listener_ready.wait()
|
|
2513
|
-
with socket.socket() as c:
|
|
2514
|
-
c.connect((HOST, port))
|
|
2515
|
-
listener_gone.wait()
|
|
2516
|
-
try:
|
|
2517
|
-
ssl_sock = test_wrap_socket(c)
|
|
2518
|
-
except OSError:
|
|
2519
|
-
pass
|
|
2520
|
-
else:
|
|
2521
|
-
self.fail('connecting to closed SSL socket should have failed')
|
|
2522
|
-
|
|
2523
|
-
t = threading.Thread(target=listener)
|
|
2524
|
-
t.start()
|
|
2525
|
-
try:
|
|
2526
|
-
connector()
|
|
2527
|
-
finally:
|
|
2528
|
-
t.join()
|
|
2529
|
-
|
|
2530
|
-
@skip_if_broken_ubuntu_ssl
|
|
2531
|
-
@unittest.skipUnless(hasattr(ssl, 'PROTOCOL_SSLv2'),
|
|
2532
|
-
"OpenSSL is compiled without SSLv2 support")
|
|
2533
|
-
def test_protocol_sslv2(self):
|
|
2534
|
-
"""Connecting to an SSLv2 server with various client options"""
|
|
2535
|
-
if support.verbose:
|
|
2536
|
-
sys.stdout.write("\n")
|
|
2537
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True)
|
|
2538
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_OPTIONAL)
|
|
2539
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_REQUIRED)
|
|
2540
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False)
|
|
2541
|
-
if hasattr(ssl, 'PROTOCOL_SSLv3'):
|
|
2542
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3, False)
|
|
2543
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLSv1, False)
|
|
2544
|
-
# SSLv23 client with specific SSL options
|
|
2545
|
-
if no_sslv2_implies_sslv3_hello():
|
|
2546
|
-
# No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
|
|
2547
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
|
|
2548
|
-
client_options=ssl.OP_NO_SSLv2)
|
|
2549
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
|
|
2550
|
-
client_options=ssl.OP_NO_SSLv3)
|
|
2551
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
|
|
2552
|
-
client_options=ssl.OP_NO_TLSv1)
|
|
2553
|
-
|
|
2554
|
-
@skip_if_broken_ubuntu_ssl
|
|
2555
|
-
def test_protocol_sslv23(self):
|
|
2556
|
-
"""Connecting to an SSLv23 server with various client options"""
|
|
2557
|
-
if support.verbose:
|
|
2558
|
-
sys.stdout.write("\n")
|
|
2559
|
-
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2560
|
-
try:
|
|
2561
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv2, True)
|
|
2562
|
-
except OSError as x:
|
|
2563
|
-
# this fails on some older versions of OpenSSL (0.9.7l, for instance)
|
|
2564
|
-
if support.verbose:
|
|
2565
|
-
sys.stdout.write(
|
|
2566
|
-
" SSL2 client to SSL23 server test unexpectedly failed:\n %s\n"
|
|
2567
|
-
% str(x))
|
|
2568
|
-
if hasattr(ssl, 'PROTOCOL_SSLv3'):
|
|
2569
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False)
|
|
2570
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True)
|
|
2571
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1')
|
|
2572
|
-
|
|
2573
|
-
if hasattr(ssl, 'PROTOCOL_SSLv3'):
|
|
2574
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_OPTIONAL)
|
|
2575
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_OPTIONAL)
|
|
2576
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_OPTIONAL)
|
|
2577
|
-
|
|
2578
|
-
if hasattr(ssl, 'PROTOCOL_SSLv3'):
|
|
2579
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_REQUIRED)
|
|
2580
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_REQUIRED)
|
|
2581
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_REQUIRED)
|
|
2582
|
-
|
|
2583
|
-
# Server with specific SSL options
|
|
2584
|
-
if hasattr(ssl, 'PROTOCOL_SSLv3'):
|
|
2585
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False,
|
|
2586
|
-
server_options=ssl.OP_NO_SSLv3)
|
|
2587
|
-
# Will choose TLSv1
|
|
2588
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True,
|
|
2589
|
-
server_options=ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
|
|
2590
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, False,
|
|
2591
|
-
server_options=ssl.OP_NO_TLSv1)
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
@skip_if_broken_ubuntu_ssl
|
|
2595
|
-
@unittest.skipUnless(hasattr(ssl, 'PROTOCOL_SSLv3'),
|
|
2596
|
-
"OpenSSL is compiled without SSLv3 support")
|
|
2597
|
-
def test_protocol_sslv3(self):
|
|
2598
|
-
"""Connecting to an SSLv3 server with various client options"""
|
|
2599
|
-
if support.verbose:
|
|
2600
|
-
sys.stdout.write("\n")
|
|
2601
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, 'SSLv3')
|
|
2602
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_OPTIONAL)
|
|
2603
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_REQUIRED)
|
|
2604
|
-
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2605
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv2, False)
|
|
2606
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False,
|
|
2607
|
-
client_options=ssl.OP_NO_SSLv3)
|
|
2608
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLSv1, False)
|
|
2609
|
-
if no_sslv2_implies_sslv3_hello():
|
|
2610
|
-
# No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
|
|
2611
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23,
|
|
2612
|
-
False, client_options=ssl.OP_NO_SSLv2)
|
|
2613
|
-
|
|
2614
|
-
@skip_if_broken_ubuntu_ssl
|
|
2615
|
-
def test_protocol_tlsv1(self):
|
|
2616
|
-
"""Connecting to a TLSv1 server with various client options"""
|
|
2617
|
-
if support.verbose:
|
|
2618
|
-
sys.stdout.write("\n")
|
|
2619
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1')
|
|
2620
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_OPTIONAL)
|
|
2621
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_REQUIRED)
|
|
2622
|
-
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2623
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv2, False)
|
|
2624
|
-
if hasattr(ssl, 'PROTOCOL_SSLv3'):
|
|
2625
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv3, False)
|
|
2626
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv23, False,
|
|
2627
|
-
client_options=ssl.OP_NO_TLSv1)
|
|
2628
|
-
|
|
2629
|
-
@skip_if_broken_ubuntu_ssl
|
|
2630
|
-
@unittest.skipUnless(hasattr(ssl, "PROTOCOL_TLSv1_1"),
|
|
2631
|
-
"TLS version 1.1 not supported.")
|
|
2632
|
-
def test_protocol_tlsv1_1(self):
|
|
2633
|
-
"""Connecting to a TLSv1.1 server with various client options.
|
|
2634
|
-
Testing against older TLS versions."""
|
|
2635
|
-
if support.verbose:
|
|
2636
|
-
sys.stdout.write("\n")
|
|
2637
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
|
|
2638
|
-
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2639
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv2, False)
|
|
2640
|
-
if hasattr(ssl, 'PROTOCOL_SSLv3'):
|
|
2641
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv3, False)
|
|
2642
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv23, False,
|
|
2643
|
-
client_options=ssl.OP_NO_TLSv1_1)
|
|
2644
|
-
|
|
2645
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
|
|
2646
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1, False)
|
|
2647
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_1, False)
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
@skip_if_broken_ubuntu_ssl
|
|
2651
|
-
@unittest.skipUnless(hasattr(ssl, "PROTOCOL_TLSv1_2"),
|
|
2652
|
-
"TLS version 1.2 not supported.")
|
|
2653
|
-
def test_protocol_tlsv1_2(self):
|
|
2654
|
-
"""Connecting to a TLSv1.2 server with various client options.
|
|
2655
|
-
Testing against older TLS versions."""
|
|
2656
|
-
if support.verbose:
|
|
2657
|
-
sys.stdout.write("\n")
|
|
2658
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2',
|
|
2659
|
-
server_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,
|
|
2660
|
-
client_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,)
|
|
2661
|
-
if hasattr(ssl, 'PROTOCOL_SSLv2'):
|
|
2662
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv2, False)
|
|
2663
|
-
if hasattr(ssl, 'PROTOCOL_SSLv3'):
|
|
2664
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv3, False)
|
|
2665
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv23, False,
|
|
2666
|
-
client_options=ssl.OP_NO_TLSv1_2)
|
|
2667
|
-
|
|
2668
|
-
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2')
|
|
2669
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False)
|
|
2670
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False)
|
|
2671
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False)
|
|
2672
|
-
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False)
|
|
2673
|
-
|
|
2674
|
-
def test_starttls(self):
|
|
2675
|
-
"""Switching from clear text to encrypted and back again."""
|
|
2676
|
-
msgs = (b"msg 1", b"MSG 2", b"STARTTLS", b"MSG 3", b"msg 4", b"ENDTLS", b"msg 5", b"msg 6")
|
|
2677
|
-
|
|
2678
|
-
server = ThreadedEchoServer(CERTFILE,
|
|
2679
|
-
ssl_version=ssl.PROTOCOL_TLSv1,
|
|
2680
|
-
starttls_server=True,
|
|
2681
|
-
chatty=True,
|
|
2682
|
-
connectionchatty=True)
|
|
2683
|
-
wrapped = False
|
|
2684
|
-
with server:
|
|
2685
|
-
s = socket.socket()
|
|
2686
|
-
s.setblocking(1)
|
|
2687
|
-
s.connect((HOST, server.port))
|
|
2688
|
-
if support.verbose:
|
|
2689
|
-
sys.stdout.write("\n")
|
|
2690
|
-
for indata in msgs:
|
|
2691
|
-
if support.verbose:
|
|
2692
|
-
sys.stdout.write(
|
|
2693
|
-
" client: sending %r...\n" % indata)
|
|
2694
|
-
if wrapped:
|
|
2695
|
-
conn.write(indata)
|
|
2696
|
-
outdata = conn.read()
|
|
2697
|
-
else:
|
|
2698
|
-
s.send(indata)
|
|
2699
|
-
outdata = s.recv(1024)
|
|
2700
|
-
msg = outdata.strip().lower()
|
|
2701
|
-
if indata == b"STARTTLS" and msg.startswith(b"ok"):
|
|
2702
|
-
# STARTTLS ok, switch to secure mode
|
|
2703
|
-
if support.verbose:
|
|
2704
|
-
sys.stdout.write(
|
|
2705
|
-
" client: read %r from server, starting TLS...\n"
|
|
2706
|
-
% msg)
|
|
2707
|
-
conn = test_wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1)
|
|
2708
|
-
wrapped = True
|
|
2709
|
-
elif indata == b"ENDTLS" and msg.startswith(b"ok"):
|
|
2710
|
-
# ENDTLS ok, switch back to clear text
|
|
2711
|
-
if support.verbose:
|
|
2712
|
-
sys.stdout.write(
|
|
2713
|
-
" client: read %r from server, ending TLS...\n"
|
|
2714
|
-
% msg)
|
|
2715
|
-
s = conn.unwrap()
|
|
2716
|
-
wrapped = False
|
|
2717
|
-
else:
|
|
2718
|
-
if support.verbose:
|
|
2719
|
-
sys.stdout.write(
|
|
2720
|
-
" client: read %r from server\n" % msg)
|
|
2721
|
-
if support.verbose:
|
|
2722
|
-
sys.stdout.write(" client: closing connection.\n")
|
|
2723
|
-
if wrapped:
|
|
2724
|
-
conn.write(b"over\n")
|
|
2725
|
-
else:
|
|
2726
|
-
s.send(b"over\n")
|
|
2727
|
-
if wrapped:
|
|
2728
|
-
conn.close()
|
|
2729
|
-
else:
|
|
2730
|
-
s.close()
|
|
2731
|
-
|
|
2732
|
-
def test_socketserver(self):
|
|
2733
|
-
"""Using socketserver to create and manage SSL connections."""
|
|
2734
|
-
server = make_https_server(self, certfile=CERTFILE)
|
|
2735
|
-
# try to connect
|
|
2736
|
-
if support.verbose:
|
|
2737
|
-
sys.stdout.write('\n')
|
|
2738
|
-
with open(CERTFILE, 'rb') as f:
|
|
2739
|
-
d1 = f.read()
|
|
2740
|
-
d2 = ''
|
|
2741
|
-
# now fetch the same data from the HTTPS server
|
|
2742
|
-
url = 'https://localhost:%d/%s' % (
|
|
2743
|
-
server.port, os.path.split(CERTFILE)[1])
|
|
2744
|
-
context = ssl.create_default_context(cafile=CERTFILE)
|
|
2745
|
-
f = urllib.request.urlopen(url, context=context)
|
|
2746
|
-
try:
|
|
2747
|
-
dlen = f.info().get("content-length")
|
|
2748
|
-
if dlen and (int(dlen) > 0):
|
|
2749
|
-
d2 = f.read(int(dlen))
|
|
2750
|
-
if support.verbose:
|
|
2751
|
-
sys.stdout.write(
|
|
2752
|
-
" client: read %d bytes from remote server '%s'\n"
|
|
2753
|
-
% (len(d2), server))
|
|
2754
|
-
finally:
|
|
2755
|
-
f.close()
|
|
2756
|
-
self.assertEqual(d1, d2)
|
|
2757
|
-
|
|
2758
|
-
def test_asyncore_server(self):
|
|
2759
|
-
"""Check the example asyncore integration."""
|
|
2760
|
-
if support.verbose:
|
|
2761
|
-
sys.stdout.write("\n")
|
|
2762
|
-
|
|
2763
|
-
indata = b"FOO\n"
|
|
2764
|
-
server = AsyncoreEchoServer(CERTFILE)
|
|
2765
|
-
with server:
|
|
2766
|
-
s = test_wrap_socket(socket.socket())
|
|
2767
|
-
s.connect(('127.0.0.1', server.port))
|
|
2768
|
-
if support.verbose:
|
|
2769
|
-
sys.stdout.write(
|
|
2770
|
-
" client: sending %r...\n" % indata)
|
|
2771
|
-
s.write(indata)
|
|
2772
|
-
outdata = s.read()
|
|
2773
|
-
if support.verbose:
|
|
2774
|
-
sys.stdout.write(" client: read %r\n" % outdata)
|
|
2775
|
-
if outdata != indata.lower():
|
|
2776
|
-
self.fail(
|
|
2777
|
-
"bad data <<%r>> (%d) received; expected <<%r>> (%d)\n"
|
|
2778
|
-
% (outdata[:20], len(outdata),
|
|
2779
|
-
indata[:20].lower(), len(indata)))
|
|
2780
|
-
s.write(b"over\n")
|
|
2781
|
-
if support.verbose:
|
|
2782
|
-
sys.stdout.write(" client: closing connection.\n")
|
|
2783
|
-
s.close()
|
|
2784
|
-
if support.verbose:
|
|
2785
|
-
sys.stdout.write(" client: connection closed.\n")
|
|
2786
|
-
|
|
2787
|
-
def test_recv_send(self):
|
|
2788
|
-
"""Test recv(), send() and friends."""
|
|
2789
|
-
if support.verbose:
|
|
2790
|
-
sys.stdout.write("\n")
|
|
2791
|
-
|
|
2792
|
-
server = ThreadedEchoServer(CERTFILE,
|
|
2793
|
-
certreqs=ssl.CERT_NONE,
|
|
2794
|
-
ssl_version=ssl.PROTOCOL_TLSv1,
|
|
2795
|
-
cacerts=CERTFILE,
|
|
2796
|
-
chatty=True,
|
|
2797
|
-
connectionchatty=False)
|
|
2798
|
-
with server:
|
|
2799
|
-
s = test_wrap_socket(socket.socket(),
|
|
2800
|
-
server_side=False,
|
|
2801
|
-
certfile=CERTFILE,
|
|
2802
|
-
ca_certs=CERTFILE,
|
|
2803
|
-
cert_reqs=ssl.CERT_NONE,
|
|
2804
|
-
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
2805
|
-
s.connect((HOST, server.port))
|
|
2806
|
-
# helper methods for standardising recv* method signatures
|
|
2807
|
-
def _recv_into():
|
|
2808
|
-
b = bytearray(b"\0"*100)
|
|
2809
|
-
count = s.recv_into(b)
|
|
2810
|
-
return b[:count]
|
|
2811
|
-
|
|
2812
|
-
def _recvfrom_into():
|
|
2813
|
-
b = bytearray(b"\0"*100)
|
|
2814
|
-
count, addr = s.recvfrom_into(b)
|
|
2815
|
-
return b[:count]
|
|
2816
|
-
|
|
2817
|
-
# (name, method, expect success?, *args, return value func)
|
|
2818
|
-
send_methods = [
|
|
2819
|
-
('send', s.send, True, [], len),
|
|
2820
|
-
('sendto', s.sendto, False, ["some.address"], len),
|
|
2821
|
-
('sendall', s.sendall, True, [], lambda x: None),
|
|
2822
|
-
]
|
|
2823
|
-
# (name, method, whether to expect success, *args)
|
|
2824
|
-
recv_methods = [
|
|
2825
|
-
('recv', s.recv, True, []),
|
|
2826
|
-
('recvfrom', s.recvfrom, False, ["some.address"]),
|
|
2827
|
-
('recv_into', _recv_into, True, []),
|
|
2828
|
-
('recvfrom_into', _recvfrom_into, False, []),
|
|
2829
|
-
]
|
|
2830
|
-
data_prefix = "PREFIX_"
|
|
2831
|
-
|
|
2832
|
-
for (meth_name, send_meth, expect_success, args,
|
|
2833
|
-
ret_val_meth) in send_methods:
|
|
2834
|
-
indata = (data_prefix + meth_name).encode('ascii')
|
|
2835
|
-
try:
|
|
2836
|
-
ret = send_meth(indata, *args)
|
|
2837
|
-
msg = "sending with {}".format(meth_name)
|
|
2838
|
-
self.assertEqual(ret, ret_val_meth(indata), msg=msg)
|
|
2839
|
-
outdata = s.read()
|
|
2840
|
-
if outdata != indata.lower():
|
|
2841
|
-
self.fail(
|
|
2842
|
-
"While sending with <<{name:s}>> bad data "
|
|
2843
|
-
"<<{outdata:r}>> ({nout:d}) received; "
|
|
2844
|
-
"expected <<{indata:r}>> ({nin:d})\n".format(
|
|
2845
|
-
name=meth_name, outdata=outdata[:20],
|
|
2846
|
-
nout=len(outdata),
|
|
2847
|
-
indata=indata[:20], nin=len(indata)
|
|
2848
|
-
)
|
|
2849
|
-
)
|
|
2850
|
-
except ValueError as e:
|
|
2851
|
-
if expect_success:
|
|
2852
|
-
self.fail(
|
|
2853
|
-
"Failed to send with method <<{name:s}>>; "
|
|
2854
|
-
"expected to succeed.\n".format(name=meth_name)
|
|
2855
|
-
)
|
|
2856
|
-
if not str(e).startswith(meth_name):
|
|
2857
|
-
self.fail(
|
|
2858
|
-
"Method <<{name:s}>> failed with unexpected "
|
|
2859
|
-
"exception message: {exp:s}\n".format(
|
|
2860
|
-
name=meth_name, exp=e
|
|
2861
|
-
)
|
|
2862
|
-
)
|
|
2863
|
-
|
|
2864
|
-
for meth_name, recv_meth, expect_success, args in recv_methods:
|
|
2865
|
-
indata = (data_prefix + meth_name).encode('ascii')
|
|
2866
|
-
try:
|
|
2867
|
-
s.send(indata)
|
|
2868
|
-
outdata = recv_meth(*args)
|
|
2869
|
-
if outdata != indata.lower():
|
|
2870
|
-
self.fail(
|
|
2871
|
-
"While receiving with <<{name:s}>> bad data "
|
|
2872
|
-
"<<{outdata:r}>> ({nout:d}) received; "
|
|
2873
|
-
"expected <<{indata:r}>> ({nin:d})\n".format(
|
|
2874
|
-
name=meth_name, outdata=outdata[:20],
|
|
2875
|
-
nout=len(outdata),
|
|
2876
|
-
indata=indata[:20], nin=len(indata)
|
|
2877
|
-
)
|
|
2878
|
-
)
|
|
2879
|
-
except ValueError as e:
|
|
2880
|
-
if expect_success:
|
|
2881
|
-
self.fail(
|
|
2882
|
-
"Failed to receive with method <<{name:s}>>; "
|
|
2883
|
-
"expected to succeed.\n".format(name=meth_name)
|
|
2884
|
-
)
|
|
2885
|
-
if not str(e).startswith(meth_name):
|
|
2886
|
-
self.fail(
|
|
2887
|
-
"Method <<{name:s}>> failed with unexpected "
|
|
2888
|
-
"exception message: {exp:s}\n".format(
|
|
2889
|
-
name=meth_name, exp=e
|
|
2890
|
-
)
|
|
2891
|
-
)
|
|
2892
|
-
# consume data
|
|
2893
|
-
s.read()
|
|
2894
|
-
|
|
2895
|
-
# read(-1, buffer) is supported, even though read(-1) is not
|
|
2896
|
-
data = b"data"
|
|
2897
|
-
s.send(data)
|
|
2898
|
-
buffer = bytearray(len(data))
|
|
2899
|
-
self.assertEqual(s.read(-1, buffer), len(data))
|
|
2900
|
-
self.assertEqual(buffer, data) # sendall accepts bytes-like objects
|
|
2901
|
-
|
|
2902
|
-
if ctypes is not None:
|
|
2903
|
-
ubyte = ctypes.c_ubyte * len(data)
|
|
2904
|
-
byteslike = ubyte.from_buffer_copy(data)
|
|
2905
|
-
s.sendall(byteslike)
|
|
2906
|
-
self.assertEqual(s.read(), data)
|
|
2907
|
-
|
|
2908
|
-
# Make sure sendmsg et al are disallowed to avoid
|
|
2909
|
-
# inadvertent disclosure of data and/or corruption
|
|
2910
|
-
# of the encrypted data stream
|
|
2911
|
-
self.assertRaises(NotImplementedError, s.sendmsg, [b"data"])
|
|
2912
|
-
self.assertRaises(NotImplementedError, s.recvmsg, 100)
|
|
2913
|
-
self.assertRaises(NotImplementedError,
|
|
2914
|
-
s.recvmsg_into, bytearray(100))
|
|
2915
|
-
|
|
2916
|
-
s.write(b"over\n")
|
|
2917
|
-
|
|
2918
|
-
self.assertRaises(ValueError, s.recv, -1)
|
|
2919
|
-
self.assertRaises(ValueError, s.read, -1)
|
|
2920
|
-
|
|
2921
|
-
s.close()
|
|
2922
|
-
|
|
2923
|
-
def test_recv_zero(self):
|
|
2924
|
-
server = ThreadedEchoServer(CERTFILE)
|
|
2925
|
-
server.__enter__()
|
|
2926
|
-
self.addCleanup(server.__exit__, None, None)
|
|
2927
|
-
s = socket.create_connection((HOST, server.port))
|
|
2928
|
-
self.addCleanup(s.close)
|
|
2929
|
-
s = test_wrap_socket(s, suppress_ragged_eofs=False)
|
|
2930
|
-
self.addCleanup(s.close)
|
|
2931
|
-
|
|
2932
|
-
# recv/read(0) should return no data
|
|
2933
|
-
s.send(b"data")
|
|
2934
|
-
self.assertEqual(s.recv(0), b"")
|
|
2935
|
-
self.assertEqual(s.read(0), b"")
|
|
2936
|
-
self.assertEqual(s.read(), b"data")
|
|
2937
|
-
|
|
2938
|
-
# Should not block if the other end sends no data
|
|
2939
|
-
s.setblocking(False)
|
|
2940
|
-
self.assertEqual(s.recv(0), b"")
|
|
2941
|
-
self.assertEqual(s.recv_into(bytearray()), 0)
|
|
2942
|
-
|
|
2943
|
-
def test_nonblocking_send(self):
|
|
2944
|
-
server = ThreadedEchoServer(CERTFILE,
|
|
2945
|
-
certreqs=ssl.CERT_NONE,
|
|
2946
|
-
ssl_version=ssl.PROTOCOL_TLSv1,
|
|
2947
|
-
cacerts=CERTFILE,
|
|
2948
|
-
chatty=True,
|
|
2949
|
-
connectionchatty=False)
|
|
2950
|
-
with server:
|
|
2951
|
-
s = test_wrap_socket(socket.socket(),
|
|
2952
|
-
server_side=False,
|
|
2953
|
-
certfile=CERTFILE,
|
|
2954
|
-
ca_certs=CERTFILE,
|
|
2955
|
-
cert_reqs=ssl.CERT_NONE,
|
|
2956
|
-
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
2957
|
-
s.connect((HOST, server.port))
|
|
2958
|
-
s.setblocking(False)
|
|
2959
|
-
|
|
2960
|
-
# If we keep sending data, at some point the buffers
|
|
2961
|
-
# will be full and the call will block
|
|
2962
|
-
buf = bytearray(8192)
|
|
2963
|
-
def fill_buffer():
|
|
2964
|
-
while True:
|
|
2965
|
-
s.send(buf)
|
|
2966
|
-
self.assertRaises((ssl.SSLWantWriteError,
|
|
2967
|
-
ssl.SSLWantReadError), fill_buffer)
|
|
2968
|
-
|
|
2969
|
-
# Now read all the output and discard it
|
|
2970
|
-
s.setblocking(True)
|
|
2971
|
-
s.close()
|
|
2972
|
-
|
|
2973
|
-
def test_handshake_timeout(self):
|
|
2974
|
-
# Issue #5103: SSL handshake must respect the socket timeout
|
|
2975
|
-
server = socket.socket(socket.AF_INET)
|
|
2976
|
-
host = "127.0.0.1"
|
|
2977
|
-
port = support.bind_port(server)
|
|
2978
|
-
started = threading.Event()
|
|
2979
|
-
finish = False
|
|
2980
|
-
|
|
2981
|
-
def serve():
|
|
2982
|
-
server.listen()
|
|
2983
|
-
started.set()
|
|
2984
|
-
conns = []
|
|
2985
|
-
while not finish:
|
|
2986
|
-
r, w, e = select.select([server], [], [], 0.1)
|
|
2987
|
-
if server in r:
|
|
2988
|
-
# Let the socket hang around rather than having
|
|
2989
|
-
# it closed by garbage collection.
|
|
2990
|
-
conns.append(server.accept()[0])
|
|
2991
|
-
for sock in conns:
|
|
2992
|
-
sock.close()
|
|
2993
|
-
|
|
2994
|
-
t = threading.Thread(target=serve)
|
|
2995
|
-
t.start()
|
|
2996
|
-
started.wait()
|
|
2997
|
-
|
|
2998
|
-
try:
|
|
2999
|
-
try:
|
|
3000
|
-
c = socket.socket(socket.AF_INET)
|
|
3001
|
-
c.settimeout(0.2)
|
|
3002
|
-
c.connect((host, port))
|
|
3003
|
-
# Will attempt handshake and time out
|
|
3004
|
-
self.assertRaisesRegex(socket.timeout, "timed out",
|
|
3005
|
-
test_wrap_socket, c)
|
|
3006
|
-
finally:
|
|
3007
|
-
c.close()
|
|
3008
|
-
try:
|
|
3009
|
-
c = socket.socket(socket.AF_INET)
|
|
3010
|
-
c = test_wrap_socket(c)
|
|
3011
|
-
c.settimeout(0.2)
|
|
3012
|
-
# Will attempt handshake and time out
|
|
3013
|
-
self.assertRaisesRegex(socket.timeout, "timed out",
|
|
3014
|
-
c.connect, (host, port))
|
|
3015
|
-
finally:
|
|
3016
|
-
c.close()
|
|
3017
|
-
finally:
|
|
3018
|
-
finish = True
|
|
3019
|
-
t.join()
|
|
3020
|
-
server.close()
|
|
3021
|
-
|
|
3022
|
-
def test_server_accept(self):
|
|
3023
|
-
# Issue #16357: accept() on a SSLSocket created through
|
|
3024
|
-
# SSLContext.wrap_socket().
|
|
3025
|
-
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
3026
|
-
context.verify_mode = ssl.CERT_REQUIRED
|
|
3027
|
-
context.load_verify_locations(CERTFILE)
|
|
3028
|
-
context.load_cert_chain(CERTFILE)
|
|
3029
|
-
server = socket.socket(socket.AF_INET)
|
|
3030
|
-
host = "127.0.0.1"
|
|
3031
|
-
port = support.bind_port(server)
|
|
3032
|
-
server = context.wrap_socket(server, server_side=True)
|
|
3033
|
-
self.assertTrue(server.server_side)
|
|
3034
|
-
|
|
3035
|
-
evt = threading.Event()
|
|
3036
|
-
remote = None
|
|
3037
|
-
peer = None
|
|
3038
|
-
def serve():
|
|
3039
|
-
nonlocal remote, peer
|
|
3040
|
-
server.listen()
|
|
3041
|
-
# Block on the accept and wait on the connection to close.
|
|
3042
|
-
evt.set()
|
|
3043
|
-
remote, peer = server.accept()
|
|
3044
|
-
remote.recv(1)
|
|
3045
|
-
|
|
3046
|
-
t = threading.Thread(target=serve)
|
|
3047
|
-
t.start()
|
|
3048
|
-
# Client wait until server setup and perform a connect.
|
|
3049
|
-
evt.wait()
|
|
3050
|
-
client = context.wrap_socket(socket.socket())
|
|
3051
|
-
client.connect((host, port))
|
|
3052
|
-
client_addr = client.getsockname()
|
|
3053
|
-
client.close()
|
|
3054
|
-
t.join()
|
|
3055
|
-
remote.close()
|
|
3056
|
-
server.close()
|
|
3057
|
-
# Sanity checks.
|
|
3058
|
-
self.assertIsInstance(remote, ssl.SSLSocket)
|
|
3059
|
-
self.assertEqual(peer, client_addr)
|
|
3060
|
-
|
|
3061
|
-
def test_getpeercert_enotconn(self):
|
|
3062
|
-
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
3063
|
-
with context.wrap_socket(socket.socket()) as sock:
|
|
3064
|
-
with self.assertRaises(OSError) as cm:
|
|
3065
|
-
sock.getpeercert()
|
|
3066
|
-
self.assertEqual(cm.exception.errno, errno.ENOTCONN)
|
|
3067
|
-
|
|
3068
|
-
def test_do_handshake_enotconn(self):
|
|
3069
|
-
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
3070
|
-
with context.wrap_socket(socket.socket()) as sock:
|
|
3071
|
-
with self.assertRaises(OSError) as cm:
|
|
3072
|
-
sock.do_handshake()
|
|
3073
|
-
self.assertEqual(cm.exception.errno, errno.ENOTCONN)
|
|
3074
|
-
|
|
3075
|
-
def test_default_ciphers(self):
|
|
3076
|
-
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
3077
|
-
try:
|
|
3078
|
-
# Force a set of weak ciphers on our client context
|
|
3079
|
-
context.set_ciphers("DES")
|
|
3080
|
-
except ssl.SSLError:
|
|
3081
|
-
self.skipTest("no DES cipher available")
|
|
3082
|
-
with ThreadedEchoServer(CERTFILE,
|
|
3083
|
-
ssl_version=ssl.PROTOCOL_SSLv23,
|
|
3084
|
-
chatty=False) as server:
|
|
3085
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
3086
|
-
with self.assertRaises(OSError):
|
|
3087
|
-
s.connect((HOST, server.port))
|
|
3088
|
-
self.assertIn("no shared cipher", server.conn_errors[0])
|
|
3089
|
-
|
|
3090
|
-
def test_version_basic(self):
|
|
3091
|
-
"""
|
|
3092
|
-
Basic tests for SSLSocket.version().
|
|
3093
|
-
More tests are done in the test_protocol_*() methods.
|
|
3094
|
-
"""
|
|
3095
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3096
|
-
with ThreadedEchoServer(CERTFILE,
|
|
3097
|
-
ssl_version=ssl.PROTOCOL_TLSv1,
|
|
3098
|
-
chatty=False) as server:
|
|
3099
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
3100
|
-
self.assertIs(s.version(), None)
|
|
3101
|
-
s.connect((HOST, server.port))
|
|
3102
|
-
self.assertEqual(s.version(), 'TLSv1')
|
|
3103
|
-
self.assertIs(s.version(), None)
|
|
3104
|
-
|
|
3105
|
-
@unittest.skipUnless(ssl.HAS_TLSv1_3,
|
|
3106
|
-
"test requires TLSv1.3 enabled OpenSSL")
|
|
3107
|
-
def test_tls1_3(self):
|
|
3108
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
|
3109
|
-
context.load_cert_chain(CERTFILE)
|
|
3110
|
-
# disable all but TLS 1.3
|
|
3111
|
-
context.options |= (
|
|
3112
|
-
ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 | ssl.OP_NO_TLSv1_2
|
|
3113
|
-
)
|
|
3114
|
-
with ThreadedEchoServer(context=context) as server:
|
|
3115
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
3116
|
-
s.connect((HOST, server.port))
|
|
3117
|
-
self.assertIn(s.cipher()[0], [
|
|
3118
|
-
'TLS13-AES-256-GCM-SHA384',
|
|
3119
|
-
'TLS13-CHACHA20-POLY1305-SHA256',
|
|
3120
|
-
'TLS13-AES-128-GCM-SHA256',
|
|
3121
|
-
])
|
|
3122
|
-
|
|
3123
|
-
@unittest.skipUnless(ssl.HAS_ECDH, "test requires ECDH-enabled OpenSSL")
|
|
3124
|
-
def test_default_ecdh_curve(self):
|
|
3125
|
-
# Issue #21015: elliptic curve-based Diffie Hellman key exchange
|
|
3126
|
-
# should be enabled by default on SSL contexts.
|
|
3127
|
-
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
3128
|
-
context.load_cert_chain(CERTFILE)
|
|
3129
|
-
# TLSv1.3 defaults to PFS key agreement and no longer has KEA in
|
|
3130
|
-
# cipher name.
|
|
3131
|
-
context.options |= ssl.OP_NO_TLSv1_3
|
|
3132
|
-
# Prior to OpenSSL 1.0.0, ECDH ciphers have to be enabled
|
|
3133
|
-
# explicitly using the 'ECCdraft' cipher alias. Otherwise,
|
|
3134
|
-
# our default cipher list should prefer ECDH-based ciphers
|
|
3135
|
-
# automatically.
|
|
3136
|
-
if ssl.OPENSSL_VERSION_INFO < (1, 0, 0):
|
|
3137
|
-
context.set_ciphers("ECCdraft:ECDH")
|
|
3138
|
-
with ThreadedEchoServer(context=context) as server:
|
|
3139
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
3140
|
-
s.connect((HOST, server.port))
|
|
3141
|
-
self.assertIn("ECDH", s.cipher()[0])
|
|
3142
|
-
|
|
3143
|
-
@unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
|
|
3144
|
-
"'tls-unique' channel binding not available")
|
|
3145
|
-
def test_tls_unique_channel_binding(self):
|
|
3146
|
-
"""Test tls-unique channel binding."""
|
|
3147
|
-
if support.verbose:
|
|
3148
|
-
sys.stdout.write("\n")
|
|
3149
|
-
|
|
3150
|
-
server = ThreadedEchoServer(CERTFILE,
|
|
3151
|
-
certreqs=ssl.CERT_NONE,
|
|
3152
|
-
ssl_version=ssl.PROTOCOL_TLSv1,
|
|
3153
|
-
cacerts=CERTFILE,
|
|
3154
|
-
chatty=True,
|
|
3155
|
-
connectionchatty=False)
|
|
3156
|
-
with server:
|
|
3157
|
-
s = test_wrap_socket(socket.socket(),
|
|
3158
|
-
server_side=False,
|
|
3159
|
-
certfile=CERTFILE,
|
|
3160
|
-
ca_certs=CERTFILE,
|
|
3161
|
-
cert_reqs=ssl.CERT_NONE,
|
|
3162
|
-
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
3163
|
-
s.connect((HOST, server.port))
|
|
3164
|
-
# get the data
|
|
3165
|
-
cb_data = s.get_channel_binding("tls-unique")
|
|
3166
|
-
if support.verbose:
|
|
3167
|
-
sys.stdout.write(" got channel binding data: {0!r}\n"
|
|
3168
|
-
.format(cb_data))
|
|
3169
|
-
|
|
3170
|
-
# check if it is sane
|
|
3171
|
-
self.assertIsNotNone(cb_data)
|
|
3172
|
-
self.assertEqual(len(cb_data), 12) # True for TLSv1
|
|
3173
|
-
|
|
3174
|
-
# and compare with the peers version
|
|
3175
|
-
s.write(b"CB tls-unique\n")
|
|
3176
|
-
peer_data_repr = s.read().strip()
|
|
3177
|
-
self.assertEqual(peer_data_repr,
|
|
3178
|
-
repr(cb_data).encode("us-ascii"))
|
|
3179
|
-
s.close()
|
|
3180
|
-
|
|
3181
|
-
# now, again
|
|
3182
|
-
s = test_wrap_socket(socket.socket(),
|
|
3183
|
-
server_side=False,
|
|
3184
|
-
certfile=CERTFILE,
|
|
3185
|
-
ca_certs=CERTFILE,
|
|
3186
|
-
cert_reqs=ssl.CERT_NONE,
|
|
3187
|
-
ssl_version=ssl.PROTOCOL_TLSv1)
|
|
3188
|
-
s.connect((HOST, server.port))
|
|
3189
|
-
new_cb_data = s.get_channel_binding("tls-unique")
|
|
3190
|
-
if support.verbose:
|
|
3191
|
-
sys.stdout.write(" got another channel binding data: {0!r}\n"
|
|
3192
|
-
.format(new_cb_data))
|
|
3193
|
-
# is it really unique
|
|
3194
|
-
self.assertNotEqual(cb_data, new_cb_data)
|
|
3195
|
-
self.assertIsNotNone(cb_data)
|
|
3196
|
-
self.assertEqual(len(cb_data), 12) # True for TLSv1
|
|
3197
|
-
s.write(b"CB tls-unique\n")
|
|
3198
|
-
peer_data_repr = s.read().strip()
|
|
3199
|
-
self.assertEqual(peer_data_repr,
|
|
3200
|
-
repr(new_cb_data).encode("us-ascii"))
|
|
3201
|
-
s.close()
|
|
3202
|
-
|
|
3203
|
-
def test_compression(self):
|
|
3204
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3205
|
-
context.load_cert_chain(CERTFILE)
|
|
3206
|
-
stats = server_params_test(context, context,
|
|
3207
|
-
chatty=True, connectionchatty=True)
|
|
3208
|
-
if support.verbose:
|
|
3209
|
-
sys.stdout.write(" got compression: {!r}\n".format(stats['compression']))
|
|
3210
|
-
self.assertIn(stats['compression'], { None, 'ZLIB', 'RLE' })
|
|
3211
|
-
|
|
3212
|
-
@unittest.skipUnless(hasattr(ssl, 'OP_NO_COMPRESSION'),
|
|
3213
|
-
"ssl.OP_NO_COMPRESSION needed for this test")
|
|
3214
|
-
def test_compression_disabled(self):
|
|
3215
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3216
|
-
context.load_cert_chain(CERTFILE)
|
|
3217
|
-
context.options |= ssl.OP_NO_COMPRESSION
|
|
3218
|
-
stats = server_params_test(context, context,
|
|
3219
|
-
chatty=True, connectionchatty=True)
|
|
3220
|
-
self.assertIs(stats['compression'], None)
|
|
3221
|
-
|
|
3222
|
-
def test_dh_params(self):
|
|
3223
|
-
# Check we can get a connection with ephemeral Diffie-Hellman
|
|
3224
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3225
|
-
context.load_cert_chain(CERTFILE)
|
|
3226
|
-
context.load_dh_params(DHFILE)
|
|
3227
|
-
context.set_ciphers("kEDH")
|
|
3228
|
-
stats = server_params_test(context, context,
|
|
3229
|
-
chatty=True, connectionchatty=True)
|
|
3230
|
-
cipher = stats["cipher"][0]
|
|
3231
|
-
parts = cipher.split("-")
|
|
3232
|
-
if "ADH" not in parts and "EDH" not in parts and "DHE" not in parts:
|
|
3233
|
-
self.fail("Non-DH cipher: " + cipher[0])
|
|
3234
|
-
|
|
3235
|
-
def test_selected_alpn_protocol(self):
|
|
3236
|
-
# selected_alpn_protocol() is None unless ALPN is used.
|
|
3237
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3238
|
-
context.load_cert_chain(CERTFILE)
|
|
3239
|
-
stats = server_params_test(context, context,
|
|
3240
|
-
chatty=True, connectionchatty=True)
|
|
3241
|
-
self.assertIs(stats['client_alpn_protocol'], None)
|
|
3242
|
-
|
|
3243
|
-
@unittest.skipUnless(ssl.HAS_ALPN, "ALPN support required")
|
|
3244
|
-
def test_selected_alpn_protocol_if_server_uses_alpn(self):
|
|
3245
|
-
# selected_alpn_protocol() is None unless ALPN is used by the client.
|
|
3246
|
-
client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3247
|
-
client_context.load_verify_locations(CERTFILE)
|
|
3248
|
-
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3249
|
-
server_context.load_cert_chain(CERTFILE)
|
|
3250
|
-
server_context.set_alpn_protocols(['foo', 'bar'])
|
|
3251
|
-
stats = server_params_test(client_context, server_context,
|
|
3252
|
-
chatty=True, connectionchatty=True)
|
|
3253
|
-
self.assertIs(stats['client_alpn_protocol'], None)
|
|
3254
|
-
|
|
3255
|
-
@unittest.skipUnless(ssl.HAS_ALPN, "ALPN support needed for this test")
|
|
3256
|
-
def test_alpn_protocols(self):
|
|
3257
|
-
server_protocols = ['foo', 'bar', 'milkshake']
|
|
3258
|
-
protocol_tests = [
|
|
3259
|
-
(['foo', 'bar'], 'foo'),
|
|
3260
|
-
(['bar', 'foo'], 'foo'),
|
|
3261
|
-
(['milkshake'], 'milkshake'),
|
|
3262
|
-
(['http/3.0', 'http/4.0'], None)
|
|
3263
|
-
]
|
|
3264
|
-
for client_protocols, expected in protocol_tests:
|
|
3265
|
-
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
|
|
3266
|
-
server_context.load_cert_chain(CERTFILE)
|
|
3267
|
-
server_context.set_alpn_protocols(server_protocols)
|
|
3268
|
-
client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
|
|
3269
|
-
client_context.load_cert_chain(CERTFILE)
|
|
3270
|
-
client_context.set_alpn_protocols(client_protocols)
|
|
3271
|
-
|
|
3272
|
-
try:
|
|
3273
|
-
stats = server_params_test(client_context,
|
|
3274
|
-
server_context,
|
|
3275
|
-
chatty=True,
|
|
3276
|
-
connectionchatty=True)
|
|
3277
|
-
except ssl.SSLError as e:
|
|
3278
|
-
stats = e
|
|
3279
|
-
|
|
3280
|
-
if (expected is None and IS_OPENSSL_1_1
|
|
3281
|
-
and ssl.OPENSSL_VERSION_INFO < (1, 1, 0, 6)):
|
|
3282
|
-
# OpenSSL 1.1.0 to 1.1.0e raises handshake error
|
|
3283
|
-
self.assertIsInstance(stats, ssl.SSLError)
|
|
3284
|
-
else:
|
|
3285
|
-
msg = "failed trying %s (s) and %s (c).\n" \
|
|
3286
|
-
"was expecting %s, but got %%s from the %%s" \
|
|
3287
|
-
% (str(server_protocols), str(client_protocols),
|
|
3288
|
-
str(expected))
|
|
3289
|
-
client_result = stats['client_alpn_protocol']
|
|
3290
|
-
self.assertEqual(client_result, expected,
|
|
3291
|
-
msg % (client_result, "client"))
|
|
3292
|
-
server_result = stats['server_alpn_protocols'][-1] \
|
|
3293
|
-
if len(stats['server_alpn_protocols']) else 'nothing'
|
|
3294
|
-
self.assertEqual(server_result, expected,
|
|
3295
|
-
msg % (server_result, "server"))
|
|
3296
|
-
|
|
3297
|
-
def test_selected_npn_protocol(self):
|
|
3298
|
-
# selected_npn_protocol() is None unless NPN is used
|
|
3299
|
-
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3300
|
-
context.load_cert_chain(CERTFILE)
|
|
3301
|
-
stats = server_params_test(context, context,
|
|
3302
|
-
chatty=True, connectionchatty=True)
|
|
3303
|
-
self.assertIs(stats['client_npn_protocol'], None)
|
|
3304
|
-
|
|
3305
|
-
@unittest.skipUnless(ssl.HAS_NPN, "NPN support needed for this test")
|
|
3306
|
-
def test_npn_protocols(self):
|
|
3307
|
-
server_protocols = ['http/1.1', 'spdy/2']
|
|
3308
|
-
protocol_tests = [
|
|
3309
|
-
(['http/1.1', 'spdy/2'], 'http/1.1'),
|
|
3310
|
-
(['spdy/2', 'http/1.1'], 'http/1.1'),
|
|
3311
|
-
(['spdy/2', 'test'], 'spdy/2'),
|
|
3312
|
-
(['abc', 'def'], 'abc')
|
|
3313
|
-
]
|
|
3314
|
-
for client_protocols, expected in protocol_tests:
|
|
3315
|
-
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3316
|
-
server_context.load_cert_chain(CERTFILE)
|
|
3317
|
-
server_context.set_npn_protocols(server_protocols)
|
|
3318
|
-
client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3319
|
-
client_context.load_cert_chain(CERTFILE)
|
|
3320
|
-
client_context.set_npn_protocols(client_protocols)
|
|
3321
|
-
stats = server_params_test(client_context, server_context,
|
|
3322
|
-
chatty=True, connectionchatty=True)
|
|
3323
|
-
|
|
3324
|
-
msg = "failed trying %s (s) and %s (c).\n" \
|
|
3325
|
-
"was expecting %s, but got %%s from the %%s" \
|
|
3326
|
-
% (str(server_protocols), str(client_protocols),
|
|
3327
|
-
str(expected))
|
|
3328
|
-
client_result = stats['client_npn_protocol']
|
|
3329
|
-
self.assertEqual(client_result, expected, msg % (client_result, "client"))
|
|
3330
|
-
server_result = stats['server_npn_protocols'][-1] \
|
|
3331
|
-
if len(stats['server_npn_protocols']) else 'nothing'
|
|
3332
|
-
self.assertEqual(server_result, expected, msg % (server_result, "server"))
|
|
3333
|
-
|
|
3334
|
-
def sni_contexts(self):
|
|
3335
|
-
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3336
|
-
server_context.load_cert_chain(SIGNED_CERTFILE)
|
|
3337
|
-
other_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3338
|
-
other_context.load_cert_chain(SIGNED_CERTFILE2)
|
|
3339
|
-
client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3340
|
-
client_context.verify_mode = ssl.CERT_REQUIRED
|
|
3341
|
-
client_context.load_verify_locations(SIGNING_CA)
|
|
3342
|
-
return server_context, other_context, client_context
|
|
3343
|
-
|
|
3344
|
-
def check_common_name(self, stats, name):
|
|
3345
|
-
cert = stats['peercert']
|
|
3346
|
-
self.assertIn((('commonName', name),), cert['subject'])
|
|
3347
|
-
|
|
3348
|
-
@needs_sni
|
|
3349
|
-
def test_sni_callback(self):
|
|
3350
|
-
calls = []
|
|
3351
|
-
server_context, other_context, client_context = self.sni_contexts()
|
|
3352
|
-
|
|
3353
|
-
def servername_cb(ssl_sock, server_name, initial_context):
|
|
3354
|
-
calls.append((server_name, initial_context))
|
|
3355
|
-
if server_name is not None:
|
|
3356
|
-
ssl_sock.context = other_context
|
|
3357
|
-
server_context.set_servername_callback(servername_cb)
|
|
3358
|
-
|
|
3359
|
-
stats = server_params_test(client_context, server_context,
|
|
3360
|
-
chatty=True,
|
|
3361
|
-
sni_name='supermessage')
|
|
3362
|
-
# The hostname was fetched properly, and the certificate was
|
|
3363
|
-
# changed for the connection.
|
|
3364
|
-
self.assertEqual(calls, [("supermessage", server_context)])
|
|
3365
|
-
# CERTFILE4 was selected
|
|
3366
|
-
self.check_common_name(stats, 'fakehostname')
|
|
3367
|
-
|
|
3368
|
-
calls = []
|
|
3369
|
-
# The callback is called with server_name=None
|
|
3370
|
-
stats = server_params_test(client_context, server_context,
|
|
3371
|
-
chatty=True,
|
|
3372
|
-
sni_name=None)
|
|
3373
|
-
self.assertEqual(calls, [(None, server_context)])
|
|
3374
|
-
self.check_common_name(stats, 'localhost')
|
|
3375
|
-
|
|
3376
|
-
# Check disabling the callback
|
|
3377
|
-
calls = []
|
|
3378
|
-
server_context.set_servername_callback(None)
|
|
3379
|
-
|
|
3380
|
-
stats = server_params_test(client_context, server_context,
|
|
3381
|
-
chatty=True,
|
|
3382
|
-
sni_name='notfunny')
|
|
3383
|
-
# Certificate didn't change
|
|
3384
|
-
self.check_common_name(stats, 'localhost')
|
|
3385
|
-
self.assertEqual(calls, [])
|
|
3386
|
-
|
|
3387
|
-
@needs_sni
|
|
3388
|
-
def test_sni_callback_alert(self):
|
|
3389
|
-
# Returning a TLS alert is reflected to the connecting client
|
|
3390
|
-
server_context, other_context, client_context = self.sni_contexts()
|
|
3391
|
-
|
|
3392
|
-
def cb_returning_alert(ssl_sock, server_name, initial_context):
|
|
3393
|
-
return ssl.ALERT_DESCRIPTION_ACCESS_DENIED
|
|
3394
|
-
server_context.set_servername_callback(cb_returning_alert)
|
|
3395
|
-
|
|
3396
|
-
with self.assertRaises(ssl.SSLError) as cm:
|
|
3397
|
-
stats = server_params_test(client_context, server_context,
|
|
3398
|
-
chatty=False,
|
|
3399
|
-
sni_name='supermessage')
|
|
3400
|
-
self.assertEqual(cm.exception.reason, 'TLSV1_ALERT_ACCESS_DENIED')
|
|
3401
|
-
|
|
3402
|
-
@needs_sni
|
|
3403
|
-
def test_sni_callback_raising(self):
|
|
3404
|
-
# Raising fails the connection with a TLS handshake failure alert.
|
|
3405
|
-
server_context, other_context, client_context = self.sni_contexts()
|
|
3406
|
-
|
|
3407
|
-
def cb_raising(ssl_sock, server_name, initial_context):
|
|
3408
|
-
1/0
|
|
3409
|
-
server_context.set_servername_callback(cb_raising)
|
|
3410
|
-
|
|
3411
|
-
with self.assertRaises(ssl.SSLError) as cm, \
|
|
3412
|
-
support.captured_stderr() as stderr:
|
|
3413
|
-
stats = server_params_test(client_context, server_context,
|
|
3414
|
-
chatty=False,
|
|
3415
|
-
sni_name='supermessage')
|
|
3416
|
-
self.assertEqual(cm.exception.reason, 'SSLV3_ALERT_HANDSHAKE_FAILURE')
|
|
3417
|
-
self.assertIn("ZeroDivisionError", stderr.getvalue())
|
|
3418
|
-
|
|
3419
|
-
@needs_sni
|
|
3420
|
-
def test_sni_callback_wrong_return_type(self):
|
|
3421
|
-
# Returning the wrong return type terminates the TLS connection
|
|
3422
|
-
# with an internal error alert.
|
|
3423
|
-
server_context, other_context, client_context = self.sni_contexts()
|
|
3424
|
-
|
|
3425
|
-
def cb_wrong_return_type(ssl_sock, server_name, initial_context):
|
|
3426
|
-
return "foo"
|
|
3427
|
-
server_context.set_servername_callback(cb_wrong_return_type)
|
|
3428
|
-
|
|
3429
|
-
with self.assertRaises(ssl.SSLError) as cm, \
|
|
3430
|
-
support.captured_stderr() as stderr:
|
|
3431
|
-
stats = server_params_test(client_context, server_context,
|
|
3432
|
-
chatty=False,
|
|
3433
|
-
sni_name='supermessage')
|
|
3434
|
-
self.assertEqual(cm.exception.reason, 'TLSV1_ALERT_INTERNAL_ERROR')
|
|
3435
|
-
self.assertIn("TypeError", stderr.getvalue())
|
|
3436
|
-
|
|
3437
|
-
def test_shared_ciphers(self):
|
|
3438
|
-
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3439
|
-
server_context.load_cert_chain(SIGNED_CERTFILE)
|
|
3440
|
-
client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3441
|
-
client_context.verify_mode = ssl.CERT_REQUIRED
|
|
3442
|
-
client_context.load_verify_locations(SIGNING_CA)
|
|
3443
|
-
if ssl.OPENSSL_VERSION_INFO >= (1, 0, 2):
|
|
3444
|
-
client_context.set_ciphers("AES128:AES256")
|
|
3445
|
-
server_context.set_ciphers("AES256")
|
|
3446
|
-
alg1 = "AES256"
|
|
3447
|
-
alg2 = "AES-256"
|
|
3448
|
-
else:
|
|
3449
|
-
client_context.set_ciphers("AES:3DES")
|
|
3450
|
-
server_context.set_ciphers("3DES")
|
|
3451
|
-
alg1 = "3DES"
|
|
3452
|
-
alg2 = "DES-CBC3"
|
|
3453
|
-
|
|
3454
|
-
stats = server_params_test(client_context, server_context)
|
|
3455
|
-
ciphers = stats['server_shared_ciphers'][0]
|
|
3456
|
-
self.assertGreater(len(ciphers), 0)
|
|
3457
|
-
for name, tls_version, bits in ciphers:
|
|
3458
|
-
if not alg1 in name.split("-") and alg2 not in name:
|
|
3459
|
-
self.fail(name)
|
|
3460
|
-
|
|
3461
|
-
def test_read_write_after_close_raises_valuerror(self):
|
|
3462
|
-
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
3463
|
-
context.verify_mode = ssl.CERT_REQUIRED
|
|
3464
|
-
context.load_verify_locations(CERTFILE)
|
|
3465
|
-
context.load_cert_chain(CERTFILE)
|
|
3466
|
-
server = ThreadedEchoServer(context=context, chatty=False)
|
|
3467
|
-
|
|
3468
|
-
with server:
|
|
3469
|
-
s = context.wrap_socket(socket.socket())
|
|
3470
|
-
s.connect((HOST, server.port))
|
|
3471
|
-
s.close()
|
|
3472
|
-
|
|
3473
|
-
self.assertRaises(ValueError, s.read, 1024)
|
|
3474
|
-
self.assertRaises(ValueError, s.write, b'hello')
|
|
3475
|
-
|
|
3476
|
-
def test_sendfile(self):
|
|
3477
|
-
TEST_DATA = b"x" * 512
|
|
3478
|
-
with open(support.TESTFN, 'wb') as f:
|
|
3479
|
-
f.write(TEST_DATA)
|
|
3480
|
-
self.addCleanup(support.unlink, support.TESTFN)
|
|
3481
|
-
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
3482
|
-
context.verify_mode = ssl.CERT_REQUIRED
|
|
3483
|
-
context.load_verify_locations(CERTFILE)
|
|
3484
|
-
context.load_cert_chain(CERTFILE)
|
|
3485
|
-
server = ThreadedEchoServer(context=context, chatty=False)
|
|
3486
|
-
with server:
|
|
3487
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
3488
|
-
s.connect((HOST, server.port))
|
|
3489
|
-
with open(support.TESTFN, 'rb') as file:
|
|
3490
|
-
s.sendfile(file)
|
|
3491
|
-
self.assertEqual(s.recv(1024), TEST_DATA)
|
|
3492
|
-
|
|
3493
|
-
def test_session(self):
|
|
3494
|
-
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3495
|
-
server_context.load_cert_chain(SIGNED_CERTFILE)
|
|
3496
|
-
client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
|
3497
|
-
client_context.verify_mode = ssl.CERT_REQUIRED
|
|
3498
|
-
client_context.load_verify_locations(SIGNING_CA)
|
|
3499
|
-
|
|
3500
|
-
# first connection without session
|
|
3501
|
-
stats = server_params_test(client_context, server_context)
|
|
3502
|
-
session = stats['session']
|
|
3503
|
-
self.assertTrue(session.id)
|
|
3504
|
-
self.assertGreater(session.time, 0)
|
|
3505
|
-
self.assertGreater(session.timeout, 0)
|
|
3506
|
-
self.assertTrue(session.has_ticket)
|
|
3507
|
-
if ssl.OPENSSL_VERSION_INFO > (1, 0, 1):
|
|
3508
|
-
self.assertGreater(session.ticket_lifetime_hint, 0)
|
|
3509
|
-
self.assertFalse(stats['session_reused'])
|
|
3510
|
-
sess_stat = server_context.session_stats()
|
|
3511
|
-
self.assertEqual(sess_stat['accept'], 1)
|
|
3512
|
-
self.assertEqual(sess_stat['hits'], 0)
|
|
3513
|
-
|
|
3514
|
-
# reuse session
|
|
3515
|
-
stats = server_params_test(client_context, server_context, session=session)
|
|
3516
|
-
sess_stat = server_context.session_stats()
|
|
3517
|
-
self.assertEqual(sess_stat['accept'], 2)
|
|
3518
|
-
self.assertEqual(sess_stat['hits'], 1)
|
|
3519
|
-
self.assertTrue(stats['session_reused'])
|
|
3520
|
-
session2 = stats['session']
|
|
3521
|
-
self.assertEqual(session2.id, session.id)
|
|
3522
|
-
self.assertEqual(session2, session)
|
|
3523
|
-
self.assertIsNot(session2, session)
|
|
3524
|
-
self.assertGreaterEqual(session2.time, session.time)
|
|
3525
|
-
self.assertGreaterEqual(session2.timeout, session.timeout)
|
|
3526
|
-
|
|
3527
|
-
# another one without session
|
|
3528
|
-
stats = server_params_test(client_context, server_context)
|
|
3529
|
-
self.assertFalse(stats['session_reused'])
|
|
3530
|
-
session3 = stats['session']
|
|
3531
|
-
self.assertNotEqual(session3.id, session.id)
|
|
3532
|
-
self.assertNotEqual(session3, session)
|
|
3533
|
-
sess_stat = server_context.session_stats()
|
|
3534
|
-
self.assertEqual(sess_stat['accept'], 3)
|
|
3535
|
-
self.assertEqual(sess_stat['hits'], 1)
|
|
3536
|
-
|
|
3537
|
-
# reuse session again
|
|
3538
|
-
stats = server_params_test(client_context, server_context, session=session)
|
|
3539
|
-
self.assertTrue(stats['session_reused'])
|
|
3540
|
-
session4 = stats['session']
|
|
3541
|
-
self.assertEqual(session4.id, session.id)
|
|
3542
|
-
self.assertEqual(session4, session)
|
|
3543
|
-
self.assertGreaterEqual(session4.time, session.time)
|
|
3544
|
-
self.assertGreaterEqual(session4.timeout, session.timeout)
|
|
3545
|
-
sess_stat = server_context.session_stats()
|
|
3546
|
-
self.assertEqual(sess_stat['accept'], 4)
|
|
3547
|
-
self.assertEqual(sess_stat['hits'], 2)
|
|
3548
|
-
|
|
3549
|
-
def test_session_handling(self):
|
|
3550
|
-
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
3551
|
-
context.verify_mode = ssl.CERT_REQUIRED
|
|
3552
|
-
context.load_verify_locations(CERTFILE)
|
|
3553
|
-
context.load_cert_chain(CERTFILE)
|
|
3554
|
-
|
|
3555
|
-
context2 = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
|
3556
|
-
context2.verify_mode = ssl.CERT_REQUIRED
|
|
3557
|
-
context2.load_verify_locations(CERTFILE)
|
|
3558
|
-
context2.load_cert_chain(CERTFILE)
|
|
3559
|
-
|
|
3560
|
-
# TODO: session reuse does not work with TLS 1.3
|
|
3561
|
-
context.options |= ssl.OP_NO_TLSv1_3
|
|
3562
|
-
context2.options |= ssl.OP_NO_TLSv1_3
|
|
3563
|
-
|
|
3564
|
-
server = ThreadedEchoServer(context=context, chatty=False)
|
|
3565
|
-
with server:
|
|
3566
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
3567
|
-
# session is None before handshake
|
|
3568
|
-
self.assertEqual(s.session, None)
|
|
3569
|
-
self.assertEqual(s.session_reused, None)
|
|
3570
|
-
s.connect((HOST, server.port))
|
|
3571
|
-
session = s.session
|
|
3572
|
-
self.assertTrue(session)
|
|
3573
|
-
with self.assertRaises(TypeError) as e:
|
|
3574
|
-
s.session = object
|
|
3575
|
-
self.assertEqual(str(e.exception), 'Value is not a SSLSession.')
|
|
3576
|
-
|
|
3577
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
3578
|
-
s.connect((HOST, server.port))
|
|
3579
|
-
# cannot set session after handshake
|
|
3580
|
-
with self.assertRaises(ValueError) as e:
|
|
3581
|
-
s.session = session
|
|
3582
|
-
self.assertEqual(str(e.exception),
|
|
3583
|
-
'Cannot set session after handshake.')
|
|
3584
|
-
|
|
3585
|
-
with context.wrap_socket(socket.socket()) as s:
|
|
3586
|
-
# can set session before handshake and before the
|
|
3587
|
-
# connection was established
|
|
3588
|
-
s.session = session
|
|
3589
|
-
s.connect((HOST, server.port))
|
|
3590
|
-
self.assertEqual(s.session.id, session.id)
|
|
3591
|
-
self.assertEqual(s.session, session)
|
|
3592
|
-
self.assertEqual(s.session_reused, True)
|
|
3593
|
-
|
|
3594
|
-
with context2.wrap_socket(socket.socket()) as s:
|
|
3595
|
-
# cannot re-use session with a different SSLContext
|
|
3596
|
-
with self.assertRaises(ValueError) as e:
|
|
3597
|
-
s.session = session
|
|
3598
|
-
s.connect((HOST, server.port))
|
|
3599
|
-
self.assertEqual(str(e.exception),
|
|
3600
|
-
'Session refers to a different SSLContext.')
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
def test_main(verbose=False):
|
|
3604
|
-
if support.verbose:
|
|
3605
|
-
import warnings
|
|
3606
|
-
plats = {
|
|
3607
|
-
'Linux': platform.linux_distribution,
|
|
3608
|
-
'Mac': platform.mac_ver,
|
|
3609
|
-
'Windows': platform.win32_ver,
|
|
3610
|
-
}
|
|
3611
|
-
with warnings.catch_warnings():
|
|
3612
|
-
warnings.filterwarnings(
|
|
3613
|
-
'ignore',
|
|
3614
|
-
r'dist\(\) and linux_distribution\(\) '
|
|
3615
|
-
'functions are deprecated .*',
|
|
3616
|
-
PendingDeprecationWarning,
|
|
3617
|
-
)
|
|
3618
|
-
for name, func in plats.items():
|
|
3619
|
-
plat = func()
|
|
3620
|
-
if plat and plat[0]:
|
|
3621
|
-
plat = '%s %r' % (name, plat)
|
|
3622
|
-
break
|
|
3623
|
-
else:
|
|
3624
|
-
plat = repr(platform.platform())
|
|
3625
|
-
print("test_ssl: testing with %r %r" %
|
|
3626
|
-
(ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO))
|
|
3627
|
-
print(" under %s" % plat)
|
|
3628
|
-
print(" HAS_SNI = %r" % ssl.HAS_SNI)
|
|
3629
|
-
print(" OP_ALL = 0x%8x" % ssl.OP_ALL)
|
|
3630
|
-
try:
|
|
3631
|
-
print(" OP_NO_TLSv1_1 = 0x%8x" % ssl.OP_NO_TLSv1_1)
|
|
3632
|
-
except AttributeError:
|
|
3633
|
-
pass
|
|
3634
|
-
|
|
3635
|
-
for filename in [
|
|
3636
|
-
CERTFILE, BYTES_CERTFILE,
|
|
3637
|
-
ONLYCERT, ONLYKEY, BYTES_ONLYCERT, BYTES_ONLYKEY,
|
|
3638
|
-
SIGNED_CERTFILE, SIGNED_CERTFILE2, SIGNING_CA,
|
|
3639
|
-
BADCERT, BADKEY, EMPTYCERT]:
|
|
3640
|
-
if not os.path.exists(filename):
|
|
3641
|
-
raise support.TestFailed("Can't read certificate file %r" % filename)
|
|
3642
|
-
|
|
3643
|
-
tests = [
|
|
3644
|
-
ContextTests, BasicSocketTests, SSLErrorTests, MemoryBIOTests,
|
|
3645
|
-
SimpleBackgroundTests,
|
|
3646
|
-
]
|
|
3647
|
-
|
|
3648
|
-
if support.is_resource_enabled('network'):
|
|
3649
|
-
tests.append(NetworkedTests)
|
|
3650
|
-
|
|
3651
|
-
if _have_threads:
|
|
3652
|
-
thread_info = support.threading_setup()
|
|
3653
|
-
if thread_info:
|
|
3654
|
-
tests.append(ThreadedTests)
|
|
3655
|
-
|
|
3656
|
-
try:
|
|
3657
|
-
support.run_unittest(*tests)
|
|
3658
|
-
finally:
|
|
3659
|
-
if _have_threads:
|
|
3660
|
-
support.threading_cleanup(*thread_info)
|
|
3661
|
-
|
|
3662
|
-
if __name__ == "__main__":
|
|
3663
|
-
test_main()
|