✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ beluga.o2switch.net ​🇻​♯➤ 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 185.154.139.77 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.77
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /lib64/python2.7/test//test_ssl.py
# -*- coding: utf-8 -*-
# Test the support for SSL and sockets

import sys
import unittest
from test import test_support as support
from test.script_helper import assert_python_ok
import asyncore
import socket
import select
import struct
import time
import datetime
import gc
import httplib
import os
import errno
import pprint
import shutil
import urllib2
import traceback
import weakref
import platform
import re
import functools
from contextlib import closing

ssl = support.import_module("ssl")

PROTOCOLS = sorted(ssl._PROTOCOL_NAMES)
HOST = support.HOST
IS_LIBRESSL = ssl.OPENSSL_VERSION.startswith('LibreSSL')
IS_OPENSSL_1_1 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0)


def data_file(*name):
    return os.path.join(os.path.dirname(__file__), *name)

# The custom key and certificate files used in test_ssl are generated
# using Lib/test/make_ssl_certs.py.
# Other certificates are simply fetched from the Internet servers they
# are meant to authenticate.

CERTFILE = data_file("keycert.pem")
BYTES_CERTFILE = CERTFILE.encode(sys.getfilesystemencoding())
ONLYCERT = data_file("ssl_cert.pem")
ONLYKEY = data_file("ssl_key.pem")
BYTES_ONLYCERT = ONLYCERT.encode(sys.getfilesystemencoding())
BYTES_ONLYKEY = ONLYKEY.encode(sys.getfilesystemencoding())
CERTFILE_PROTECTED = data_file("keycert.passwd.pem")
ONLYKEY_PROTECTED = data_file("ssl_key.passwd.pem")
KEY_PASSWORD = "somepass"
CAPATH = data_file("capath")
BYTES_CAPATH = CAPATH.encode(sys.getfilesystemencoding())
CAFILE_NEURONIO = data_file("capath", "4e1295a3.0")
CAFILE_CACERT = data_file("capath", "5ed36f99.0")


# empty CRL
CRLFILE = data_file("revocation.crl")

# Two keys and certs signed by the same CA (for SNI tests)
SIGNED_CERTFILE = data_file("keycert3.pem")
SIGNED_CERTFILE2 = data_file("keycert4.pem")
SIGNING_CA = data_file("pycacert.pem")
# cert with all kinds of subject alt names
ALLSANFILE = data_file("allsans.pem")

REMOTE_HOST = "self-signed.pythontest.net"
REMOTE_ROOT_CERT = data_file("selfsigned_pythontestdotnet.pem")

EMPTYCERT = data_file("nullcert.pem")
BADCERT = data_file("badcert.pem")
NONEXISTINGCERT = data_file("XXXnonexisting.pem")
BADKEY = data_file("badkey.pem")
NOKIACERT = data_file("nokia.pem")
NULLBYTECERT = data_file("nullbytecert.pem")
TALOS_INVALID_CRLDP = data_file("talos-2019-0758.pem")

DHFILE = data_file("ffdh3072.pem")
BYTES_DHFILE = DHFILE.encode(sys.getfilesystemencoding())

# Not defined in all versions of OpenSSL
OP_NO_COMPRESSION = getattr(ssl, "OP_NO_COMPRESSION", 0)
OP_SINGLE_DH_USE = getattr(ssl, "OP_SINGLE_DH_USE", 0)
OP_SINGLE_ECDH_USE = getattr(ssl, "OP_SINGLE_ECDH_USE", 0)
OP_CIPHER_SERVER_PREFERENCE = getattr(ssl, "OP_CIPHER_SERVER_PREFERENCE", 0)
OP_ENABLE_MIDDLEBOX_COMPAT = getattr(ssl, "OP_ENABLE_MIDDLEBOX_COMPAT", 0)


def handle_error(prefix):
    exc_format = ' '.join(traceback.format_exception(*sys.exc_info()))
    if support.verbose:
        sys.stdout.write(prefix + exc_format)


class BasicTests(unittest.TestCase):

    def test_sslwrap_simple(self):
        # A crude test for the legacy API
        try:
            ssl.sslwrap_simple(socket.socket(socket.AF_INET))
        except IOError, e:
            if e.errno == 32: # broken pipe when ssl_sock.do_handshake(), this test doesn't care about that
                pass
            else:
                raise
        try:
            ssl.sslwrap_simple(socket.socket(socket.AF_INET)._sock)
        except IOError, e:
            if e.errno == 32: # broken pipe when ssl_sock.do_handshake(), this test doesn't care about that
                pass
            else:
                raise


def can_clear_options():
    # 0.9.8m or higher
    return ssl._OPENSSL_API_VERSION >= (0, 9, 8, 13, 15)

def no_sslv2_implies_sslv3_hello():
    # 0.9.7h or higher
    return ssl.OPENSSL_VERSION_INFO >= (0, 9, 7, 8, 15)

def have_verify_flags():
    # 0.9.8 or higher
    return ssl.OPENSSL_VERSION_INFO >= (0, 9, 8, 0, 15)

def utc_offset(): #NOTE: ignore issues like #1647654
    # local time = utc time + utc offset
    if time.daylight and time.localtime().tm_isdst > 0:
        return -time.altzone  # seconds
    return -time.timezone

def asn1time(cert_time):
    # Some versions of OpenSSL ignore seconds, see #18207
    # 0.9.8.i
    if ssl._OPENSSL_API_VERSION == (0, 9, 8, 9, 15):
        fmt = "%b %d %H:%M:%S %Y GMT"
        dt = datetime.datetime.strptime(cert_time, fmt)
        dt = dt.replace(second=0)
        cert_time = dt.strftime(fmt)
        # %d adds leading zero but ASN1_TIME_print() uses leading space
        if cert_time[4] == "0":
            cert_time = cert_time[:4] + " " + cert_time[5:]

    return cert_time

# Issue #9415: Ubuntu hijacks their OpenSSL and forcefully disables SSLv2
def skip_if_broken_ubuntu_ssl(func):
    if hasattr(ssl, 'PROTOCOL_SSLv2'):
        @functools.wraps(func)
        def f(*args, **kwargs):
            try:
                ssl.SSLContext(ssl.PROTOCOL_SSLv2)
            except ssl.SSLError:
                if (ssl.OPENSSL_VERSION_INFO == (0, 9, 8, 15, 15) and
                    platform.linux_distribution() == ('debian', 'squeeze/sid', '')):
                    raise unittest.SkipTest("Patched Ubuntu OpenSSL breaks behaviour")
            return func(*args, **kwargs)
        return f
    else:
        return func

def skip_if_openssl_cnf_minprotocol_gt_tls1(func):
    """Skip a test if the OpenSSL config MinProtocol is > TLSv1.
    OS distros with an /etc/ssl/openssl.cnf and MinProtocol set often do so to
    require TLSv1.2 or higher (Debian Buster).  Some of our tests for older
    protocol versions will fail under such a config.
    Alternative workaround: Run this test in a process with
    OPENSSL_CONF=/dev/null in the environment.
    """
    @functools.wraps(func)
    def f(*args, **kwargs):
        openssl_cnf = os.environ.get("OPENSSL_CONF", "/etc/ssl/openssl.cnf")
        try:
            with open(openssl_cnf, "r") as config:
                for line in config:
                    match = re.match(r"MinProtocol\s*=\s*(TLSv\d+\S*)", line)
                    if match:
                        tls_ver = match.group(1)
                        if tls_ver > "TLSv1":
                            raise unittest.SkipTest(
                                "%s has MinProtocol = %s which is > TLSv1." %
                                (openssl_cnf, tls_ver))
        except (EnvironmentError, UnicodeDecodeError) as err:
            # no config file found, etc.
            if support.verbose:
                sys.stdout.write("\n Could not scan %s for MinProtocol: %s\n"
                                 % (openssl_cnf, err))
        return func(*args, **kwargs)
    return f


needs_sni = unittest.skipUnless(ssl.HAS_SNI, "SNI support needed for this test")


class BasicSocketTests(unittest.TestCase):

    def test_constants(self):
        ssl.CERT_NONE
        ssl.CERT_OPTIONAL
        ssl.CERT_REQUIRED
        ssl.OP_CIPHER_SERVER_PREFERENCE
        ssl.OP_SINGLE_DH_USE
        if ssl.HAS_ECDH:
            ssl.OP_SINGLE_ECDH_USE
        if ssl.OPENSSL_VERSION_INFO >= (1, 0):
            ssl.OP_NO_COMPRESSION
        self.assertIn(ssl.HAS_SNI, {True, False})
        self.assertIn(ssl.HAS_ECDH, {True, False})
        ssl.OP_NO_SSLv2
        ssl.OP_NO_SSLv3
        ssl.OP_NO_TLSv1
        ssl.OP_NO_TLSv1_3
        if ssl.OPENSSL_VERSION_INFO >= (1, 0, 1):
            ssl.OP_NO_TLSv1_1
            ssl.OP_NO_TLSv1_2

    def test_random(self):
        v = ssl.RAND_status()
        if support.verbose:
            sys.stdout.write("\n RAND_status is %d (%s)\n"
                             % (v, (v and "sufficient randomness") or
                                "insufficient randomness"))
        if hasattr(ssl, 'RAND_egd'):
            self.assertRaises(TypeError, ssl.RAND_egd, 1)
            self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
        ssl.RAND_add("this is a random string", 75.0)

    def test_parse_cert(self):
        # note that this uses an 'unofficial' function in _ssl.c,
        # provided solely for this test, to exercise the certificate
        # parsing code
        p = ssl._ssl._test_decode_cert(CERTFILE)
        if support.verbose:
            sys.stdout.write("\n" + pprint.pformat(p) + "\n")
        self.assertEqual(p['issuer'],
                         ((('countryName', 'XY'),),
                          (('localityName', 'Castle Anthrax'),),
                          (('organizationName', 'Python Software Foundation'),),
                          (('commonName', 'localhost'),))
                        )
        # Note the next three asserts will fail if the keys are regenerated
        self.assertEqual(p['notAfter'], asn1time('Aug 26 14:23:15 2028 GMT'))
        self.assertEqual(p['notBefore'], asn1time('Aug 29 14:23:15 2018 GMT'))
        self.assertEqual(p['serialNumber'], '98A7CF88C74A32ED')
        self.assertEqual(p['subject'],
                         ((('countryName', 'XY'),),
                          (('localityName', 'Castle Anthrax'),),
                          (('organizationName', 'Python Software Foundation'),),
                          (('commonName', 'localhost'),))
                        )
        self.assertEqual(p['subjectAltName'], (('DNS', 'localhost'),))
        # Issue #13034: the subjectAltName in some certificates
        # (notably projects.developer.nokia.com:443) wasn't parsed
        p = ssl._ssl._test_decode_cert(NOKIACERT)
        if support.verbose:
            sys.stdout.write("\n" + pprint.pformat(p) + "\n")
        self.assertEqual(p['subjectAltName'],
                         (('DNS', 'projects.developer.nokia.com'),
                          ('DNS', 'projects.forum.nokia.com'))
                        )
        # extra OCSP and AIA fields
        self.assertEqual(p['OCSP'], ('http://ocsp.verisign.com',))
        self.assertEqual(p['caIssuers'],
                         ('http://SVRIntl-G3-aia.verisign.com/SVRIntlG3.cer',))
        self.assertEqual(p['crlDistributionPoints'],
                         ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',))

    def test_parse_cert_CVE_2019_5010(self):
        p = ssl._ssl._test_decode_cert(TALOS_INVALID_CRLDP)
        if support.verbose:
            sys.stdout.write("\n" + pprint.pformat(p) + "\n")
        self.assertEqual(
            p,
            {
                'issuer': (
                    (('countryName', 'UK'),), (('commonName', 'cody-ca'),)),
                'notAfter': 'Jun 14 18:00:58 2028 GMT',
                'notBefore': 'Jun 18 18:00:58 2018 GMT',
                'serialNumber': '02',
                'subject': ((('countryName', 'UK'),),
                            (('commonName',
                              'codenomicon-vm-2.test.lal.cisco.com'),)),
                'subjectAltName': (
                    ('DNS', 'codenomicon-vm-2.test.lal.cisco.com'),),
                'version': 3
            }
        )

    def test_parse_cert_CVE_2013_4238(self):
        p = ssl._ssl._test_decode_cert(NULLBYTECERT)
        if support.verbose:
            sys.stdout.write("\n" + pprint.pformat(p) + "\n")
        subject = ((('countryName', 'US'),),
                   (('stateOrProvinceName', 'Oregon'),),
                   (('localityName', 'Beaverton'),),
                   (('organizationName', 'Python Software Foundation'),),
                   (('organizationalUnitName', 'Python Core Development'),),
                   (('commonName', 'null.python.org\x00example.org'),),
                   (('emailAddress', 'python-dev@python.org'),))
        self.assertEqual(p['subject'], subject)
        self.assertEqual(p['issuer'], subject)
        if ssl._OPENSSL_API_VERSION >= (0, 9, 8):
            san = (('DNS', 'altnull.python.org\x00example.com'),
                   ('email', 'null@python.org\x00user@example.org'),
                   ('URI', 'http://null.python.org\x00http://example.org'),
                   ('IP Address', '192.0.2.1'),
                   ('IP Address', '2001:DB8:0:0:0:0:0:1\n'))
        else:
            # OpenSSL 0.9.7 doesn't support IPv6 addresses in subjectAltName
            san = (('DNS', 'altnull.python.org\x00example.com'),
                   ('email', 'null@python.org\x00user@example.org'),
                   ('URI', 'http://null.python.org\x00http://example.org'),
                   ('IP Address', '192.0.2.1'),
                   ('IP Address', '<invalid>'))

        self.assertEqual(p['subjectAltName'], san)

    def test_parse_all_sans(self):
        p = ssl._ssl._test_decode_cert(ALLSANFILE)
        self.assertEqual(p['subjectAltName'],
            (
                ('DNS', 'allsans'),
                ('othername', '<unsupported>'),
                ('othername', '<unsupported>'),
                ('email', 'user@example.org'),
                ('DNS', 'www.example.org'),
                ('DirName',
                    ((('countryName', 'XY'),),
                    (('localityName', 'Castle Anthrax'),),
                    (('organizationName', 'Python Software Foundation'),),
                    (('commonName', 'dirname example'),))),
                ('URI', 'https://www.python.org/'),
                ('IP Address', '127.0.0.1'),
                ('IP Address', '0:0:0:0:0:0:0:1\n'),
                ('Registered ID', '1.2.3.4.5')
            )
        )

    def test_DER_to_PEM(self):
        with open(CAFILE_CACERT, 'r') as f:
            pem = f.read()
        d1 = ssl.PEM_cert_to_DER_cert(pem)
        p2 = ssl.DER_cert_to_PEM_cert(d1)
        d2 = ssl.PEM_cert_to_DER_cert(p2)
        self.assertEqual(d1, d2)
        if not p2.startswith(ssl.PEM_HEADER + '\n'):
            self.fail("DER-to-PEM didn't include correct header:\n%r\n" % p2)
        if not p2.endswith('\n' + ssl.PEM_FOOTER + '\n'):
            self.fail("DER-to-PEM didn't include correct footer:\n%r\n" % p2)

    def test_openssl_version(self):
        n = ssl.OPENSSL_VERSION_NUMBER
        t = ssl.OPENSSL_VERSION_INFO
        s = ssl.OPENSSL_VERSION
        self.assertIsInstance(n, (int, long))
        self.assertIsInstance(t, tuple)
        self.assertIsInstance(s, str)
        # Some sanity checks follow
        # >= 0.9
        self.assertGreaterEqual(n, 0x900000)
        # < 3.0
        self.assertLess(n, 0x30000000)
        major, minor, fix, patch, status = t
        self.assertGreaterEqual(major, 0)
        self.assertLess(major, 3)
        self.assertGreaterEqual(minor, 0)
        self.assertLess(minor, 256)
        self.assertGreaterEqual(fix, 0)
        self.assertLess(fix, 256)
        self.assertGreaterEqual(patch, 0)
        self.assertLessEqual(patch, 63)
        self.assertGreaterEqual(status, 0)
        self.assertLessEqual(status, 15)
        # Version string as returned by {Open,Libre}SSL, the format might change
        if IS_LIBRESSL:
            self.assertTrue(s.startswith("LibreSSL {:d}".format(major)),
                            (s, t, hex(n)))
        else:
            self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
                            (s, t))

    @support.cpython_only
    def test_refcycle(self):
        # Issue #7943: an SSL object doesn't create reference cycles with
        # itself.
        s = socket.socket(socket.AF_INET)
        ss = ssl.wrap_socket(s)
        wr = weakref.ref(ss)
        del ss
        self.assertEqual(wr(), None)

    def test_wrapped_unconnected(self):
        # Methods on an unconnected SSLSocket propagate the original
        # socket.error raise by the underlying socket object.
        s = socket.socket(socket.AF_INET)
        with closing(ssl.wrap_socket(s)) as ss:
            self.assertRaises(socket.error, ss.recv, 1)
            self.assertRaises(socket.error, ss.recv_into, bytearray(b'x'))
            self.assertRaises(socket.error, ss.recvfrom, 1)
            self.assertRaises(socket.error, ss.recvfrom_into, bytearray(b'x'), 1)
            self.assertRaises(socket.error, ss.send, b'x')
            self.assertRaises(socket.error, ss.sendto, b'x', ('0.0.0.0', 0))
            self.assertRaises(NotImplementedError, ss.dup)

    def test_timeout(self):
        # Issue #8524: when creating an SSL socket, the timeout of the
        # original socket should be retained.
        for timeout in (None, 0.0, 5.0):
            s = socket.socket(socket.AF_INET)
            s.settimeout(timeout)
            with closing(ssl.wrap_socket(s)) as ss:
                self.assertEqual(timeout, ss.gettimeout())

    def test_errors(self):
        sock = socket.socket()
        self.assertRaisesRegexp(ValueError,
                        "certfile must be specified",
                        ssl.wrap_socket, sock, keyfile=CERTFILE)
        self.assertRaisesRegexp(ValueError,
                        "certfile must be specified for server-side operations",
                        ssl.wrap_socket, sock, server_side=True)
        self.assertRaisesRegexp(ValueError,
                        "certfile must be specified for server-side operations",
                        ssl.wrap_socket, sock, server_side=True, certfile="")
        with closing(ssl.wrap_socket(sock, server_side=True, certfile=CERTFILE)) as s:
            self.assertRaisesRegexp(ValueError, "can't connect in server-side mode",
                                    s.connect, (HOST, 8080))
        with self.assertRaises(IOError) as cm:
            with closing(socket.socket()) as sock:
                ssl.wrap_socket(sock, certfile=NONEXISTINGCERT)
        self.assertEqual(cm.exception.errno, errno.ENOENT)
        with self.assertRaises(IOError) as cm:
            with closing(socket.socket()) as sock:
                ssl.wrap_socket(sock,
                    certfile=CERTFILE, keyfile=NONEXISTINGCERT)
        self.assertEqual(cm.exception.errno, errno.ENOENT)
        with self.assertRaises(IOError) as cm:
            with closing(socket.socket()) as sock:
                ssl.wrap_socket(sock,
                    certfile=NONEXISTINGCERT, keyfile=NONEXISTINGCERT)
        self.assertEqual(cm.exception.errno, errno.ENOENT)

    def bad_cert_test(self, certfile):
        """Check that trying to use the given client certificate fails"""
        certfile = os.path.join(os.path.dirname(__file__) or os.curdir,
                                   certfile)
        sock = socket.socket()
        self.addCleanup(sock.close)
        with self.assertRaises(ssl.SSLError):
            ssl.wrap_socket(sock,
                            certfile=certfile,
                            ssl_version=ssl.PROTOCOL_TLSv1)

    def test_empty_cert(self):
        """Wrapping with an empty cert file"""
        self.bad_cert_test("nullcert.pem")

    def test_malformed_cert(self):
        """Wrapping with a badly formatted certificate (syntax error)"""
        self.bad_cert_test("badcert.pem")

    def test_malformed_key(self):
        """Wrapping with a badly formatted key (syntax error)"""
        self.bad_cert_test("badkey.pem")

    def test_match_hostname(self):
        def ok(cert, hostname):
            ssl.match_hostname(cert, hostname)
        def fail(cert, hostname):
            self.assertRaises(ssl.CertificateError,
                              ssl.match_hostname, cert, hostname)

        cert = {'subject': ((('commonName', 'example.com'),),)}
        ok(cert, 'example.com')
        ok(cert, 'ExAmple.cOm')
        fail(cert, 'www.example.com')
        fail(cert, '.example.com')
        fail(cert, 'example.org')
        fail(cert, 'exampleXcom')

        cert = {'subject': ((('commonName', '*.a.com'),),)}
        ok(cert, 'foo.a.com')
        fail(cert, 'bar.foo.a.com')
        fail(cert, 'a.com')
        fail(cert, 'Xa.com')
        fail(cert, '.a.com')

        # only match one left-most wildcard
        cert = {'subject': ((('commonName', 'f*.com'),),)}
        ok(cert, 'foo.com')
        ok(cert, 'f.com')
        fail(cert, 'bar.com')
        fail(cert, 'foo.a.com')
        fail(cert, 'bar.foo.com')

        # NULL bytes are bad, CVE-2013-4073
        cert = {'subject': ((('commonName',
                              'null.python.org\x00example.org'),),)}
        ok(cert, 'null.python.org\x00example.org') # or raise an error?
        fail(cert, 'example.org')
        fail(cert, 'null.python.org')

        # error cases with wildcards
        cert = {'subject': ((('commonName', '*.*.a.com'),),)}
        fail(cert, 'bar.foo.a.com')
        fail(cert, 'a.com')
        fail(cert, 'Xa.com')
        fail(cert, '.a.com')

        cert = {'subject': ((('commonName', 'a.*.com'),),)}
        fail(cert, 'a.foo.com')
        fail(cert, 'a..com')
        fail(cert, 'a.com')

        # wildcard doesn't match IDNA prefix 'xn--'
        idna = u'püthon.python.org'.encode("idna").decode("ascii")
        cert = {'subject': ((('commonName', idna),),)}
        ok(cert, idna)
        cert = {'subject': ((('commonName', 'x*.python.org'),),)}
        fail(cert, idna)
        cert = {'subject': ((('commonName', 'xn--p*.python.org'),),)}
        fail(cert, idna)

        # wildcard in first fragment and  IDNA A-labels in sequent fragments
        # are supported.
        idna = u'www*.pythön.org'.encode("idna").decode("ascii")
        cert = {'subject': ((('commonName', idna),),)}
        ok(cert, u'www.pythön.org'.encode("idna").decode("ascii"))
        ok(cert, u'www1.pythön.org'.encode("idna").decode("ascii"))
        fail(cert, u'ftp.pythön.org'.encode("idna").decode("ascii"))
        fail(cert, u'pythön.org'.encode("idna").decode("ascii"))

        # Slightly fake real-world example
        cert = {'notAfter': 'Jun 26 21:41:46 2011 GMT',
                'subject': ((('commonName', 'linuxfrz.org'),),),
                'subjectAltName': (('DNS', 'linuxfr.org'),
                                   ('DNS', 'linuxfr.com'),
                                   ('othername', '<unsupported>'))}
        ok(cert, 'linuxfr.org')
        ok(cert, 'linuxfr.com')
        # Not a "DNS" entry
        fail(cert, '<unsupported>')
        # When there is a subjectAltName, commonName isn't used
        fail(cert, 'linuxfrz.org')

        # A pristine real-world example
        cert = {'notAfter': 'Dec 18 23:59:59 2011 GMT',
                'subject': ((('countryName', 'US'),),
                            (('stateOrProvinceName', 'California'),),
                            (('localityName', 'Mountain View'),),
                            (('organizationName', 'Google Inc'),),
                            (('commonName', 'mail.google.com'),))}
        ok(cert, 'mail.google.com')
        fail(cert, 'gmail.com')
        # Only commonName is considered
        fail(cert, 'California')

        # Neither commonName nor subjectAltName
        cert = {'notAfter': 'Dec 18 23:59:59 2011 GMT',
                'subject': ((('countryName', 'US'),),
                            (('stateOrProvinceName', 'California'),),
                            (('localityName', 'Mountain View'),),
                            (('organizationName', 'Google Inc'),))}
        fail(cert, 'mail.google.com')

        # No DNS entry in subjectAltName but a commonName
        cert = {'notAfter': 'Dec 18 23:59:59 2099 GMT',
                'subject': ((('countryName', 'US'),),
                            (('stateOrProvinceName', 'California'),),
                            (('localityName', 'Mountain View'),),
                            (('commonName', 'mail.google.com'),)),
                'subjectAltName': (('othername', 'blabla'), )}
        ok(cert, 'mail.google.com')

        # No DNS entry subjectAltName and no commonName
        cert = {'notAfter': 'Dec 18 23:59:59 2099 GMT',
                'subject': ((('countryName', 'US'),),
                            (('stateOrProvinceName', 'California'),),
                            (('localityName', 'Mountain View'),),
                            (('organizationName', 'Google Inc'),)),
                'subjectAltName': (('othername', 'blabla'),)}
        fail(cert, 'google.com')

        # Empty cert / no cert
        self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com')
        self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com')

        # Issue #17980: avoid denials of service by refusing more than one
        # wildcard per fragment.
        cert = {'subject': ((('commonName', 'a*b.com'),),)}
        ok(cert, 'axxb.com')
        cert = {'subject': ((('commonName', 'a*b.co*'),),)}
        fail(cert, 'axxb.com')
        cert = {'subject': ((('commonName', 'a*b*.com'),),)}
        with self.assertRaises(ssl.CertificateError) as cm:
            ssl.match_hostname(cert, 'axxbxxc.com')
        self.assertIn("too many wildcards", str(cm.exception))

    def test_server_side(self):
        # server_hostname doesn't work for server sockets
        ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
        with closing(socket.socket()) as sock:
            self.assertRaises(ValueError, ctx.wrap_socket, sock, True,
                              server_hostname="some.hostname")

    def test_unknown_channel_binding(self):
        # should raise ValueError for unknown type
        s = socket.socket(socket.AF_INET)
        with closing(ssl.wrap_socket(s)) as ss:
            with self.assertRaises(ValueError):
                ss.get_channel_binding("unknown-type")

    @unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
                         "'tls-unique' channel binding not available")
    def test_tls_unique_channel_binding(self):
        # unconnected should return None for known type
        s = socket.socket(socket.AF_INET)
        with closing(ssl.wrap_socket(s)) as ss:
            self.assertIsNone(ss.get_channel_binding("tls-unique"))
        # the same for server-side
        s = socket.socket(socket.AF_INET)
        with closing(ssl.wrap_socket(s, server_side=True, certfile=CERTFILE)) as ss:
            self.assertIsNone(ss.get_channel_binding("tls-unique"))

    def test_get_default_verify_paths(self):
        paths = ssl.get_default_verify_paths()
        self.assertEqual(len(paths), 6)
        self.assertIsInstance(paths, ssl.DefaultVerifyPaths)

        with support.EnvironmentVarGuard() as env:
            env["SSL_CERT_DIR"] = CAPATH
            env["SSL_CERT_FILE"] = CERTFILE
            paths = ssl.get_default_verify_paths()
            self.assertEqual(paths.cafile, CERTFILE)
            self.assertEqual(paths.capath, CAPATH)

    @unittest.skipUnless(sys.platform == "win32", "Windows specific")
    def test_enum_certificates(self):
        self.assertTrue(ssl.enum_certificates("CA"))
        self.assertTrue(ssl.enum_certificates("ROOT"))

        self.assertRaises(TypeError, ssl.enum_certificates)
        self.assertRaises(WindowsError, ssl.enum_certificates, "")

        trust_oids = set()
        for storename in ("CA", "ROOT"):
            store = ssl.enum_certificates(storename)
            self.assertIsInstance(store, list)
            for element in store:
                self.assertIsInstance(element, tuple)
                self.assertEqual(len(element), 3)
                cert, enc, trust = element
                self.assertIsInstance(cert, bytes)
                self.assertIn(enc, {"x509_asn", "pkcs_7_asn"})
                self.assertIsInstance(trust, (set, bool))
                if isinstance(trust, set):
                    trust_oids.update(trust)

        serverAuth = "1.3.6.1.5.5.7.3.1"
        self.assertIn(serverAuth, trust_oids)

    @unittest.skipUnless(sys.platform == "win32", "Windows specific")
    def test_enum_crls(self):
        self.assertTrue(ssl.enum_crls("CA"))
        self.assertRaises(TypeError, ssl.enum_crls)
        self.assertRaises(WindowsError, ssl.enum_crls, "")

        crls = ssl.enum_crls("CA")
        self.assertIsInstance(crls, list)
        for element in crls:
            self.assertIsInstance(element, tuple)
            self.assertEqual(len(element), 2)
            self.assertIsInstance(element[0], bytes)
            self.assertIn(element[1], {"x509_asn", "pkcs_7_asn"})


    def test_asn1object(self):
        expected = (129, 'serverAuth', 'TLS Web Server Authentication',
                    '1.3.6.1.5.5.7.3.1')

        val = ssl._ASN1Object('1.3.6.1.5.5.7.3.1')
        self.assertEqual(val, expected)
        self.assertEqual(val.nid, 129)
        self.assertEqual(val.shortname, 'serverAuth')
        self.assertEqual(val.longname, 'TLS Web Server Authentication')
        self.assertEqual(val.oid, '1.3.6.1.5.5.7.3.1')
        self.assertIsInstance(val, ssl._ASN1Object)
        self.assertRaises(ValueError, ssl._ASN1Object, 'serverAuth')

        val = ssl._ASN1Object.fromnid(129)
        self.assertEqual(val, expected)
        self.assertIsInstance(val, ssl._ASN1Object)
        self.assertRaises(ValueError, ssl._ASN1Object.fromnid, -1)
        with self.assertRaisesRegexp(ValueError, "unknown NID 100000"):
            ssl._ASN1Object.fromnid(100000)
        for i in range(1000):
            try:
                obj = ssl._ASN1Object.fromnid(i)
            except ValueError:
                pass
            else:
                self.assertIsInstance(obj.nid, int)
                self.assertIsInstance(obj.shortname, str)
                self.assertIsInstance(obj.longname, str)
                self.assertIsInstance(obj.oid, (str, type(None)))

        val = ssl._ASN1Object.fromname('TLS Web Server Authentication')
        self.assertEqual(val, expected)
        self.assertIsInstance(val, ssl._ASN1Object)
        self.assertEqual(ssl._ASN1Object.fromname('serverAuth'), expected)
        self.assertEqual(ssl._ASN1Object.fromname('1.3.6.1.5.5.7.3.1'),
                         expected)
        with self.assertRaisesRegexp(ValueError, "unknown object 'serverauth'"):
            ssl._ASN1Object.fromname('serverauth')

    def test_purpose_enum(self):
        val = ssl._ASN1Object('1.3.6.1.5.5.7.3.1')
        self.assertIsInstance(ssl.Purpose.SERVER_AUTH, ssl._ASN1Object)
        self.assertEqual(ssl.Purpose.SERVER_AUTH, val)
        self.assertEqual(ssl.Purpose.SERVER_AUTH.nid, 129)
        self.assertEqual(ssl.Purpose.SERVER_AUTH.shortname, 'serverAuth')
        self.assertEqual(ssl.Purpose.SERVER_AUTH.oid,
                              '1.3.6.1.5.5.7.3.1')

        val = ssl._ASN1Object('1.3.6.1.5.5.7.3.2')
        self.assertIsInstance(ssl.Purpose.CLIENT_AUTH, ssl._ASN1Object)
        self.assertEqual(ssl.Purpose.CLIENT_AUTH, val)
        self.assertEqual(ssl.Purpose.CLIENT_AUTH.nid, 130)
        self.assertEqual(ssl.Purpose.CLIENT_AUTH.shortname, 'clientAuth')
        self.assertEqual(ssl.Purpose.CLIENT_AUTH.oid,
                              '1.3.6.1.5.5.7.3.2')

    def test_unsupported_dtls(self):
        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        self.addCleanup(s.close)
        with self.assertRaises(NotImplementedError) as cx:
            ssl.wrap_socket(s, cert_reqs=ssl.CERT_NONE)
        self.assertEqual(str(cx.exception), "only stream sockets are supported")
        ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
        with self.assertRaises(NotImplementedError) as cx:
            ctx.wrap_socket(s)
        self.assertEqual(str(cx.exception), "only stream sockets are supported")

    def cert_time_ok(self, timestring, timestamp):
        self.assertEqual(ssl.cert_time_to_seconds(timestring), timestamp)

    def cert_time_fail(self, timestring):
        with self.assertRaises(ValueError):
            ssl.cert_time_to_seconds(timestring)

    @unittest.skipUnless(utc_offset(),
                         'local time needs to be different from UTC')
    def test_cert_time_to_seconds_timezone(self):
        # Issue #19940: ssl.cert_time_to_seconds() returns wrong
        #               results if local timezone is not UTC
        self.cert_time_ok("May  9 00:00:00 2007 GMT", 1178668800.0)
        self.cert_time_ok("Jan  5 09:34:43 2018 GMT", 1515144883.0)

    def test_cert_time_to_seconds(self):
        timestring = "Jan  5 09:34:43 2018 GMT"
        ts = 1515144883.0
        self.cert_time_ok(timestring, ts)
        # accept keyword parameter, assert its name
        self.assertEqual(ssl.cert_time_to_seconds(cert_time=timestring), ts)
        # accept both %e and %d (space or zero generated by strftime)
        self.cert_time_ok("Jan 05 09:34:43 2018 GMT", ts)
        # case-insensitive
        self.cert_time_ok("JaN  5 09:34:43 2018 GmT", ts)
        self.cert_time_fail("Jan  5 09:34 2018 GMT")     # no seconds
        self.cert_time_fail("Jan  5 09:34:43 2018")      # no GMT
        self.cert_time_fail("Jan  5 09:34:43 2018 UTC")  # not GMT timezone
        self.cert_time_fail("Jan 35 09:34:43 2018 GMT")  # invalid day
        self.cert_time_fail("Jon  5 09:34:43 2018 GMT")  # invalid month
        self.cert_time_fail("Jan  5 24:00:00 2018 GMT")  # invalid hour
        self.cert_time_fail("Jan  5 09:60:43 2018 GMT")  # invalid minute

        newyear_ts = 1230768000.0
        # leap seconds
        self.cert_time_ok("Dec 31 23:59:60 2008 GMT", newyear_ts)
        # same timestamp
        self.cert_time_ok("Jan  1 00:00:00 2009 GMT", newyear_ts)

        self.cert_time_ok("Jan  5 09:34:59 2018 GMT", 1515144899)
        #  allow 60th second (even if it is not a leap second)
        self.cert_time_ok("Jan  5 09:34:60 2018 GMT", 1515144900)
        #  allow 2nd leap second for compatibility with time.strptime()
        self.cert_time_ok("Jan  5 09:34:61 2018 GMT", 1515144901)
        self.cert_time_fail("Jan  5 09:34:62 2018 GMT")  # invalid seconds

        # no special treatement for the special value:
        #   99991231235959Z (rfc 5280)
        self.cert_time_ok("Dec 31 23:59:59 9999 GMT", 253402300799.0)

    @support.run_with_locale('LC_ALL', '')
    def test_cert_time_to_seconds_locale(self):
        # `cert_time_to_seconds()` should be locale independent

        def local_february_name():
            return time.strftime('%b', (1, 2, 3, 4, 5, 6, 0, 0, 0))

        if local_february_name().lower() == 'feb':
            self.skipTest("locale-specific month name needs to be "
                          "different from C locale")

        # locale-independent
        self.cert_time_ok("Feb  9 00:00:00 2007 GMT", 1170979200.0)
        self.cert_time_fail(local_february_name() + "  9 00:00:00 2007 GMT")


class ContextTests(unittest.TestCase):

    @skip_if_broken_ubuntu_ssl
    def test_constructor(self):
        for protocol in PROTOCOLS:
            ssl.SSLContext(protocol)
        self.assertRaises(TypeError, ssl.SSLContext)
        self.assertRaises(ValueError, ssl.SSLContext, -1)
        self.assertRaises(ValueError, ssl.SSLContext, 42)

    @skip_if_broken_ubuntu_ssl
    def test_protocol(self):
        for proto in PROTOCOLS:
            ctx = ssl.SSLContext(proto)
            self.assertEqual(ctx.protocol, proto)

    def test_ciphers(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.set_ciphers("ALL")
        ctx.set_ciphers("DEFAULT")
        with self.assertRaisesRegexp(ssl.SSLError, "No cipher can be selected"):
            ctx.set_ciphers("^$:,;?*'dorothyx")

    @skip_if_broken_ubuntu_ssl
    def test_options(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        # OP_ALL | OP_NO_SSLv2 | OP_NO_SSLv3 is the default value
        default = (ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
        # SSLContext also enables these by default
        default |= (OP_NO_COMPRESSION | OP_CIPHER_SERVER_PREFERENCE |
                    OP_SINGLE_DH_USE | OP_SINGLE_ECDH_USE |
                    OP_ENABLE_MIDDLEBOX_COMPAT)
        self.assertEqual(default, ctx.options)
        ctx.options |= ssl.OP_NO_TLSv1
        self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options)
        if can_clear_options():
            ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1)
            self.assertEqual(default, ctx.options)
            ctx.options = 0
            # Ubuntu has OP_NO_SSLv3 forced on by default
            self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3)
        else:
            with self.assertRaises(ValueError):
                ctx.options = 0

    def test_verify_mode(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        # Default value
        self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
        ctx.verify_mode = ssl.CERT_OPTIONAL
        self.assertEqual(ctx.verify_mode, ssl.CERT_OPTIONAL)
        ctx.verify_mode = ssl.CERT_REQUIRED
        self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
        ctx.verify_mode = ssl.CERT_NONE
        self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
        with self.assertRaises(TypeError):
            ctx.verify_mode = None
        with self.assertRaises(ValueError):
            ctx.verify_mode = 42

    @unittest.skipUnless(have_verify_flags(),
                         "verify_flags need OpenSSL > 0.9.8")
    def test_verify_flags(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        # default value
        tf = getattr(ssl, "VERIFY_X509_TRUSTED_FIRST", 0)
        self.assertEqual(ctx.verify_flags, ssl.VERIFY_DEFAULT | tf)
        ctx.verify_flags = ssl.VERIFY_CRL_CHECK_LEAF
        self.assertEqual(ctx.verify_flags, ssl.VERIFY_CRL_CHECK_LEAF)
        ctx.verify_flags = ssl.VERIFY_CRL_CHECK_CHAIN
        self.assertEqual(ctx.verify_flags, ssl.VERIFY_CRL_CHECK_CHAIN)
        ctx.verify_flags = ssl.VERIFY_DEFAULT
        self.assertEqual(ctx.verify_flags, ssl.VERIFY_DEFAULT)
        # supports any value
        ctx.verify_flags = ssl.VERIFY_CRL_CHECK_LEAF | ssl.VERIFY_X509_STRICT
        self.assertEqual(ctx.verify_flags,
                         ssl.VERIFY_CRL_CHECK_LEAF | ssl.VERIFY_X509_STRICT)
        with self.assertRaises(TypeError):
            ctx.verify_flags = None

    def test_load_cert_chain(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        # Combined key and cert in a single file
        ctx.load_cert_chain(CERTFILE, keyfile=None)
        ctx.load_cert_chain(CERTFILE, keyfile=CERTFILE)
        self.assertRaises(TypeError, ctx.load_cert_chain, keyfile=CERTFILE)
        with self.assertRaises(IOError) as cm:
            ctx.load_cert_chain(NONEXISTINGCERT)
        self.assertEqual(cm.exception.errno, errno.ENOENT)
        with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
            ctx.load_cert_chain(BADCERT)
        with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
            ctx.load_cert_chain(EMPTYCERT)
        # Separate key and cert
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.load_cert_chain(ONLYCERT, ONLYKEY)
        ctx.load_cert_chain(certfile=ONLYCERT, keyfile=ONLYKEY)
        ctx.load_cert_chain(certfile=BYTES_ONLYCERT, keyfile=BYTES_ONLYKEY)
        with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
            ctx.load_cert_chain(ONLYCERT)
        with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
            ctx.load_cert_chain(ONLYKEY)
        with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
            ctx.load_cert_chain(certfile=ONLYKEY, keyfile=ONLYCERT)
        # Mismatching key and cert
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        with self.assertRaisesRegexp(ssl.SSLError, "key values mismatch"):
            ctx.load_cert_chain(CAFILE_CACERT, ONLYKEY)
        # Password protected key and cert
        ctx.load_cert_chain(CERTFILE_PROTECTED, password=KEY_PASSWORD)
        ctx.load_cert_chain(CERTFILE_PROTECTED, password=KEY_PASSWORD.encode())
        ctx.load_cert_chain(CERTFILE_PROTECTED,
                            password=bytearray(KEY_PASSWORD.encode()))
        ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED, KEY_PASSWORD)
        ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED, KEY_PASSWORD.encode())
        ctx.load_cert_chain(ONLYCERT, ONLYKEY_PROTECTED,
                            bytearray(KEY_PASSWORD.encode()))
        with self.assertRaisesRegexp(TypeError, "should be a string"):
            ctx.load_cert_chain(CERTFILE_PROTECTED, password=True)
        with self.assertRaises(ssl.SSLError):
            ctx.load_cert_chain(CERTFILE_PROTECTED, password="badpass")
        with self.assertRaisesRegexp(ValueError, "cannot be longer"):
            # openssl has a fixed limit on the password buffer.
            # PEM_BUFSIZE is generally set to 1kb.
            # Return a string larger than this.
            ctx.load_cert_chain(CERTFILE_PROTECTED, password=b'a' * 102400)
        # Password callback
        def getpass_unicode():
            return KEY_PASSWORD
        def getpass_bytes():
            return KEY_PASSWORD.encode()
        def getpass_bytearray():
            return bytearray(KEY_PASSWORD.encode())
        def getpass_badpass():
            return "badpass"
        def getpass_huge():
            return b'a' * (1024 * 1024)
        def getpass_bad_type():
            return 9
        def getpass_exception():
            raise Exception('getpass error')
        class GetPassCallable:
            def __call__(self):
                return KEY_PASSWORD
            def getpass(self):
                return KEY_PASSWORD
        ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_unicode)
        ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_bytes)
        ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_bytearray)
        ctx.load_cert_chain(CERTFILE_PROTECTED, password=GetPassCallable())
        ctx.load_cert_chain(CERTFILE_PROTECTED,
                            password=GetPassCallable().getpass)
        with self.assertRaises(ssl.SSLError):
            ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_badpass)
        with self.assertRaisesRegexp(ValueError, "cannot be longer"):
            ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_huge)
        with self.assertRaisesRegexp(TypeError, "must return a string"):
            ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_bad_type)
        with self.assertRaisesRegexp(Exception, "getpass error"):
            ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_exception)
        # Make sure the password function isn't called if it isn't needed
        ctx.load_cert_chain(CERTFILE, password=getpass_exception)

    def test_load_verify_locations(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.load_verify_locations(CERTFILE)
        ctx.load_verify_locations(cafile=CERTFILE, capath=None)
        ctx.load_verify_locations(BYTES_CERTFILE)
        ctx.load_verify_locations(cafile=BYTES_CERTFILE, capath=None)
        ctx.load_verify_locations(cafile=BYTES_CERTFILE.decode('utf-8'))
        self.assertRaises(TypeError, ctx.load_verify_locations)
        self.assertRaises(TypeError, ctx.load_verify_locations, None, None, None)
        with self.assertRaises(IOError) as cm:
            ctx.load_verify_locations(NONEXISTINGCERT)
        self.assertEqual(cm.exception.errno, errno.ENOENT)
        with self.assertRaises(IOError):
            ctx.load_verify_locations(u'')
        with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
            ctx.load_verify_locations(BADCERT)
        ctx.load_verify_locations(CERTFILE, CAPATH)
        ctx.load_verify_locations(CERTFILE, capath=BYTES_CAPATH)

        # Issue #10989: crash if the second argument type is invalid
        self.assertRaises(TypeError, ctx.load_verify_locations, None, True)

    def test_load_verify_cadata(self):
        # test cadata
        with open(CAFILE_CACERT) as f:
            cacert_pem = f.read().decode("ascii")
        cacert_der = ssl.PEM_cert_to_DER_cert(cacert_pem)
        with open(CAFILE_NEURONIO) as f:
            neuronio_pem = f.read().decode("ascii")
        neuronio_der = ssl.PEM_cert_to_DER_cert(neuronio_pem)

        # test PEM
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        self.assertEqual(ctx.cert_store_stats()["x509_ca"], 0)
        ctx.load_verify_locations(cadata=cacert_pem)
        self.assertEqual(ctx.cert_store_stats()["x509_ca"], 1)
        ctx.load_verify_locations(cadata=neuronio_pem)
        self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
        # cert already in hash table
        ctx.load_verify_locations(cadata=neuronio_pem)
        self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)

        # combined
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        combined = "\n".join((cacert_pem, neuronio_pem))
        ctx.load_verify_locations(cadata=combined)
        self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)

        # with junk around the certs
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        combined = ["head", cacert_pem, "other", neuronio_pem, "again",
                    neuronio_pem, "tail"]
        ctx.load_verify_locations(cadata="\n".join(combined))
        self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)

        # test DER
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.load_verify_locations(cadata=cacert_der)
        ctx.load_verify_locations(cadata=neuronio_der)
        self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)
        # cert already in hash table
        ctx.load_verify_locations(cadata=cacert_der)
        self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)

        # combined
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        combined = b"".join((cacert_der, neuronio_der))
        ctx.load_verify_locations(cadata=combined)
        self.assertEqual(ctx.cert_store_stats()["x509_ca"], 2)

        # error cases
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        self.assertRaises(TypeError, ctx.load_verify_locations, cadata=object)

        with self.assertRaisesRegexp(ssl.SSLError, "no start line"):
            ctx.load_verify_locations(cadata=u"broken")
        with self.assertRaisesRegexp(ssl.SSLError, "not enough data"):
            ctx.load_verify_locations(cadata=b"broken")


    def test_load_dh_params(self):
        filename = u'dhpäräm.pem'
        fs_encoding = sys.getfilesystemencoding()
        try:
            filename.encode(fs_encoding)
        except UnicodeEncodeError:
            self.skipTest("filename %r cannot be encoded to the filesystem encoding %r" % (filename, fs_encoding))

        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.load_dh_params(DHFILE)
        if os.name != 'nt':
            ctx.load_dh_params(BYTES_DHFILE)
        self.assertRaises(TypeError, ctx.load_dh_params)
        self.assertRaises(TypeError, ctx.load_dh_params, None)
        with self.assertRaises(IOError) as cm:
            ctx.load_dh_params(NONEXISTINGCERT)
        self.assertEqual(cm.exception.errno, errno.ENOENT)
        with self.assertRaises(ssl.SSLError) as cm:
            ctx.load_dh_params(CERTFILE)
        with support.temp_dir() as d:
            fname = os.path.join(d, filename)
            shutil.copy(DHFILE, fname)
            ctx.load_dh_params(fname)

    @skip_if_broken_ubuntu_ssl
    def test_session_stats(self):
        for proto in PROTOCOLS:
            ctx = ssl.SSLContext(proto)
            self.assertEqual(ctx.session_stats(), {
                'number': 0,
                'connect': 0,
                'connect_good': 0,
                'connect_renegotiate': 0,
                'accept': 0,
                'accept_good': 0,
                'accept_renegotiate': 0,
                'hits': 0,
                'misses': 0,
                'timeouts': 0,
                'cache_full': 0,
            })

    def test_set_default_verify_paths(self):
        # There's not much we can do to test that it acts as expected,
        # so just check it doesn't crash or raise an exception.
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.set_default_verify_paths()

    @unittest.skipUnless(ssl.HAS_ECDH, "ECDH disabled on this OpenSSL build")
    def test_set_ecdh_curve(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.set_ecdh_curve("prime256v1")
        ctx.set_ecdh_curve(b"prime256v1")
        self.assertRaises(TypeError, ctx.set_ecdh_curve)
        self.assertRaises(TypeError, ctx.set_ecdh_curve, None)
        self.assertRaises(ValueError, ctx.set_ecdh_curve, "foo")
        self.assertRaises(ValueError, ctx.set_ecdh_curve, b"foo")

    @needs_sni
    def test_sni_callback(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)

        # set_servername_callback expects a callable, or None
        self.assertRaises(TypeError, ctx.set_servername_callback)
        self.assertRaises(TypeError, ctx.set_servername_callback, 4)
        self.assertRaises(TypeError, ctx.set_servername_callback, "")
        self.assertRaises(TypeError, ctx.set_servername_callback, ctx)

        def dummycallback(sock, servername, ctx):
            pass
        ctx.set_servername_callback(None)
        ctx.set_servername_callback(dummycallback)

    @needs_sni
    def test_sni_callback_refcycle(self):
        # Reference cycles through the servername callback are detected
        # and cleared.
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        def dummycallback(sock, servername, ctx, cycle=ctx):
            pass
        ctx.set_servername_callback(dummycallback)
        wr = weakref.ref(ctx)
        del ctx, dummycallback
        gc.collect()
        self.assertIs(wr(), None)

    def test_cert_store_stats(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        self.assertEqual(ctx.cert_store_stats(),
            {'x509_ca': 0, 'crl': 0, 'x509': 0})
        ctx.load_cert_chain(CERTFILE)
        self.assertEqual(ctx.cert_store_stats(),
            {'x509_ca': 0, 'crl': 0, 'x509': 0})
        ctx.load_verify_locations(CERTFILE)
        self.assertEqual(ctx.cert_store_stats(),
            {'x509_ca': 0, 'crl': 0, 'x509': 1})
        ctx.load_verify_locations(CAFILE_CACERT)
        self.assertEqual(ctx.cert_store_stats(),
            {'x509_ca': 1, 'crl': 0, 'x509': 2})

    def test_get_ca_certs(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        self.assertEqual(ctx.get_ca_certs(), [])
        # CERTFILE is not flagged as X509v3 Basic Constraints: CA:TRUE
        ctx.load_verify_locations(CERTFILE)
        self.assertEqual(ctx.get_ca_certs(), [])
        # but CAFILE_CACERT is a CA cert
        ctx.load_verify_locations(CAFILE_CACERT)
        self.assertEqual(ctx.get_ca_certs(),
            [{'issuer': ((('organizationName', 'Root CA'),),
                         (('organizationalUnitName', 'http://www.cacert.org'),),
                         (('commonName', 'CA Cert Signing Authority'),),
                         (('emailAddress', 'support@cacert.org'),)),
              'notAfter': asn1time('Mar 29 12:29:49 2033 GMT'),
              'notBefore': asn1time('Mar 30 12:29:49 2003 GMT'),
              'serialNumber': '00',
              'crlDistributionPoints': ('https://www.cacert.org/revoke.crl',),
              'subject': ((('organizationName', 'Root CA'),),
                          (('organizationalUnitName', 'http://www.cacert.org'),),
                          (('commonName', 'CA Cert Signing Authority'),),
                          (('emailAddress', 'support@cacert.org'),)),
              'version': 3}])

        with open(CAFILE_CACERT) as f:
            pem = f.read()
        der = ssl.PEM_cert_to_DER_cert(pem)
        self.assertEqual(ctx.get_ca_certs(True), [der])

    def test_load_default_certs(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.load_default_certs()

        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.load_default_certs(ssl.Purpose.SERVER_AUTH)
        ctx.load_default_certs()

        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.load_default_certs(ssl.Purpose.CLIENT_AUTH)

        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        self.assertRaises(TypeError, ctx.load_default_certs, None)
        self.assertRaises(TypeError, ctx.load_default_certs, 'SERVER_AUTH')

    @unittest.skipIf(sys.platform == "win32", "not-Windows specific")
    @unittest.skipIf(IS_LIBRESSL, "LibreSSL doesn't support env vars")
    def test_load_default_certs_env(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        with support.EnvironmentVarGuard() as env:
            env["SSL_CERT_DIR"] = CAPATH
            env["SSL_CERT_FILE"] = CERTFILE
            ctx.load_default_certs()
            self.assertEqual(ctx.cert_store_stats(), {"crl": 0, "x509": 1, "x509_ca": 0})

    @unittest.skipUnless(sys.platform == "win32", "Windows specific")
    def test_load_default_certs_env_windows(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        ctx.load_default_certs()
        stats = ctx.cert_store_stats()

        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        with support.EnvironmentVarGuard() as env:
            env["SSL_CERT_DIR"] = CAPATH
            env["SSL_CERT_FILE"] = CERTFILE
            ctx.load_default_certs()
            stats["x509"] += 1
            self.assertEqual(ctx.cert_store_stats(), stats)

    def _assert_context_options(self, ctx):
        self.assertEqual(ctx.options & ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv2)
        if OP_NO_COMPRESSION != 0:
            self.assertEqual(ctx.options & OP_NO_COMPRESSION,
                             OP_NO_COMPRESSION)
        if OP_SINGLE_DH_USE != 0:
            self.assertEqual(ctx.options & OP_SINGLE_DH_USE,
                             OP_SINGLE_DH_USE)
        if OP_SINGLE_ECDH_USE != 0:
            self.assertEqual(ctx.options & OP_SINGLE_ECDH_USE,
                             OP_SINGLE_ECDH_USE)
        if OP_CIPHER_SERVER_PREFERENCE != 0:
            self.assertEqual(ctx.options & OP_CIPHER_SERVER_PREFERENCE,
                             OP_CIPHER_SERVER_PREFERENCE)

    def test_create_default_context(self):
        ctx = ssl.create_default_context()

        self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
        self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
        self.assertTrue(ctx.check_hostname)
        self._assert_context_options(ctx)


        with open(SIGNING_CA) as f:
            cadata = f.read().decode("ascii")
        ctx = ssl.create_default_context(cafile=SIGNING_CA, capath=CAPATH,
                                         cadata=cadata)
        self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
        self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
        self._assert_context_options(ctx)

        ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
        self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
        self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
        self._assert_context_options(ctx)

    def test__create_stdlib_context(self):
        ctx = ssl._create_stdlib_context()
        self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
        self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
        self.assertFalse(ctx.check_hostname)
        self._assert_context_options(ctx)

        ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1)
        self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1)
        self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
        self._assert_context_options(ctx)

        ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1,
                                         cert_reqs=ssl.CERT_REQUIRED,
                                         check_hostname=True)
        self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1)
        self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED)
        self.assertTrue(ctx.check_hostname)
        self._assert_context_options(ctx)

        ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH)
        self.assertEqual(ctx.protocol, ssl.PROTOCOL_SSLv23)
        self.assertEqual(ctx.verify_mode, ssl.CERT_NONE)
        self._assert_context_options(ctx)

    def test__https_verify_certificates(self):
        # Unit test to check the contect factory mapping
        # The factories themselves are tested above
        # This test will fail by design if run under PYTHONHTTPSVERIFY=0
        # (as will various test_httplib tests)

        # Uses a fresh SSL module to avoid affecting the real one
        local_ssl = support.import_fresh_module("ssl")
        # Certificate verification is enabled by default
        self.assertIs(local_ssl._create_default_https_context,
                      local_ssl.create_default_context)
        # Turn default verification off
        local_ssl._https_verify_certificates(enable=False)
        self.assertIs(local_ssl._create_default_https_context,
                      local_ssl._create_unverified_context)
        # And back on
        local_ssl._https_verify_certificates(enable=True)
        self.assertIs(local_ssl._create_default_https_context,
                      local_ssl.create_default_context)
        # The default behaviour is to enable
        local_ssl._https_verify_certificates(enable=False)
        local_ssl._https_verify_certificates()
        self.assertIs(local_ssl._create_default_https_context,
                      local_ssl.create_default_context)

    def test__https_verify_envvar(self):
        # Unit test to check the PYTHONHTTPSVERIFY handling
        # Need to use a subprocess so it can still be run under -E
        https_is_verified = """import ssl, sys; \
            status = "Error: _create_default_https_context does not verify certs" \
                       if ssl._create_default_https_context is \
                          ssl._create_unverified_context \
                     else None; \
            sys.exit(status)"""
        https_is_not_verified = """import ssl, sys; \
            status = "Error: _create_default_https_context verifies certs" \
                       if ssl._create_default_https_context is \
                          ssl.create_default_context \
                     else None; \
            sys.exit(status)"""
        extra_env = {}
        # Omitting it leaves verification on
        assert_python_ok("-c", https_is_verified, **extra_env)
        # Setting it to zero turns verification off
        extra_env[ssl._https_verify_envvar] = "0"
        assert_python_ok("-c", https_is_not_verified, **extra_env)
        # Any other value should also leave it on
        for setting in ("", "1", "enabled", "foo"):
            extra_env[ssl._https_verify_envvar] = setting
            assert_python_ok("-c", https_is_verified, **extra_env)

    def test_check_hostname(self):
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        self.assertFalse(ctx.check_hostname)

        # Requires CERT_REQUIRED or CERT_OPTIONAL
        with self.assertRaises(ValueError):
            ctx.check_hostname = True
        ctx.verify_mode = ssl.CERT_REQUIRED
        self.assertFalse(ctx.check_hostname)
        ctx.check_hostname = True
        self.assertTrue(ctx.check_hostname)

        ctx.verify_mode = ssl.CERT_OPTIONAL
        ctx.check_hostname = True
        self.assertTrue(ctx.check_hostname)

        # Cannot set CERT_NONE with check_hostname enabled
        with self.assertRaises(ValueError):
            ctx.verify_mode = ssl.CERT_NONE
        ctx.check_hostname = False
        self.assertFalse(ctx.check_hostname)


class SSLErrorTests(unittest.TestCase):

    def test_str(self):
        # The str() of a SSLError doesn't include the errno
        e = ssl.SSLError(1, "foo")
        self.assertEqual(str(e), "foo")
        self.assertEqual(e.errno, 1)
        # Same for a subclass
        e = ssl.SSLZeroReturnError(1, "foo")
        self.assertEqual(str(e), "foo")
        self.assertEqual(e.errno, 1)

    def test_lib_reason(self):
        # Test the library and reason attributes
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        with self.assertRaises(ssl.SSLError) as cm:
            ctx.load_dh_params(CERTFILE)
        self.assertEqual(cm.exception.library, 'PEM')
        self.assertEqual(cm.exception.reason, 'NO_START_LINE')
        s = str(cm.exception)
        self.assertTrue(s.startswith("[PEM: NO_START_LINE] no start line"), s)

    def test_subclass(self):
        # Check that the appropriate SSLError subclass is raised
        # (this only tests one of them)
        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
        with closing(socket.socket()) as s:
            s.bind(("127.0.0.1", 0))
            s.listen(5)
            c = socket.socket()
            c.connect(s.getsockname())
            c.setblocking(False)
            with closing(ctx.wrap_socket(c, False, do_handshake_on_connect=False)) as c:
                with self.assertRaises(ssl.SSLWantReadError) as cm:
                    c.do_handshake()
                s = str(cm.exception)
                self.assertTrue(s.startswith("The operation did not complete (read)"), s)
                # For compatibility
                self.assertEqual(cm.exception.errno, ssl.SSL_ERROR_WANT_READ)


class NetworkedTests(unittest.TestCase):

    def test_connect(self):
        with support.transient_internet(REMOTE_HOST):
            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
                                cert_reqs=ssl.CERT_NONE)
            try:
                s.connect((REMOTE_HOST, 443))
                self.assertEqual({}, s.getpeercert())
            finally:
                s.close()

            # this should fail because we have no verification certs
            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
                                cert_reqs=ssl.CERT_REQUIRED)
            self.assertRaisesRegexp(ssl.SSLError, "certificate verify failed",
                                   s.connect, (REMOTE_HOST, 443))
            s.close()

            # this should succeed because we specify the root cert
            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
                                cert_reqs=ssl.CERT_REQUIRED,
                                ca_certs=REMOTE_ROOT_CERT)
            try:
                s.connect((REMOTE_HOST, 443))
                self.assertTrue(s.getpeercert())
            finally:
                s.close()

    def test_connect_ex(self):
        # Issue #11326: check connect_ex() implementation
        with support.transient_internet(REMOTE_HOST):
            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
                                cert_reqs=ssl.CERT_REQUIRED,
                                ca_certs=REMOTE_ROOT_CERT)
            try:
                self.assertEqual(0, s.connect_ex((REMOTE_HOST, 443)))
                self.assertTrue(s.getpeercert())
            finally:
                s.close()

    def test_non_blocking_connect_ex(self):
        # Issue #11326: non-blocking connect_ex() should allow handshake
        # to proceed after the socket gets ready.
        with support.transient_internet(REMOTE_HOST):
            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
                                cert_reqs=ssl.CERT_REQUIRED,
                                ca_certs=REMOTE_ROOT_CERT,
                                do_handshake_on_connect=False)
            try:
                s.setblocking(False)
                rc = s.connect_ex((REMOTE_HOST, 443))
                # EWOULDBLOCK under Windows, EINPROGRESS elsewhere
                self.assertIn(rc, (0, errno.EINPROGRESS, errno.EWOULDBLOCK))
                # Wait for connect to finish
                select.select([], [s], [], 5.0)
                # Non-blocking handshake
                while True:
                    try:
                        s.do_handshake()
                        break
                    except ssl.SSLWantReadError:
                        select.select([s], [], [], 5.0)
                    except ssl.SSLWantWriteError:
                        select.select([], [s], [], 5.0)
                # SSL established
                self.assertTrue(s.getpeercert())
            finally:
                s.close()

    def test_timeout_connect_ex(self):
        # Issue #12065: on a timeout, connect_ex() should return the original
        # errno (mimicking the behaviour of non-SSL sockets).
        with support.transient_internet(REMOTE_HOST):
            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
                                cert_reqs=ssl.CERT_REQUIRED,
                                ca_certs=REMOTE_ROOT_CERT,
                                do_handshake_on_connect=False)
            try:
                s.settimeout(0.0000001)
                rc = s.connect_ex((REMOTE_HOST, 443))
                if rc == 0:
                    self.skipTest("REMOTE_HOST responded too quickly")
                self.assertIn(rc, (errno.EAGAIN, errno.EWOULDBLOCK))
            finally:
                s.close()

    def test_connect_ex_error(self):
        with support.transient_internet(REMOTE_HOST):
            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
                                cert_reqs=ssl.CERT_REQUIRED,
                                ca_certs=REMOTE_ROOT_CERT)
            try:
                rc = s.connect_ex((REMOTE_HOST, 444))
                # Issue #19919: Windows machines or VMs hosted on Windows
                # machines sometimes return EWOULDBLOCK.
                errors = (
                    errno.ECONNREFUSED, errno.EHOSTUNREACH, errno.ETIMEDOUT,
                    errno.EWOULDBLOCK,
                )
                self.assertIn(rc, errors)
            finally:
                s.close()

    def test_connect_with_context(self):
        with support.transient_internet(REMOTE_HOST):
            # Same as test_connect, but with a separately created context
            ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            s = ctx.wrap_socket(socket.socket(socket.AF_INET))
            s.connect((REMOTE_HOST, 443))
            try:
                self.assertEqual({}, s.getpeercert())
            finally:
                s.close()
            # Same with a server hostname
            s = ctx.wrap_socket(socket.socket(socket.AF_INET),
                                server_hostname=REMOTE_HOST)
            s.connect((REMOTE_HOST, 443))
            s.close()
            # This should fail because we have no verification certs
            ctx.verify_mode = ssl.CERT_REQUIRED
            s = ctx.wrap_socket(socket.socket(socket.AF_INET))
            self.assertRaisesRegexp(ssl.SSLError, "certificate verify failed",
                                    s.connect, (REMOTE_HOST, 443))
            s.close()
            # This should succeed because we specify the root cert
            ctx.load_verify_locations(REMOTE_ROOT_CERT)
            s = ctx.wrap_socket(socket.socket(socket.AF_INET))
            s.connect((REMOTE_HOST, 443))
            try:
                cert = s.getpeercert()
                self.assertTrue(cert)
            finally:
                s.close()

    def test_connect_capath(self):
        # Verify server certificates using the `capath` argument
        # NOTE: the subject hashing algorithm has been changed between
        # OpenSSL 0.9.8n and 1.0.0, as a result the capath directory must
        # contain both versions of each certificate (same content, different
        # filename) for this test to be portable across OpenSSL releases.
        with support.transient_internet(REMOTE_HOST):
            ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            ctx.verify_mode = ssl.CERT_REQUIRED
            ctx.load_verify_locations(capath=CAPATH)
            s = ctx.wrap_socket(socket.socket(socket.AF_INET))
            s.connect((REMOTE_HOST, 443))
            try:
                cert = s.getpeercert()
                self.assertTrue(cert)
            finally:
                s.close()
            # Same with a bytes `capath` argument
            ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            ctx.verify_mode = ssl.CERT_REQUIRED
            ctx.load_verify_locations(capath=BYTES_CAPATH)
            s = ctx.wrap_socket(socket.socket(socket.AF_INET))
            s.connect((REMOTE_HOST, 443))
            try:
                cert = s.getpeercert()
                self.assertTrue(cert)
            finally:
                s.close()

    def test_connect_cadata(self):
        with open(REMOTE_ROOT_CERT) as f:
            pem = f.read().decode('ascii')
        der = ssl.PEM_cert_to_DER_cert(pem)
        with support.transient_internet(REMOTE_HOST):
            ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            ctx.verify_mode = ssl.CERT_REQUIRED
            ctx.load_verify_locations(cadata=pem)
            with closing(ctx.wrap_socket(socket.socket(socket.AF_INET))) as s:
                s.connect((REMOTE_HOST, 443))
                cert = s.getpeercert()
                self.assertTrue(cert)

            # same with DER
            ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            ctx.verify_mode = ssl.CERT_REQUIRED
            ctx.load_verify_locations(cadata=der)
            with closing(ctx.wrap_socket(socket.socket(socket.AF_INET))) as s:
                s.connect((REMOTE_HOST, 443))
                cert = s.getpeercert()
                self.assertTrue(cert)

    @unittest.skipIf(os.name == "nt", "Can't use a socket as a file under Windows")
    def test_makefile_close(self):
        # Issue #5238: creating a file-like object with makefile() shouldn't
        # delay closing the underlying "real socket" (here tested with its
        # file descriptor, hence skipping the test under Windows).
        with support.transient_internet(REMOTE_HOST):
            ss = ssl.wrap_socket(socket.socket(socket.AF_INET))
            ss.connect((REMOTE_HOST, 443))
            fd = ss.fileno()
            f = ss.makefile()
            f.close()
            # The fd is still open
            os.read(fd, 0)
            # Closing the SSL socket should close the fd too
            ss.close()
            gc.collect()
            with self.assertRaises(OSError) as e:
                os.read(fd, 0)
            self.assertEqual(e.exception.errno, errno.EBADF)

    def test_non_blocking_handshake(self):
        with support.transient_internet(REMOTE_HOST):
            s = socket.socket(socket.AF_INET)
            s.connect((REMOTE_HOST, 443))
            s.setblocking(False)
            s = ssl.wrap_socket(s,
                                cert_reqs=ssl.CERT_NONE,
                                do_handshake_on_connect=False)
            count = 0
            while True:
                try:
                    count += 1
                    s.do_handshake()
                    break
                except ssl.SSLWantReadError:
                    select.select([s], [], [])
                except ssl.SSLWantWriteError:
                    select.select([], [s], [])
            s.close()
            if support.verbose:
                sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count)

    def test_get_server_certificate(self):
        def _test_get_server_certificate(host, port, cert=None):
            with support.transient_internet(host):
                pem = ssl.get_server_certificate((host, port))
                if not pem:
                    self.fail("No server certificate on %s:%s!" % (host, port))

                try:
                    pem = ssl.get_server_certificate((host, port),
                                                     ca_certs=CERTFILE)
                except ssl.SSLError as x:
                    #should fail
                    if support.verbose:
                        sys.stdout.write("%s\n" % x)
                else:
                    self.fail("Got server certificate %s for %s:%s!" % (pem, host, port))
                pem = ssl.get_server_certificate((host, port),
                                                 ca_certs=cert)
                if not pem:
                    self.fail("No server certificate on %s:%s!" % (host, port))
                if support.verbose:
                    sys.stdout.write("\nVerified certificate for %s:%s is\n%s\n" % (host, port ,pem))

        _test_get_server_certificate(REMOTE_HOST, 443, REMOTE_ROOT_CERT)
        if support.IPV6_ENABLED:
            _test_get_server_certificate('ipv6.google.com', 443)

    def test_ciphers(self):
        remote = (REMOTE_HOST, 443)
        with support.transient_internet(remote[0]):
            with closing(ssl.wrap_socket(socket.socket(socket.AF_INET),
                                         cert_reqs=ssl.CERT_NONE, ciphers="ALL")) as s:
                s.connect(remote)
            with closing(ssl.wrap_socket(socket.socket(socket.AF_INET),
                                         cert_reqs=ssl.CERT_NONE, ciphers="DEFAULT")) as s:
                s.connect(remote)
            # Error checking can happen at instantiation or when connecting
            with self.assertRaisesRegexp(ssl.SSLError, "No cipher can be selected"):
                with closing(socket.socket(socket.AF_INET)) as sock:
                    s = ssl.wrap_socket(sock,
                                        cert_reqs=ssl.CERT_NONE, ciphers="^$:,;?*'dorothyx")
                    s.connect(remote)

    def test_get_ca_certs_capath(self):
        # capath certs are loaded on request
        with support.transient_internet(REMOTE_HOST):
            ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            ctx.verify_mode = ssl.CERT_REQUIRED
            ctx.load_verify_locations(capath=CAPATH)
            self.assertEqual(ctx.get_ca_certs(), [])
            s = ctx.wrap_socket(socket.socket(socket.AF_INET))
            s.connect((REMOTE_HOST, 443))
            try:
                cert = s.getpeercert()
                self.assertTrue(cert)
            finally:
                s.close()
            self.assertEqual(len(ctx.get_ca_certs()), 1)

    @needs_sni
    def test_context_setget(self):
        # Check that the context of a connected socket can be replaced.
        with support.transient_internet(REMOTE_HOST):
            ctx1 = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            ctx2 = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            s = socket.socket(socket.AF_INET)
            with closing(ctx1.wrap_socket(s)) as ss:
                ss.connect((REMOTE_HOST, 443))
                self.assertIs(ss.context, ctx1)
                self.assertIs(ss._sslobj.context, ctx1)
                ss.context = ctx2
                self.assertIs(ss.context, ctx2)
                self.assertIs(ss._sslobj.context, ctx2)

try:
    import threading
except ImportError:
    _have_threads = False
else:
    _have_threads = True

    from test.ssl_servers import make_https_server

    class ThreadedEchoServer(threading.Thread):

        class ConnectionHandler(threading.Thread):

            """A mildly complicated class, because we want it to work both
            with and without the SSL wrapper around the socket connection, so
            that we can test the STARTTLS functionality."""

            def __init__(self, server, connsock, addr):
                self.server = server
                self.running = False
                self.sock = connsock
                self.addr = addr
                self.sock.setblocking(1)
                self.sslconn = None
                threading.Thread.__init__(self)
                self.daemon = True

            def wrap_conn(self):
                try:
                    self.sslconn = self.server.context.wrap_socket(
                        self.sock, server_side=True)
                    self.server.selected_npn_protocols.append(self.sslconn.selected_npn_protocol())
                    self.server.selected_alpn_protocols.append(self.sslconn.selected_alpn_protocol())
                except (ssl.SSLError, socket.error, OSError) as e:
                    if e.errno in (errno.ECONNRESET, errno.EPIPE, errno.ESHUTDOWN):
                        # Mimick Python 3:
                        #
                        #    except (ConnectionResetError, BrokenPipeError):
                        #
                        # We treat ConnectionResetError as though it were an
                        # SSLError - OpenSSL on Ubuntu abruptly closes the
                        # connection when asked to use an unsupported protocol.
                        #
                        # BrokenPipeError is raised in TLS 1.3 mode, when OpenSSL
                        # tries to send session tickets after handshake.
                        # https://github.com/openssl/openssl/issues/6342
                        self.server.conn_errors.append(str(e))
                        if self.server.chatty:
                            handle_error(
                                "\n server:  bad connection attempt from "
                                + repr(self.addr) + ":\n")
                        self.running = False
                        self.close()
                        return False
                    else:
                        # OSError may occur with wrong protocols, e.g. both
                        # sides use PROTOCOL_TLS_SERVER.
                        #
                        # XXX Various errors can have happened here, for example
                        # a mismatching protocol version, an invalid certificate,
                        # or a low-level bug. This should be made more discriminating.
                        if not isinstance(e, ssl.SSLError) and e.errno != errno.ECONNRESET:
                            raise
                        self.server.conn_errors.append(e)
                        if self.server.chatty:
                            handle_error("\n server:  bad connection attempt from " + repr(self.addr) + ":\n")
                        self.running = False
                        self.server.stop()
                        self.close()
                        return False
                else:
                    if self.server.context.verify_mode == ssl.CERT_REQUIRED:
                        cert = self.sslconn.getpeercert()
                        if support.verbose and self.server.chatty:
                            sys.stdout.write(" client cert is " + pprint.pformat(cert) + "\n")
                        cert_binary = self.sslconn.getpeercert(True)
                        if support.verbose and self.server.chatty:
                            sys.stdout.write(" cert binary is " + str(len(cert_binary)) + " bytes\n")
                    cipher = self.sslconn.cipher()
                    if support.verbose and self.server.chatty:
                        sys.stdout.write(" server: connection cipher is now " + str(cipher) + "\n")
                        sys.stdout.write(" server: selected protocol is now "
                                + str(self.sslconn.selected_npn_protocol()) + "\n")
                    return True

            def read(self):
                if self.sslconn:
                    return self.sslconn.read()
                else:
                    return self.sock.recv(1024)

            def write(self, bytes):
                if self.sslconn:
                    return self.sslconn.write(bytes)
                else:
                    return self.sock.send(bytes)

            def close(self):
                if self.sslconn:
                    self.sslconn.close()
                else:
                    self.sock.close()

            def run(self):
                self.running = True
                if not self.server.starttls_server:
                    if not self.wrap_conn():
                        return
                while self.running:
                    try:
                        msg = self.read()
                        stripped = msg.strip()
                        if not stripped:
                            # eof, so quit this handler
                            self.running = False
                            self.close()
                        elif stripped == b'over':
                            if support.verbose and self.server.connectionchatty:
                                sys.stdout.write(" server: client closed connection\n")
                            self.close()
                            return
                        elif (self.server.starttls_server and
                              stripped == b'STARTTLS'):
                            if support.verbose and self.server.connectionchatty:
                                sys.stdout.write(" server: read STARTTLS from client, sending OK...\n")
                            self.write(b"OK\n")
                            if not self.wrap_conn():
                                return
                        elif (self.server.starttls_server and self.sslconn
                              and stripped == b'ENDTLS'):
                            if support.verbose and self.server.connectionchatty:
                                sys.stdout.write(" server: read ENDTLS from client, sending OK...\n")
                            self.write(b"OK\n")
                            self.sock = self.sslconn.unwrap()
                            self.sslconn = None
                            if support.verbose and self.server.connectionchatty:
                                sys.stdout.write(" server: connection is now unencrypted...\n")
                        elif stripped == b'CB tls-unique':
                            if support.verbose and self.server.connectionchatty:
                                sys.stdout.write(" server: read CB tls-unique from client, sending our CB data...\n")
                            data = self.sslconn.get_channel_binding("tls-unique")
                            self.write(repr(data).encode("us-ascii") + b"\n")
                        else:
                            if (support.verbose and
                                self.server.connectionchatty):
                                ctype = (self.sslconn and "encrypted") or "unencrypted"
                                sys.stdout.write(" server: read %r (%s), sending back %r (%s)...\n"
                                                 % (msg, ctype, msg.lower(), ctype))
                            self.write(msg.lower())
                    except ssl.SSLError:
                        if self.server.chatty:
                            handle_error("Test server failure:\n")
                        self.close()
                        self.running = False
                        # normally, we'd just stop here, but for the test
                        # harness, we want to stop the server
                        self.server.stop()

        def __init__(self, certificate=None, ssl_version=None,
                     certreqs=None, cacerts=None,
                     chatty=True, connectionchatty=False, starttls_server=False,
                     npn_protocols=None, alpn_protocols=None,
                     ciphers=None, context=None):
            if context:
                self.context = context
            else:
                self.context = ssl.SSLContext(ssl_version
                                              if ssl_version is not None
                                              else ssl.PROTOCOL_TLS)
                self.context.verify_mode = (certreqs if certreqs is not None
                                            else ssl.CERT_NONE)
                if cacerts:
                    self.context.load_verify_locations(cacerts)
                if certificate:
                    self.context.load_cert_chain(certificate)
                if npn_protocols:
                    self.context.set_npn_protocols(npn_protocols)
                if alpn_protocols:
                    self.context.set_alpn_protocols(alpn_protocols)
                if ciphers:
                    self.context.set_ciphers(ciphers)
            self.chatty = chatty
            self.connectionchatty = connectionchatty
            self.starttls_server = starttls_server
            self.sock = socket.socket()
            self.port = support.bind_port(self.sock)
            self.flag = None
            self.active = False
            self.selected_npn_protocols = []
            self.selected_alpn_protocols = []
            self.conn_errors = []
            threading.Thread.__init__(self)
            self.daemon = True

        def __enter__(self):
            self.start(threading.Event())
            self.flag.wait()
            return self

        def __exit__(self, *args):
            self.stop()
            self.join()

        def start(self, flag=None):
            self.flag = flag
            threading.Thread.start(self)

        def run(self):
            self.sock.settimeout(0.05)
            self.sock.listen(5)
            self.active = True
            if self.flag:
                # signal an event
                self.flag.set()
            while self.active:
                try:
                    newconn, connaddr = self.sock.accept()
                    if support.verbose and self.chatty:
                        sys.stdout.write(' server:  new connection from '
                                         + repr(connaddr) + '\n')
                    handler = self.ConnectionHandler(self, newconn, connaddr)
                    handler.start()
                    handler.join()
                except socket.timeout:
                    pass
                except KeyboardInterrupt:
                    self.stop()
            self.sock.close()

        def stop(self):
            self.active = False

    class AsyncoreEchoServer(threading.Thread):

        class EchoServer(asyncore.dispatcher):

            class ConnectionHandler(asyncore.dispatcher_with_send):

                def __init__(self, conn, certfile):
                    self.socket = ssl.wrap_socket(conn, server_side=True,
                                                  certfile=certfile,
                                                  do_handshake_on_connect=False)
                    asyncore.dispatcher_with_send.__init__(self, self.socket)
                    self._ssl_accepting = True
                    self._do_ssl_handshake()

                def readable(self):
                    if isinstance(self.socket, ssl.SSLSocket):
                        while self.socket.pending() > 0:
                            self.handle_read_event()
                    return True

                def _do_ssl_handshake(self):
                    try:
                        self.socket.do_handshake()
                    except (ssl.SSLWantReadError, ssl.SSLWantWriteError):
                        return
                    except ssl.SSLEOFError:
                        return self.handle_close()
                    except ssl.SSLError:
                        raise
                    except socket.error, err:
                        if err.args[0] == errno.ECONNABORTED:
                            return self.handle_close()
                    else:
                        self._ssl_accepting = False

                def handle_read(self):
                    if self._ssl_accepting:
                        self._do_ssl_handshake()
                    else:
                        data = self.recv(1024)
                        if support.verbose:
                            sys.stdout.write(" server:  read %s from client\n" % repr(data))
                        if not data:
                            self.close()
                        else:
                            self.send(data.lower())

                def handle_close(self):
                    self.close()
                    if support.verbose:
                        sys.stdout.write(" server:  closed connection %s\n" % self.socket)

                def handle_error(self):
                    raise

            def __init__(self, certfile):
                self.certfile = certfile
                sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                self.port = support.bind_port(sock, '')
                asyncore.dispatcher.__init__(self, sock)
                self.listen(5)

            def handle_accept(self):
                sock_obj, addr = self.accept()
                if support.verbose:
                    sys.stdout.write(" server:  new connection from %s:%s\n" %addr)
                self.ConnectionHandler(sock_obj, self.certfile)

            def handle_error(self):
                raise

        def __init__(self, certfile):
            self.flag = None
            self.active = False
            self.server = self.EchoServer(certfile)
            self.port = self.server.port
            threading.Thread.__init__(self)
            self.daemon = True

        def __str__(self):
            return "<%s %s>" % (self.__class__.__name__, self.server)

        def __enter__(self):
            self.start(threading.Event())
            self.flag.wait()
            return self

        def __exit__(self, *args):
            if support.verbose:
                sys.stdout.write(" cleanup: stopping server.\n")
            self.stop()
            if support.verbose:
                sys.stdout.write(" cleanup: joining server thread.\n")
            self.join()
            if support.verbose:
                sys.stdout.write(" cleanup: successfully joined.\n")
            # make sure that ConnectionHandler is removed from socket_map
            asyncore.close_all(ignore_all=True)

        def start(self, flag=None):
            self.flag = flag
            threading.Thread.start(self)

        def run(self):
            self.active = True
            if self.flag:
                self.flag.set()
            while self.active:
                try:
                    asyncore.loop(1)
                except:
                    pass

        def stop(self):
            self.active = False
            self.server.close()

    def server_params_test(client_context, server_context, indata=b"FOO\n",
                           chatty=True, connectionchatty=False, sni_name=None):
        """
        Launch a server, connect a client to it and try various reads
        and writes.
        """
        stats = {}
        server = ThreadedEchoServer(context=server_context,
                                    chatty=chatty,
                                    connectionchatty=False)
        with server:
            with closing(client_context.wrap_socket(socket.socket(),
                    server_hostname=sni_name)) as s:
                s.connect((HOST, server.port))
                for arg in [indata, bytearray(indata), memoryview(indata)]:
                    if connectionchatty:
                        if support.verbose:
                            sys.stdout.write(
                                " client:  sending %r...\n" % indata)
                    s.write(arg)
                    outdata = s.read()
                    if connectionchatty:
                        if support.verbose:
                            sys.stdout.write(" client:  read %r\n" % outdata)
                    if outdata != indata.lower():
                        raise AssertionError(
                            "bad data <<%r>> (%d) received; expected <<%r>> (%d)\n"
                            % (outdata[:20], len(outdata),
                               indata[:20].lower(), len(indata)))
                s.write(b"over\n")
                if connectionchatty:
                    if support.verbose:
                        sys.stdout.write(" client:  closing connection.\n")
                stats.update({
                    'compression': s.compression(),
                    'cipher': s.cipher(),
                    'peercert': s.getpeercert(),
                    'client_alpn_protocol': s.selected_alpn_protocol(),
                    'client_npn_protocol': s.selected_npn_protocol(),
                    'version': s.version(),
                })
                s.close()
            stats['server_alpn_protocols'] = server.selected_alpn_protocols
            stats['server_npn_protocols'] = server.selected_npn_protocols
        return stats

    def try_protocol_combo(server_protocol, client_protocol, expect_success,
                           certsreqs=None, server_options=0, client_options=0):
        """
        Try to SSL-connect using *client_protocol* to *server_protocol*.
        If *expect_success* is true, assert that the connection succeeds,
        if it's false, assert that the connection fails.
        Also, if *expect_success* is a string, assert that it is the protocol
        version actually used by the connection.
        """
        if certsreqs is None:
            certsreqs = ssl.CERT_NONE
        certtype = {
            ssl.CERT_NONE: "CERT_NONE",
            ssl.CERT_OPTIONAL: "CERT_OPTIONAL",
            ssl.CERT_REQUIRED: "CERT_REQUIRED",
        }[certsreqs]
        if support.verbose:
            formatstr = (expect_success and " %s->%s %s\n") or " {%s->%s} %s\n"
            sys.stdout.write(formatstr %
                             (ssl.get_protocol_name(client_protocol),
                              ssl.get_protocol_name(server_protocol),
                              certtype))
        client_context = ssl.SSLContext(client_protocol)
        client_context.options |= client_options
        server_context = ssl.SSLContext(server_protocol)
        server_context.options |= server_options

        # NOTE: we must enable "ALL" ciphers on the client, otherwise an
        # SSLv23 client will send an SSLv3 hello (rather than SSLv2)
        # starting from OpenSSL 1.0.0 (see issue #8322).
        if client_context.protocol == ssl.PROTOCOL_SSLv23:
            client_context.set_ciphers("ALL")

        for ctx in (client_context, server_context):
            ctx.verify_mode = certsreqs
            ctx.load_cert_chain(CERTFILE)
            ctx.load_verify_locations(CERTFILE)
        try:
            stats = server_params_test(client_context, server_context,
                                       chatty=False, connectionchatty=False)
        # Protocol mismatch can result in either an SSLError, or a
        # "Connection reset by peer" error.
        except ssl.SSLError:
            if expect_success:
                raise
        except socket.error as e:
            if expect_success or e.errno != errno.ECONNRESET:
                raise
        else:
            if not expect_success:
                raise AssertionError(
                    "Client protocol %s succeeded with server protocol %s!"
                    % (ssl.get_protocol_name(client_protocol),
                       ssl.get_protocol_name(server_protocol)))
            elif (expect_success is not True
                  and expect_success != stats['version']):
                raise AssertionError("version mismatch: expected %r, got %r"
                                     % (expect_success, stats['version']))


    class ThreadedTests(unittest.TestCase):

        @skip_if_broken_ubuntu_ssl
        def test_echo(self):
            """Basic test of an SSL client connecting to a server"""
            if support.verbose:
                sys.stdout.write("\n")
            for protocol in PROTOCOLS:
                context = ssl.SSLContext(protocol)
                context.load_cert_chain(CERTFILE)
                server_params_test(context, context,
                                   chatty=True, connectionchatty=True)

        def test_getpeercert(self):
            if support.verbose:
                sys.stdout.write("\n")
            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            context.verify_mode = ssl.CERT_REQUIRED
            context.load_verify_locations(CERTFILE)
            context.load_cert_chain(CERTFILE)
            server = ThreadedEchoServer(context=context, chatty=False)
            with server:
                s = context.wrap_socket(socket.socket(),
                                        do_handshake_on_connect=False)
                s.connect((HOST, server.port))
                # getpeercert() raise ValueError while the handshake isn't
                # done.
                with self.assertRaises(ValueError):
                    s.getpeercert()
                s.do_handshake()
                cert = s.getpeercert()
                self.assertTrue(cert, "Can't get peer certificate.")
                cipher = s.cipher()
                if support.verbose:
                    sys.stdout.write(pprint.pformat(cert) + '\n')
                    sys.stdout.write("Connection cipher is " + str(cipher) + '.\n')
                if 'subject' not in cert:
                    self.fail("No subject field in certificate: %s." %
                              pprint.pformat(cert))
                if ((('organizationName', 'Python Software Foundation'),)
                    not in cert['subject']):
                    self.fail(
                        "Missing or invalid 'organizationName' field in certificate subject; "
                        "should be 'Python Software Foundation'.")
                self.assertIn('notBefore', cert)
                self.assertIn('notAfter', cert)
                before = ssl.cert_time_to_seconds(cert['notBefore'])
                after = ssl.cert_time_to_seconds(cert['notAfter'])
                self.assertLess(before, after)
                s.close()

        @unittest.skipUnless(have_verify_flags(),
                            "verify_flags need OpenSSL > 0.9.8")
        def test_crl_check(self):
            if support.verbose:
                sys.stdout.write("\n")

            server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            server_context.load_cert_chain(SIGNED_CERTFILE)

            context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            context.verify_mode = ssl.CERT_REQUIRED
            context.load_verify_locations(SIGNING_CA)
            tf = getattr(ssl, "VERIFY_X509_TRUSTED_FIRST", 0)
            self.assertEqual(context.verify_flags, ssl.VERIFY_DEFAULT | tf)

            # VERIFY_DEFAULT should pass
            server = ThreadedEchoServer(context=server_context, chatty=True)
            with server:
                with closing(context.wrap_socket(socket.socket())) as s:
                    s.connect((HOST, server.port))
                    cert = s.getpeercert()
                    self.assertTrue(cert, "Can't get peer certificate.")

            # VERIFY_CRL_CHECK_LEAF without a loaded CRL file fails
            context.verify_flags |= ssl.VERIFY_CRL_CHECK_LEAF

            server = ThreadedEchoServer(context=server_context, chatty=True)
            with server:
                with closing(context.wrap_socket(socket.socket())) as s:
                    with self.assertRaisesRegexp(ssl.SSLError,
                                                "certificate verify failed"):
                        s.connect((HOST, server.port))

            # now load a CRL file. The CRL file is signed by the CA.
            context.load_verify_locations(CRLFILE)

            server = ThreadedEchoServer(context=server_context, chatty=True)
            with server:
                with closing(context.wrap_socket(socket.socket())) as s:
                    s.connect((HOST, server.port))
                    cert = s.getpeercert()
                    self.assertTrue(cert, "Can't get peer certificate.")

        def test_check_hostname(self):
            if support.verbose:
                sys.stdout.write("\n")

            server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            server_context.load_cert_chain(SIGNED_CERTFILE)

            context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            context.verify_mode = ssl.CERT_REQUIRED
            context.check_hostname = True
            context.load_verify_locations(SIGNING_CA)

            # correct hostname should verify
            server = ThreadedEchoServer(context=server_context, chatty=True)
            with server:
                with closing(context.wrap_socket(socket.socket(),
                                                 server_hostname="localhost")) as s:
                    s.connect((HOST, server.port))
                    cert = s.getpeercert()
                    self.assertTrue(cert, "Can't get peer certificate.")

            # incorrect hostname should raise an exception
            server = ThreadedEchoServer(context=server_context, chatty=True)
            with server:
                with closing(context.wrap_socket(socket.socket(),
                                                 server_hostname="invalid")) as s:
                    with self.assertRaisesRegexp(ssl.CertificateError,
                                                "hostname 'invalid' doesn't match u?'localhost'"):
                        s.connect((HOST, server.port))

            # missing server_hostname arg should cause an exception, too
            server = ThreadedEchoServer(context=server_context, chatty=True)
            with server:
                with closing(socket.socket()) as s:
                    with self.assertRaisesRegexp(ValueError,
                                                "check_hostname requires server_hostname"):
                        context.wrap_socket(s)

        def test_wrong_cert(self):
            """Connecting when the server rejects the client's certificate

            Launch a server with CERT_REQUIRED, and check that trying to
            connect to it with a wrong client certificate fails.
            """
            certfile = os.path.join(os.path.dirname(__file__) or os.curdir,
                                       "keycert.pem")
            server = ThreadedEchoServer(SIGNED_CERTFILE,
                                        certreqs=ssl.CERT_REQUIRED,
                                        cacerts=SIGNING_CA, chatty=False,
                                        connectionchatty=False)
            with server, \
                    closing(socket.socket()) as sock, \
                    closing(ssl.wrap_socket(sock,
                                        certfile=certfile,
                                        ssl_version=ssl.PROTOCOL_TLSv1)) as s:
                try:
                    # Expect either an SSL error about the server rejecting
                    # the connection, or a low-level connection reset (which
                    # sometimes happens on Windows)
                    s.connect((HOST, server.port))
                except ssl.SSLError as e:
                    if support.verbose:
                        sys.stdout.write("\nSSLError is %r\n" % e)
                except socket.error as e:
                    if e.errno != errno.ECONNRESET:
                        raise
                    if support.verbose:
                        sys.stdout.write("\nsocket.error is %r\n" % e)
                else:
                    self.fail("Use of invalid cert should have failed!")

        def test_rude_shutdown(self):
            """A brutal shutdown of an SSL server should raise an OSError
            in the client when attempting handshake.
            """
            listener_ready = threading.Event()
            listener_gone = threading.Event()

            s = socket.socket()
            port = support.bind_port(s, HOST)

            # `listener` runs in a thread.  It sits in an accept() until
            # the main thread connects.  Then it rudely closes the socket,
            # and sets Event `listener_gone` to let the main thread know
            # the socket is gone.
            def listener():
                s.listen(5)
                listener_ready.set()
                newsock, addr = s.accept()
                newsock.close()
                s.close()
                listener_gone.set()

            def connector():
                listener_ready.wait()
                with closing(socket.socket()) as c:
                    c.connect((HOST, port))
                    listener_gone.wait()
                    try:
                        ssl_sock = ssl.wrap_socket(c)
                    except socket.error:
                        pass
                    else:
                        self.fail('connecting to closed SSL socket should have failed')

            t = threading.Thread(target=listener)
            t.start()
            try:
                connector()
            finally:
                t.join()

        @skip_if_broken_ubuntu_ssl
        @unittest.skipUnless(hasattr(ssl, 'PROTOCOL_SSLv2'),
                             "OpenSSL is compiled without SSLv2 support")
        def test_protocol_sslv2(self):
            """Connecting to an SSLv2 server with various client options"""
            if support.verbose:
                sys.stdout.write("\n")
            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True)
            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_OPTIONAL)
            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_REQUIRED)
            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False)
            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3, False)
            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLSv1, False)
            # SSLv23 client with specific SSL options
            if no_sslv2_implies_sslv3_hello():
                # No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
                try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
                                   client_options=ssl.OP_NO_SSLv2)
            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
                               client_options=ssl.OP_NO_SSLv3)
            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
                               client_options=ssl.OP_NO_TLSv1)

        @skip_if_broken_ubuntu_ssl
        @skip_if_openssl_cnf_minprotocol_gt_tls1
        def test_protocol_sslv23(self):
            """Connecting to an SSLv23 server with various client options"""
            if support.verbose:
                sys.stdout.write("\n")
            if hasattr(ssl, 'PROTOCOL_SSLv2'):
                try:
                    try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv2, True)
                except socket.error as x:
                    # this fails on some older versions of OpenSSL (0.9.7l, for instance)
                    if support.verbose:
                        sys.stdout.write(
                            " SSL2 client to SSL23 server test unexpectedly failed:\n %s\n"
                            % str(x))
            if hasattr(ssl, 'PROTOCOL_SSLv3'):
                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False)
            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True)
            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1')

            if hasattr(ssl, 'PROTOCOL_SSLv3'):
                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_OPTIONAL)
            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_OPTIONAL)
            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_OPTIONAL)

            if hasattr(ssl, 'PROTOCOL_SSLv3'):
                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_REQUIRED)
            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_REQUIRED)
            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_REQUIRED)

            # Server with specific SSL options
            if hasattr(ssl, 'PROTOCOL_SSLv3'):
                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False,
                               server_options=ssl.OP_NO_SSLv3)
            # Will choose TLSv1
            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True,
                               server_options=ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, False,
                               server_options=ssl.OP_NO_TLSv1)


        @skip_if_broken_ubuntu_ssl
        @unittest.skipUnless(hasattr(ssl, 'PROTOCOL_SSLv3'),
                             "OpenSSL is compiled without SSLv3 support")
        def test_protocol_sslv3(self):
            """Connecting to an SSLv3 server with various client options"""
            if support.verbose:
                sys.stdout.write("\n")
            try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, 'SSLv3')
            try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_OPTIONAL)
            try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_REQUIRED)
            if hasattr(ssl, 'PROTOCOL_SSLv2'):
                try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv2, False)
            try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False,
                               client_options=ssl.OP_NO_SSLv3)
            try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLSv1, False)
            if no_sslv2_implies_sslv3_hello():
                # No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
                try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23,
                                   False, client_options=ssl.OP_NO_SSLv2)

        @skip_if_broken_ubuntu_ssl
        def test_protocol_tlsv1(self):
            """Connecting to a TLSv1 server with various client options"""
            if support.verbose:
                sys.stdout.write("\n")
            try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1')
            try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_OPTIONAL)
            try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_REQUIRED)
            if hasattr(ssl, 'PROTOCOL_SSLv2'):
                try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv2, False)
            if hasattr(ssl, 'PROTOCOL_SSLv3'):
                try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv3, False)
            try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv23, False,
                               client_options=ssl.OP_NO_TLSv1)

        @skip_if_broken_ubuntu_ssl
        @unittest.skipUnless(hasattr(ssl, "PROTOCOL_TLSv1_1"),
                             "TLS version 1.1 not supported.")
        @skip_if_openssl_cnf_minprotocol_gt_tls1
        def test_protocol_tlsv1_1(self):
            """Connecting to a TLSv1.1 server with various client options.
               Testing against older TLS versions."""
            if support.verbose:
                sys.stdout.write("\n")
            try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
            if hasattr(ssl, 'PROTOCOL_SSLv2'):
                try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv2, False)
            if hasattr(ssl, 'PROTOCOL_SSLv3'):
                try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv3, False)
            try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv23, False,
                               client_options=ssl.OP_NO_TLSv1_1)

            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
            try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1, False)
            try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_1, False)


        @skip_if_broken_ubuntu_ssl
        @unittest.skipUnless(hasattr(ssl, "PROTOCOL_TLSv1_2"),
                             "TLS version 1.2 not supported.")
        def test_protocol_tlsv1_2(self):
            """Connecting to a TLSv1.2 server with various client options.
               Testing against older TLS versions."""
            if support.verbose:
                sys.stdout.write("\n")
            try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2',
                               server_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,
                               client_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,)
            if hasattr(ssl, 'PROTOCOL_SSLv2'):
                try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv2, False)
            if hasattr(ssl, 'PROTOCOL_SSLv3'):
                try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv3, False)
            try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv23, False,
                               client_options=ssl.OP_NO_TLSv1_2)

            try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2')
            try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False)
            try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False)
            try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False)
            try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, False)

        def test_starttls(self):
            """Switching from clear text to encrypted and back again."""
            msgs = (b"msg 1", b"MSG 2", b"STARTTLS", b"MSG 3", b"msg 4", b"ENDTLS", b"msg 5", b"msg 6")

            server = ThreadedEchoServer(CERTFILE,
                                        ssl_version=ssl.PROTOCOL_TLSv1,
                                        starttls_server=True,
                                        chatty=True,
                                        connectionchatty=True)
            wrapped = False
            with server:
                s = socket.socket()
                s.setblocking(1)
                s.connect((HOST, server.port))
                if support.verbose:
                    sys.stdout.write("\n")
                for indata in msgs:
                    if support.verbose:
                        sys.stdout.write(
                            " client:  sending %r...\n" % indata)
                    if wrapped:
                        conn.write(indata)
                        outdata = conn.read()
                    else:
                        s.send(indata)
                        outdata = s.recv(1024)
                    msg = outdata.strip().lower()
                    if indata == b"STARTTLS" and msg.startswith(b"ok"):
                        # STARTTLS ok, switch to secure mode
                        if support.verbose:
                            sys.stdout.write(
                                " client:  read %r from server, starting TLS...\n"
                                % msg)
                        conn = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1)
                        wrapped = True
                    elif indata == b"ENDTLS" and msg.startswith(b"ok"):
                        # ENDTLS ok, switch back to clear text
                        if support.verbose:
                            sys.stdout.write(
                                " client:  read %r from server, ending TLS...\n"
                                % msg)
                        s = conn.unwrap()
                        wrapped = False
                    else:
                        if support.verbose:
                            sys.stdout.write(
                                " client:  read %r from server\n" % msg)
                if support.verbose:
                    sys.stdout.write(" client:  closing connection.\n")
                if wrapped:
                    conn.write(b"over\n")
                else:
                    s.send(b"over\n")
                if wrapped:
                    conn.close()
                else:
                    s.close()

        def test_socketserver(self):
            """Using a SocketServer to create and manage SSL connections."""
            server = make_https_server(self, certfile=CERTFILE)
            # try to connect
            if support.verbose:
                sys.stdout.write('\n')
            with open(CERTFILE, 'rb') as f:
                d1 = f.read()
            d2 = ''
            # now fetch the same data from the HTTPS server
            url = 'https://localhost:%d/%s' % (
                server.port, os.path.split(CERTFILE)[1])
            context = ssl.create_default_context(cafile=CERTFILE)
            f = urllib2.urlopen(url, context=context)
            try:
                dlen = f.info().getheader("content-length")
                if dlen and (int(dlen) > 0):
                    d2 = f.read(int(dlen))
                    if support.verbose:
                        sys.stdout.write(
                            " client: read %d bytes from remote server '%s'\n"
                            % (len(d2), server))
            finally:
                f.close()
            self.assertEqual(d1, d2)

        def test_asyncore_server(self):
            """Check the example asyncore integration."""
            if support.verbose:
                sys.stdout.write("\n")

            indata = b"FOO\n"
            server = AsyncoreEchoServer(CERTFILE)
            with server:
                s = ssl.wrap_socket(socket.socket())
                s.connect(('127.0.0.1', server.port))
                if support.verbose:
                    sys.stdout.write(
                        " client:  sending %r...\n" % indata)
                s.write(indata)
                outdata = s.read()
                if support.verbose:
                    sys.stdout.write(" client:  read %r\n" % outdata)
                if outdata != indata.lower():
                    self.fail(
                        "bad data <<%r>> (%d) received; expected <<%r>> (%d)\n"
                        % (outdata[:20], len(outdata),
                           indata[:20].lower(), len(indata)))
                s.write(b"over\n")
                if support.verbose:
                    sys.stdout.write(" client:  closing connection.\n")
                s.close()
                if support.verbose:
                    sys.stdout.write(" client:  connection closed.\n")

        def test_recv_send(self):
            """Test recv(), send() and friends."""
            if support.verbose:
                sys.stdout.write("\n")

            server = ThreadedEchoServer(CERTFILE,
                                        certreqs=ssl.CERT_NONE,
                                        ssl_version=ssl.PROTOCOL_TLSv1,
                                        cacerts=CERTFILE,
                                        chatty=True,
                                        connectionchatty=False)
            with server:
                s = ssl.wrap_socket(socket.socket(),
                                    server_side=False,
                                    certfile=CERTFILE,
                                    ca_certs=CERTFILE,
                                    cert_reqs=ssl.CERT_NONE,
                                    ssl_version=ssl.PROTOCOL_TLSv1)
                s.connect((HOST, server.port))
                # helper methods for standardising recv* method signatures
                def _recv_into():
                    b = bytearray(b"\0"*100)
                    count = s.recv_into(b)
                    return b[:count]

                def _recvfrom_into():
                    b = bytearray(b"\0"*100)
                    count, addr = s.recvfrom_into(b)
                    return b[:count]

                # (name, method, whether to expect success, *args)
                send_methods = [
                    ('send', s.send, True, []),
                    ('sendto', s.sendto, False, ["some.address"]),
                    ('sendall', s.sendall, True, []),
                ]
                recv_methods = [
                    ('recv', s.recv, True, []),
                    ('recvfrom', s.recvfrom, False, ["some.address"]),
                    ('recv_into', _recv_into, True, []),
                    ('recvfrom_into', _recvfrom_into, False, []),
                ]
                data_prefix = u"PREFIX_"

                for meth_name, send_meth, expect_success, args in send_methods:
                    indata = (data_prefix + meth_name).encode('ascii')
                    try:
                        send_meth(indata, *args)
                        outdata = s.read()
                        if outdata != indata.lower():
                            self.fail(
                                "While sending with <<{name:s}>> bad data "
                                "<<{outdata:r}>> ({nout:d}) received; "
                                "expected <<{indata:r}>> ({nin:d})\n".format(
                                    name=meth_name, outdata=outdata[:20],
                                    nout=len(outdata),
                                    indata=indata[:20], nin=len(indata)
                                )
                            )
                    except ValueError as e:
                        if expect_success:
                            self.fail(
                                "Failed to send with method <<{name:s}>>; "
                                "expected to succeed.\n".format(name=meth_name)
                            )
                        if not str(e).startswith(meth_name):
                            self.fail(
                                "Method <<{name:s}>> failed with unexpected "
                                "exception message: {exp:s}\n".format(
                                    name=meth_name, exp=e
                                )
                            )

                for meth_name, recv_meth, expect_success, args in recv_methods:
                    indata = (data_prefix + meth_name).encode('ascii')
                    try:
                        s.send(indata)
                        outdata = recv_meth(*args)
                        if outdata != indata.lower():
                            self.fail(
                                "While receiving with <<{name:s}>> bad data "
                                "<<{outdata:r}>> ({nout:d}) received; "
                                "expected <<{indata:r}>> ({nin:d})\n".format(
                                    name=meth_name, outdata=outdata[:20],
                                    nout=len(outdata),
                                    indata=indata[:20], nin=len(indata)
                                )
                            )
                    except ValueError as e:
                        if expect_success:
                            self.fail(
                                "Failed to receive with method <<{name:s}>>; "
                                "expected to succeed.\n".format(name=meth_name)
                            )
                        if not str(e).startswith(meth_name):
                            self.fail(
                                "Method <<{name:s}>> failed with unexpected "
                                "exception message: {exp:s}\n".format(
                                    name=meth_name, exp=e
                                )
                            )
                        # consume data
                        s.read()

                # read(-1, buffer) is supported, even though read(-1) is not
                data = b"data"
                s.send(data)
                buffer = bytearray(len(data))
                self.assertEqual(s.read(-1, buffer), len(data))
                self.assertEqual(buffer, data)

                self.assertRaises(NotImplementedError, s.dup)
                s.write(b"over\n")

                self.assertRaises(ValueError, s.recv, -1)
                self.assertRaises(ValueError, s.read, -1)

                s.close()

        def test_recv_zero(self):
            server = ThreadedEchoServer(CERTFILE)
            server.__enter__()
            self.addCleanup(server.__exit__, None, None)
            s = socket.create_connection((HOST, server.port))
            self.addCleanup(s.close)
            s = ssl.wrap_socket(s, suppress_ragged_eofs=False)
            self.addCleanup(s.close)

            # recv/read(0) should return no data
            s.send(b"data")
            self.assertEqual(s.recv(0), b"")
            self.assertEqual(s.read(0), b"")
            self.assertEqual(s.read(), b"data")

            # Should not block if the other end sends no data
            s.setblocking(False)
            self.assertEqual(s.recv(0), b"")
            self.assertEqual(s.recv_into(bytearray()), 0)

        def test_handshake_timeout(self):
            # Issue #5103: SSL handshake must respect the socket timeout
            server = socket.socket(socket.AF_INET)
            host = "127.0.0.1"
            port = support.bind_port(server)
            started = threading.Event()
            finish = False

            def serve():
                server.listen(5)
                started.set()
                conns = []
                while not finish:
                    r, w, e = select.select([server], [], [], 0.1)
                    if server in r:
                        # Let the socket hang around rather than having
                        # it closed by garbage collection.
                        conns.append(server.accept()[0])
                for sock in conns:
                    sock.close()

            t = threading.Thread(target=serve)
            t.start()
            started.wait()

            try:
                try:
                    c = socket.socket(socket.AF_INET)
                    c.settimeout(0.2)
                    c.connect((host, port))
                    # Will attempt handshake and time out
                    self.assertRaisesRegexp(ssl.SSLError, "timed out",
                                            ssl.wrap_socket, c)
                finally:
                    c.close()
                try:
                    c = socket.socket(socket.AF_INET)
                    c = ssl.wrap_socket(c)
                    c.settimeout(0.2)
                    # Will attempt handshake and time out
                    self.assertRaisesRegexp(ssl.SSLError, "timed out",
                                            c.connect, (host, port))
                finally:
                    c.close()
            finally:
                finish = True
                t.join()
                server.close()

        def test_server_accept(self):
            # Issue #16357: accept() on a SSLSocket created through
            # SSLContext.wrap_socket().
            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            context.verify_mode = ssl.CERT_REQUIRED
            context.load_verify_locations(CERTFILE)
            context.load_cert_chain(CERTFILE)
            server = socket.socket(socket.AF_INET)
            host = "127.0.0.1"
            port = support.bind_port(server)
            server = context.wrap_socket(server, server_side=True)

            evt = threading.Event()
            remote = [None]
            peer = [None]
            def serve():
                server.listen(5)
                # Block on the accept and wait on the connection to close.
                evt.set()
                remote[0], peer[0] = server.accept()
                remote[0].send(remote[0].recv(4))

            t = threading.Thread(target=serve)
            t.start()
            # Client wait until server setup and perform a connect.
            evt.wait()
            client = context.wrap_socket(socket.socket())
            client.connect((host, port))
            client.send(b'data')
            client.recv()
            client_addr = client.getsockname()
            client.close()
            t.join()
            remote[0].close()
            server.close()
            # Sanity checks.
            self.assertIsInstance(remote[0], ssl.SSLSocket)
            self.assertEqual(peer[0], client_addr)

        def test_getpeercert_enotconn(self):
            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            with closing(context.wrap_socket(socket.socket())) as sock:
                with self.assertRaises(socket.error) as cm:
                    sock.getpeercert()
                self.assertEqual(cm.exception.errno, errno.ENOTCONN)

        def test_do_handshake_enotconn(self):
            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            with closing(context.wrap_socket(socket.socket())) as sock:
                with self.assertRaises(socket.error) as cm:
                    sock.do_handshake()
                self.assertEqual(cm.exception.errno, errno.ENOTCONN)

        def test_no_shared_ciphers(self):
            server_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            server_context.load_cert_chain(SIGNED_CERTFILE)
            client_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            client_context.verify_mode = ssl.CERT_REQUIRED
            client_context.check_hostname = True

            # OpenSSL enables all TLS 1.3 ciphers, enforce TLS 1.2 for test
            client_context.options |= ssl.OP_NO_TLSv1_3
            # Force different suites on client and master
            client_context.set_ciphers("AES128")
            server_context.set_ciphers("AES256")
            with ThreadedEchoServer(context=server_context) as server:
                s = client_context.wrap_socket(
                        socket.socket(),
                        server_hostname="localhost")
                with self.assertRaises(ssl.SSLError):
                    s.connect((HOST, server.port))
            self.assertIn("no shared cipher", str(server.conn_errors[0]))

        def test_version_basic(self):
            """
            Basic tests for SSLSocket.version().
            More tests are done in the test_protocol_*() methods.
            """
            context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            with ThreadedEchoServer(CERTFILE,
                                    ssl_version=ssl.PROTOCOL_TLSv1,
                                    chatty=False) as server:
                with closing(context.wrap_socket(socket.socket())) as s:
                    self.assertIs(s.version(), None)
                    s.connect((HOST, server.port))
                    self.assertEqual(s.version(), 'TLSv1')
                self.assertIs(s.version(), None)

        @unittest.skipUnless(ssl.HAS_TLSv1_3,
                             "test requires TLSv1.3 enabled OpenSSL")
        def test_tls1_3(self):
            context = ssl.SSLContext(ssl.PROTOCOL_TLS)
            context.load_cert_chain(CERTFILE)
            # disable all but TLS 1.3
            context.options |= (
                ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 | ssl.OP_NO_TLSv1_2
            )
            with ThreadedEchoServer(context=context) as server:
                s = context.wrap_socket(socket.socket())
                with closing(s):
                    s.connect((HOST, server.port))
                    self.assertIn(s.cipher()[0], [
                        'TLS_AES_256_GCM_SHA384',
                        'TLS_CHACHA20_POLY1305_SHA256',
                        'TLS_AES_128_GCM_SHA256',
                    ])

        @unittest.skipUnless(ssl.HAS_ECDH, "test requires ECDH-enabled OpenSSL")
        def test_default_ecdh_curve(self):
            # Issue #21015: elliptic curve-based Diffie Hellman key exchange
            # should be enabled by default on SSL contexts.
            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            context.load_cert_chain(CERTFILE)
            # TLSv1.3 defaults to PFS key agreement and no longer has KEA in
            # cipher name.
            context.options |= ssl.OP_NO_TLSv1_3
            # Prior to OpenSSL 1.0.0, ECDH ciphers have to be enabled
            # explicitly using the 'ECCdraft' cipher alias.  Otherwise,
            # our default cipher list should prefer ECDH-based ciphers
            # automatically.
            if ssl.OPENSSL_VERSION_INFO < (1, 0, 0):
                context.set_ciphers("ECCdraft:ECDH")
            with ThreadedEchoServer(context=context) as server:
                with closing(context.wrap_socket(socket.socket())) as s:
                    s.connect((HOST, server.port))
                    self.assertIn("ECDH", s.cipher()[0])

        @unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
                             "'tls-unique' channel binding not available")
        def test_tls_unique_channel_binding(self):
            """Test tls-unique channel binding."""
            if support.verbose:
                sys.stdout.write("\n")

            server = ThreadedEchoServer(CERTFILE,
                                        certreqs=ssl.CERT_NONE,
                                        ssl_version=ssl.PROTOCOL_TLSv1,
                                        cacerts=CERTFILE,
                                        chatty=True,
                                        connectionchatty=False)
            with server:
                s = ssl.wrap_socket(socket.socket(),
                                    server_side=False,
                                    certfile=CERTFILE,
                                    ca_certs=CERTFILE,
                                    cert_reqs=ssl.CERT_NONE,
                                    ssl_version=ssl.PROTOCOL_TLSv1)
                s.connect((HOST, server.port))
                # get the data
                cb_data = s.get_channel_binding("tls-unique")
                if support.verbose:
                    sys.stdout.write(" got channel binding data: {0!r}\n"
                                     .format(cb_data))

                # check if it is sane
                self.assertIsNotNone(cb_data)
                self.assertEqual(len(cb_data), 12) # True for TLSv1

                # and compare with the peers version
                s.write(b"CB tls-unique\n")
                peer_data_repr = s.read().strip()
                self.assertEqual(peer_data_repr,
                                 repr(cb_data).encode("us-ascii"))
                s.close()

                # now, again
                s = ssl.wrap_socket(socket.socket(),
                                    server_side=False,
                                    certfile=CERTFILE,
                                    ca_certs=CERTFILE,
                                    cert_reqs=ssl.CERT_NONE,
                                    ssl_version=ssl.PROTOCOL_TLSv1)
                s.connect((HOST, server.port))
                new_cb_data = s.get_channel_binding("tls-unique")
                if support.verbose:
                    sys.stdout.write(" got another channel binding data: {0!r}\n"
                                     .format(new_cb_data))
                # is it really unique
                self.assertNotEqual(cb_data, new_cb_data)
                self.assertIsNotNone(cb_data)
                self.assertEqual(len(cb_data), 12) # True for TLSv1
                s.write(b"CB tls-unique\n")
                peer_data_repr = s.read().strip()
                self.assertEqual(peer_data_repr,
                                 repr(new_cb_data).encode("us-ascii"))
                s.close()

        def test_compression(self):
            context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            context.load_cert_chain(CERTFILE)
            stats = server_params_test(context, context,
                                       chatty=True, connectionchatty=True)
            if support.verbose:
                sys.stdout.write(" got compression: {!r}\n".format(stats['compression']))
            self.assertIn(stats['compression'], { None, 'ZLIB', 'RLE' })

        @unittest.skipUnless(hasattr(ssl, 'OP_NO_COMPRESSION'),
                             "ssl.OP_NO_COMPRESSION needed for this test")
        def test_compression_disabled(self):
            context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            context.load_cert_chain(CERTFILE)
            context.options |= ssl.OP_NO_COMPRESSION
            stats = server_params_test(context, context,
                                       chatty=True, connectionchatty=True)
            self.assertIs(stats['compression'], None)

        def test_dh_params(self):
            # Check we can get a connection with ephemeral Diffie-Hellman
            context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            context.load_cert_chain(CERTFILE)
            context.load_dh_params(DHFILE)
            context.set_ciphers("kEDH")
            stats = server_params_test(context, context,
                                       chatty=True, connectionchatty=True)
            cipher = stats["cipher"][0]
            parts = cipher.split("-")
            if "ADH" not in parts and "EDH" not in parts and "DHE" not in parts:
                self.fail("Non-DH cipher: " + cipher[0])

        def test_selected_alpn_protocol(self):
            # selected_alpn_protocol() is None unless ALPN is used.
            context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            context.load_cert_chain(CERTFILE)
            stats = server_params_test(context, context,
                                       chatty=True, connectionchatty=True)
            self.assertIs(stats['client_alpn_protocol'], None)

        @unittest.skipUnless(ssl.HAS_ALPN, "ALPN support required")
        def test_selected_alpn_protocol_if_server_uses_alpn(self):
            # selected_alpn_protocol() is None unless ALPN is used by the client.
            client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            client_context.load_verify_locations(CERTFILE)
            server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            server_context.load_cert_chain(CERTFILE)
            server_context.set_alpn_protocols(['foo', 'bar'])
            stats = server_params_test(client_context, server_context,
                                       chatty=True, connectionchatty=True)
            self.assertIs(stats['client_alpn_protocol'], None)

        @unittest.skipUnless(ssl.HAS_ALPN, "ALPN support needed for this test")
        def test_alpn_protocols(self):
            server_protocols = ['foo', 'bar', 'milkshake']
            protocol_tests = [
                (['foo', 'bar'], 'foo'),
                (['bar', 'foo'], 'foo'),
                (['milkshake'], 'milkshake'),
                (['http/3.0', 'http/4.0'], None)
            ]
            for client_protocols, expected in protocol_tests:
                server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
                server_context.load_cert_chain(CERTFILE)
                server_context.set_alpn_protocols(server_protocols)
                client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
                client_context.load_cert_chain(CERTFILE)
                client_context.set_alpn_protocols(client_protocols)

                try:
                    stats = server_params_test(client_context,
                                               server_context,
                                               chatty=True,
                                               connectionchatty=True)
                except ssl.SSLError as e:
                    stats = e

                if (expected is None and IS_OPENSSL_1_1
                        and ssl.OPENSSL_VERSION_INFO < (1, 1, 0, 6)):
                    # OpenSSL 1.1.0 to 1.1.0e raises handshake error
                    self.assertIsInstance(stats, ssl.SSLError)
                else:
                    msg = "failed trying %s (s) and %s (c).\n" \
                        "was expecting %s, but got %%s from the %%s" \
                            % (str(server_protocols), str(client_protocols),
                                str(expected))
                    client_result = stats['client_alpn_protocol']
                    self.assertEqual(client_result, expected,
                                     msg % (client_result, "client"))
                    server_result = stats['server_alpn_protocols'][-1] \
                        if len(stats['server_alpn_protocols']) else 'nothing'
                    self.assertEqual(server_result, expected,
                                     msg % (server_result, "server"))

        def test_selected_npn_protocol(self):
            # selected_npn_protocol() is None unless NPN is used
            context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            context.load_cert_chain(CERTFILE)
            stats = server_params_test(context, context,
                                       chatty=True, connectionchatty=True)
            self.assertIs(stats['client_npn_protocol'], None)

        @unittest.skipUnless(ssl.HAS_NPN, "NPN support needed for this test")
        def test_npn_protocols(self):
            server_protocols = ['http/1.1', 'spdy/2']
            protocol_tests = [
                (['http/1.1', 'spdy/2'], 'http/1.1'),
                (['spdy/2', 'http/1.1'], 'http/1.1'),
                (['spdy/2', 'test'], 'spdy/2'),
                (['abc', 'def'], 'abc')
            ]
            for client_protocols, expected in protocol_tests:
                server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
                server_context.load_cert_chain(CERTFILE)
                server_context.set_npn_protocols(server_protocols)
                client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
                client_context.load_cert_chain(CERTFILE)
                client_context.set_npn_protocols(client_protocols)
                stats = server_params_test(client_context, server_context,
                                           chatty=True, connectionchatty=True)

                msg = "failed trying %s (s) and %s (c).\n" \
                      "was expecting %s, but got %%s from the %%s" \
                          % (str(server_protocols), str(client_protocols),
                             str(expected))
                client_result = stats['client_npn_protocol']
                self.assertEqual(client_result, expected, msg % (client_result, "client"))
                server_result = stats['server_npn_protocols'][-1] \
                    if len(stats['server_npn_protocols']) else 'nothing'
                self.assertEqual(server_result, expected, msg % (server_result, "server"))

        def sni_contexts(self):
            server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            server_context.load_cert_chain(SIGNED_CERTFILE)
            other_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            other_context.load_cert_chain(SIGNED_CERTFILE2)
            client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
            client_context.verify_mode = ssl.CERT_REQUIRED
            client_context.load_verify_locations(SIGNING_CA)
            return server_context, other_context, client_context

        def check_common_name(self, stats, name):
            cert = stats['peercert']
            self.assertIn((('commonName', name),), cert['subject'])

        @needs_sni
        def test_sni_callback(self):
            calls = []
            server_context, other_context, client_context = self.sni_contexts()

            def servername_cb(ssl_sock, server_name, initial_context):
                calls.append((server_name, initial_context))
                if server_name is not None:
                    ssl_sock.context = other_context
            server_context.set_servername_callback(servername_cb)

            stats = server_params_test(client_context, server_context,
                                       chatty=True,
                                       sni_name='supermessage')
            # The hostname was fetched properly, and the certificate was
            # changed for the connection.
            self.assertEqual(calls, [("supermessage", server_context)])
            # CERTFILE4 was selected
            self.check_common_name(stats, 'fakehostname')

            calls = []
            # The callback is called with server_name=None
            stats = server_params_test(client_context, server_context,
                                       chatty=True,
                                       sni_name=None)
            self.assertEqual(calls, [(None, server_context)])
            self.check_common_name(stats, 'localhost')

            # Check disabling the callback
            calls = []
            server_context.set_servername_callback(None)

            stats = server_params_test(client_context, server_context,
                                       chatty=True,
                                       sni_name='notfunny')
            # Certificate didn't change
            self.check_common_name(stats, 'localhost')
            self.assertEqual(calls, [])

        @needs_sni
        def test_sni_callback_alert(self):
            # Returning a TLS alert is reflected to the connecting client
            server_context, other_context, client_context = self.sni_contexts()

            def cb_returning_alert(ssl_sock, server_name, initial_context):
                return ssl.ALERT_DESCRIPTION_ACCESS_DENIED
            server_context.set_servername_callback(cb_returning_alert)

            with self.assertRaises(ssl.SSLError) as cm:
                stats = server_params_test(client_context, server_context,
                                           chatty=False,
                                           sni_name='supermessage')
            self.assertEqual(cm.exception.reason, 'TLSV1_ALERT_ACCESS_DENIED')

        @needs_sni
        def test_sni_callback_raising(self):
            # Raising fails the connection with a TLS handshake failure alert.
            server_context, other_context, client_context = self.sni_contexts()

            def cb_raising(ssl_sock, server_name, initial_context):
                1.0/0.0
            server_context.set_servername_callback(cb_raising)

            with self.assertRaises(ssl.SSLError) as cm, \
                 support.captured_stderr() as stderr:
                stats = server_params_test(client_context, server_context,
                                           chatty=False,
                                           sni_name='supermessage')
            self.assertEqual(cm.exception.reason, 'SSLV3_ALERT_HANDSHAKE_FAILURE')
            self.assertIn("ZeroDivisionError", stderr.getvalue())

        @needs_sni
        def test_sni_callback_wrong_return_type(self):
            # Returning the wrong return type terminates the TLS connection
            # with an internal error alert.
            server_context, other_context, client_context = self.sni_contexts()

            def cb_wrong_return_type(ssl_sock, server_name, initial_context):
                return "foo"
            server_context.set_servername_callback(cb_wrong_return_type)

            with self.assertRaises(ssl.SSLError) as cm, \
                 support.captured_stderr() as stderr:
                stats = server_params_test(client_context, server_context,
                                           chatty=False,
                                           sni_name='supermessage')
            self.assertEqual(cm.exception.reason, 'TLSV1_ALERT_INTERNAL_ERROR')
            self.assertIn("TypeError", stderr.getvalue())

        def test_read_write_after_close_raises_valuerror(self):
            context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
            context.verify_mode = ssl.CERT_REQUIRED
            context.load_verify_locations(CERTFILE)
            context.load_cert_chain(CERTFILE)
            server = ThreadedEchoServer(context=context, chatty=False)

            with server:
                s = context.wrap_socket(socket.socket())
                s.connect((HOST, server.port))
                s.close()

                self.assertRaises(ValueError, s.read, 1024)
                self.assertRaises(ValueError, s.write, b'hello')

def set_socket_so_linger_on_with_zero_timeout(sock):
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0))


class TestPreHandshakeClose(unittest.TestCase):
    """Verify behavior of close sockets with received data before to the handshake.
    """

    class SingleConnectionTestServerThread(threading.Thread):

        def __init__(self,  name, call_after_accept, timeout=None):
            self.call_after_accept = call_after_accept
            self.received_data = b''  # set by .run()
            self.wrap_error = None  # set by .run()
            self.listener = None  # set by .start()
            self.port = None  # set by .start()
            if timeout is None:
                self.timeout = support.SHORT_TIMEOUT
            else:
                self.timeout = timeout
            threading.Thread.__init__(self, name=name)

        def __enter__(self):
            self.start()
            return self

        def __exit__(self, *args):
            try:
                if self.listener:
                    self.listener.close()
            except ssl.SSLError:
                pass
            self.join()
            self.wrap_error = None  # avoid dangling references

        def start(self):
            self.ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
            self.ssl_ctx.verify_mode = ssl.CERT_REQUIRED
            self.ssl_ctx.load_verify_locations(cafile=ONLYCERT)
            self.ssl_ctx.load_cert_chain(certfile=ONLYCERT, keyfile=ONLYKEY)
            self.listener = socket.socket()
            self.port = support.bind_port(self.listener)
            self.listener.settimeout(self.timeout)
            self.listener.listen(1)
            threading.Thread.start(self)

        def run(self):
            try:
                conn, address = self.listener.accept()
            except OSError as e:
                if e.errno == errno.ETIMEDOUT:
                    # on timeout, just close the listener
                    return
                else:
                    raise
            finally:
                self.listener.close()

            with closing(conn):
                if self.call_after_accept(conn):
                    return
                try:
                    tls_socket = self.ssl_ctx.wrap_socket(conn, server_side=True)
                except ssl.SSLError as err:
                    self.wrap_error = err
                else:
                    try:
                        self.received_data = tls_socket.recv(400)
                    except OSError:
                        pass  # closed, protocol error, etc.

    def test_preauth_data_to_tls_server(self):
        server_accept_called = threading.Event()
        ready_for_server_wrap_socket = threading.Event()

        def call_after_accept(unused):
            server_accept_called.set()
            if not ready_for_server_wrap_socket.wait(support.SHORT_TIMEOUT):
                raise RuntimeError("wrap_socket event never set, test may fail.")
            return False  # Tell the server thread to continue.

        server = self.SingleConnectionTestServerThread(
                call_after_accept=call_after_accept,
                name="preauth_data_to_tls_server")
        server.__enter__()  # starts it
        self.addCleanup(server.__exit__)  # ... & unittest.TestCase stops it.

        with closing(socket.socket()) as client:
            client.connect(server.listener.getsockname())
            # This forces an immediate connection close via RST on .close().
            set_socket_so_linger_on_with_zero_timeout(client)
            client.setblocking(False)

            server_accept_called.wait()
            client.send(b"DELETE /data HTTP/1.0\r\n\r\n")
            client.close()  # RST

        ready_for_server_wrap_socket.set()
        server.join()

        wrap_error = server.wrap_error
        try:
            self.assertEqual(b"", server.received_data)
            self.assertIsInstance(wrap_error, ssl.SSLError)
            self.assertIn("before TLS handshake with data", wrap_error.args[1])
            self.assertIn("before TLS handshake with data", wrap_error.reason)
            self.assertNotEqual(0, wrap_error.args[0])
            self.assertIsNone(wrap_error.library, msg="attr must exist")
        finally:
            # gh-108342: Explicitly break the reference cycle
            wrap_error = None
            server = None

    def test_preauth_data_to_tls_client(self):
        server_can_continue_with_wrap_socket = threading.Event()
        client_can_continue_with_wrap_socket = threading.Event()

        def call_after_accept(conn_to_client):
            if not server_can_continue_with_wrap_socket.wait(support.SHORT_TIMEOUT):
                print("ERROR: test client took too long")

            # This forces an immediate connection close via RST on .close().
            set_socket_so_linger_on_with_zero_timeout(conn_to_client)
            conn_to_client.send(
                    b"HTTP/1.0 307 Temporary Redirect\r\n"
                    b"Location: https://example.com/someone-elses-server\r\n"
                    b"\r\n")
            conn_to_client.close()  # RST
            client_can_continue_with_wrap_socket.set()
            return True  # Tell the server to stop.

        server = self.SingleConnectionTestServerThread(
                call_after_accept=call_after_accept,
                name="preauth_data_to_tls_client")
        server.__enter__()  # starts it
        self.addCleanup(server.__exit__)  # ... & unittest.TestCase stops it.

        # Redundant; call_after_accept sets SO_LINGER on the accepted conn.
        set_socket_so_linger_on_with_zero_timeout(server.listener)

        with closing(socket.socket()) as client:
            client.connect(server.listener.getsockname())
            server_can_continue_with_wrap_socket.set()

            if not client_can_continue_with_wrap_socket.wait(support.SHORT_TIMEOUT):
                self.fail("test server took too long")
            ssl_ctx = ssl.create_default_context()
            try:
                tls_client = ssl_ctx.wrap_socket(
                        client, server_hostname="localhost")
            except ssl.SSLError as err:
                wrap_error = err
                received_data = b""
            else:
                wrap_error = None
                received_data = tls_client.recv(400)
                tls_client.close()

        server.join()
        try:
            self.assertEqual(b"", received_data)
            self.assertIsInstance(wrap_error, ssl.SSLError)
            self.assertIn("before TLS handshake with data", wrap_error.args[1])
            self.assertIn("before TLS handshake with data", wrap_error.reason)
            self.assertNotEqual(0, wrap_error.args[0])
            self.assertIsNone(wrap_error.library, msg="attr must exist")
        finally:
            # gh-108342: Explicitly break the reference cycle
            wrap_error = None
            server = None

    def test_https_client_non_tls_response_ignored(self):
        server_responding = threading.Event()

        class SynchronizedHTTPSConnection(httplib.HTTPSConnection):
            def connect(self):
                # Call clear text HTTP connect(), not the encrypted HTTPS (TLS)
                # connect(): wrap_socket() is called manually below.
                httplib.HTTPConnection.connect(self)

                # Wait for our fault injection server to have done its thing.
                if not server_responding.wait(support.SHORT_TIMEOUT) and support.verbose:
                    sys.stdout.write("server_responding event never set.")
                self.sock = self._context.wrap_socket(
                        self.sock, server_hostname=self.host)

        def call_after_accept(conn_to_client):
            # This forces an immediate connection close via RST on .close().
            set_socket_so_linger_on_with_zero_timeout(conn_to_client)
            conn_to_client.send(
                    b"HTTP/1.0 402 Payment Required\r\n"
                    b"\r\n")
            conn_to_client.close()  # RST
            server_responding.set()
            return True  # Tell the server to stop.

        timeout = 2.0
        server = self.SingleConnectionTestServerThread(
                call_after_accept=call_after_accept,
                name="non_tls_http_RST_responder",
                timeout=timeout)
        server.__enter__()  # starts it
        self.addCleanup(server.__exit__)  # ... & unittest.TestCase stops it.
        # Redundant; call_after_accept sets SO_LINGER on the accepted conn.
        set_socket_so_linger_on_with_zero_timeout(server.listener)

        connection = SynchronizedHTTPSConnection(
                server.listener.getsockname()[0],
                port=server.port,
                context=ssl.create_default_context(),
                timeout=timeout,
        )
        # There are lots of reasons this raises as desired, long before this
        # test was added. Sending the request requires a successful TLS wrapped
        # socket; that fails if the connection is broken. It may seem pointless
        # to test this. It serves as an illustration of something that we never
        # want to happen... properly not happening.
        with self.assertRaises(ssl.SSLError):
            connection.request("HEAD", "/test", headers={"Host": "localhost"})
            response = connection.getresponse()

        server.join()

def test_main(verbose=False):
    if support.verbose:
        plats = {
            'Linux': platform.linux_distribution,
            'Mac': platform.mac_ver,
            'Windows': platform.win32_ver,
        }
        for name, func in plats.items():
            plat = func()
            if plat and plat[0]:
                plat = '%s %r' % (name, plat)
                break
        else:
            plat = repr(platform.platform())
        print("test_ssl: testing with %r %r" %
            (ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO))
        print("          under %s" % plat)
        print("          HAS_SNI = %r" % ssl.HAS_SNI)
        print("          OP_ALL = 0x%8x" % ssl.OP_ALL)
        try:
            print("          OP_NO_TLSv1_1 = 0x%8x" % ssl.OP_NO_TLSv1_1)
        except AttributeError:
            pass

    for filename in [
        CERTFILE, REMOTE_ROOT_CERT, BYTES_CERTFILE,
        ONLYCERT, ONLYKEY, BYTES_ONLYCERT, BYTES_ONLYKEY,
        SIGNED_CERTFILE, SIGNED_CERTFILE2, SIGNING_CA,
        BADCERT, BADKEY, EMPTYCERT]:
        if not os.path.exists(filename):
            raise support.TestFailed("Can't read certificate file %r" % filename)

    tests = [ContextTests, BasicTests, BasicSocketTests, SSLErrorTests]
    tests += [TestPreHandshakeClose]

    if support.is_resource_enabled('network'):
        tests.append(NetworkedTests)

    if _have_threads:
        thread_info = support.threading_setup()
        if thread_info:
            tests.append(ThreadedTests)

    try:
        support.run_unittest(*tests)
    finally:
        if _have_threads:
            support.threading_cleanup(*thread_info)

if __name__ == "__main__":
    test_main()


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
25 Jul 2024 8.42 AM
root / root
0755
audiodata
--
25 Jul 2024 8.42 AM
root / root
0755
capath
--
25 Jul 2024 8.42 AM
root / root
0755
cjkencodings
--
25 Jul 2024 8.42 AM
root / root
0755
data
--
25 Jul 2024 8.42 AM
root / root
0755
decimaltestdata
--
25 Jul 2024 8.42 AM
root / root
0755
imghdrdata
--
25 Jul 2024 8.42 AM
root / root
0755
subprocessdata
--
25 Jul 2024 8.42 AM
root / root
0755
support
--
25 Jul 2024 8.13 AM
root / root
0755
tracedmodules
--
25 Jul 2024 8.42 AM
root / root
0755
xmltestdata
--
25 Jul 2024 8.42 AM
root / root
0755
185test.db
16 KB
10 Apr 2024 4.58 AM
root / root
0644
Sine-1000Hz-300ms.aif
60.25 KB
10 Apr 2024 4.58 AM
root / root
0644
__init__.py
0.046 KB
10 Apr 2024 4.58 AM
root / root
0644
__init__.pyc
0.121 KB
10 Apr 2024 4.58 AM
root / root
0644
__init__.pyo
0.121 KB
10 Apr 2024 4.58 AM
root / root
0644
__main__.py
0.054 KB
10 Apr 2024 4.58 AM
root / root
0644
__main__.pyc
0.205 KB
10 Apr 2024 4.58 AM
root / root
0644
__main__.pyo
0.205 KB
10 Apr 2024 4.58 AM
root / root
0644
_mock_backport.py
75.013 KB
10 Apr 2024 4.58 AM
root / root
0644
_mock_backport.pyc
69.023 KB
10 Apr 2024 4.58 AM
root / root
0644
_mock_backport.pyo
69.023 KB
10 Apr 2024 4.58 AM
root / root
0644
allsans.pem
4.919 KB
10 Apr 2024 4.58 AM
root / root
0644
audiotest.au
27.484 KB
10 Apr 2024 4.58 AM
root / root
0644
audiotests.py
9.52 KB
10 Apr 2024 4.58 AM
root / root
0644
audiotests.pyc
10.996 KB
10 Apr 2024 4.58 AM
root / root
0644
audiotests.pyo
10.996 KB
10 Apr 2024 4.58 AM
root / root
0644
autotest.py
0.206 KB
10 Apr 2024 4.58 AM
root / root
0644
autotest.pyc
0.193 KB
10 Apr 2024 4.58 AM
root / root
0644
autotest.pyo
0.193 KB
10 Apr 2024 4.58 AM
root / root
0644
bad_coding.py
0.023 KB
10 Apr 2024 4.58 AM
root / root
0644
bad_coding2.py
0.028 KB
10 Apr 2024 4.58 AM
root / root
0644
bad_coding3.py
0.063 KB
10 Apr 2024 4.58 AM
root / root
0644
badcert.pem
1.883 KB
10 Apr 2024 4.58 AM
root / root
0644
badkey.pem
2.111 KB
10 Apr 2024 4.58 AM
root / root
0644
badsyntax_future3.py
0.168 KB
10 Apr 2024 4.58 AM
root / root
0644
badsyntax_future4.py
0.149 KB
10 Apr 2024 4.58 AM
root / root
0644
badsyntax_future5.py
0.18 KB
10 Apr 2024 4.58 AM
root / root
0644
badsyntax_future6.py
0.157 KB
10 Apr 2024 4.58 AM
root / root
0644
badsyntax_future7.py
0.191 KB
10 Apr 2024 4.58 AM
root / root
0644
badsyntax_future8.py
0.118 KB
10 Apr 2024 4.58 AM
root / root
0644
badsyntax_future9.py
0.138 KB
10 Apr 2024 4.58 AM
root / root
0644
badsyntax_nocaret.py
0.032 KB
10 Apr 2024 4.58 AM
root / root
0644
bisect_cmd.py
5.119 KB
10 Apr 2024 4.58 AM
root / root
0755
bisect_cmd.pyc
5.424 KB
10 Apr 2024 4.58 AM
root / root
0644
bisect_cmd.pyo
5.424 KB
10 Apr 2024 4.58 AM
root / root
0644
cfgparser.1
0.021 KB
10 Apr 2024 4.58 AM
root / root
0644
cmath_testcases.txt
133.635 KB
10 Apr 2024 4.58 AM
root / root
0644
curses_tests.py
1.212 KB
10 Apr 2024 4.58 AM
root / root
0755
curses_tests.pyc
1.445 KB
10 Apr 2024 4.58 AM
root / root
0644
curses_tests.pyo
1.445 KB
10 Apr 2024 4.58 AM
root / root
0644
doctest_aliases.py
0.233 KB
10 Apr 2024 4.58 AM
root / root
0644
doctest_aliases.pyc
0.593 KB
10 Apr 2024 4.58 AM
root / root
0644
doctest_aliases.pyo
0.593 KB
10 Apr 2024 4.58 AM
root / root
0644
double_const.py
1.188 KB
10 Apr 2024 4.58 AM
root / root
0644
double_const.pyc
0.737 KB
10 Apr 2024 4.58 AM
root / root
0644
double_const.pyo
0.671 KB
10 Apr 2024 4.58 AM
root / root
0644
empty.vbs
0.068 KB
10 Apr 2024 4.58 AM
root / root
0644
exception_hierarchy.txt
1.449 KB
10 Apr 2024 4.58 AM
root / root
0644
ffdh3072.pem
2.16 KB
10 Apr 2024 4.58 AM
root / root
0644
floating_points.txt
15.92 KB
10 Apr 2024 4.58 AM
root / root
0644
fork_wait.py
2.508 KB
10 Apr 2024 4.58 AM
root / root
0644
fork_wait.pyc
3.11 KB
10 Apr 2024 4.58 AM
root / root
0644
fork_wait.pyo
3.11 KB
10 Apr 2024 4.58 AM
root / root
0644
formatfloat_testcases.txt
7.832 KB
10 Apr 2024 4.58 AM
root / root
0644
gdb_sample.py
0.152 KB
10 Apr 2024 4.58 AM
root / root
0644
gdb_sample.pyc
0.629 KB
10 Apr 2024 4.58 AM
root / root
0644
gdb_sample.pyo
0.629 KB
10 Apr 2024 4.58 AM
root / root
0644
greyrgb.uue
93.497 KB
10 Apr 2024 4.58 AM
root / root
0644
ieee754.txt
3.206 KB
10 Apr 2024 4.58 AM
root / root
0644
infinite_reload.py
0.316 KB
10 Apr 2024 4.58 AM
root / root
0644
infinite_reload.pyc
0.211 KB
10 Apr 2024 4.58 AM
root / root
0644
infinite_reload.pyo
0.211 KB
10 Apr 2024 4.58 AM
root / root
0644
inspect_fodder.py
0.944 KB
10 Apr 2024 4.58 AM
root / root
0644
inspect_fodder.pyc
2.139 KB
10 Apr 2024 4.58 AM
root / root
0644
inspect_fodder.pyo
2.139 KB
10 Apr 2024 4.58 AM
root / root
0644
inspect_fodder2.py
1.249 KB
10 Apr 2024 4.58 AM
root / root
0644
inspect_fodder2.pyc
4.409 KB
10 Apr 2024 4.58 AM
root / root
0644
inspect_fodder2.pyo
4.409 KB
10 Apr 2024 4.58 AM
root / root
0644
keycert.passwd.pem
4.005 KB
10 Apr 2024 4.58 AM
root / root
0644
keycert.pem
3.963 KB
10 Apr 2024 4.58 AM
root / root
0644
keycert2.pem
3.971 KB
10 Apr 2024 4.58 AM
root / root
0644
keycert3.pem
9.219 KB
10 Apr 2024 4.58 AM
root / root
0644
keycert4.pem
9.232 KB
10 Apr 2024 4.58 AM
root / root
0644
list_tests.py
16.566 KB
10 Apr 2024 4.58 AM
root / root
0644
list_tests.pyc
18.363 KB
10 Apr 2024 4.58 AM
root / root
0644
list_tests.pyo
18.363 KB
10 Apr 2024 4.58 AM
root / root
0644
lock_tests.py
16.427 KB
10 Apr 2024 4.58 AM
root / root
0644
lock_tests.pyc
19.412 KB
10 Apr 2024 4.58 AM
root / root
0644
lock_tests.pyo
19.412 KB
10 Apr 2024 4.58 AM
root / root
0644
mailcap.txt
1.24 KB
10 Apr 2024 4.58 AM
root / root
0644
make_ssl_certs.py
6.693 KB
10 Apr 2024 4.58 AM
root / root
0644
make_ssl_certs.pyc
6.651 KB
10 Apr 2024 4.58 AM
root / root
0644
make_ssl_certs.pyo
6.651 KB
10 Apr 2024 4.58 AM
root / root
0644
mapping_tests.py
22.566 KB
10 Apr 2024 4.58 AM
root / root
0644
mapping_tests.pyc
29.425 KB
10 Apr 2024 4.58 AM
root / root
0644
mapping_tests.pyo
29.425 KB
10 Apr 2024 4.58 AM
root / root
0644
math_testcases.txt
15.52 KB
10 Apr 2024 4.58 AM
root / root
0644
mp_fork_bomb.py
0.378 KB
10 Apr 2024 4.58 AM
root / root
0644
mp_fork_bomb.pyc
0.544 KB
10 Apr 2024 4.58 AM
root / root
0644
mp_fork_bomb.pyo
0.544 KB
10 Apr 2024 4.58 AM
root / root
0644
multibytecodec_support.py
13.81 KB
10 Apr 2024 4.58 AM
root / root
0644
multibytecodec_support.pyc
14.898 KB
10 Apr 2024 4.58 AM
root / root
0644
multibytecodec_support.pyo
14.898 KB
10 Apr 2024 4.58 AM
root / root
0644
nokia.pem
1.878 KB
10 Apr 2024 4.58 AM
root / root
0644
nullbytecert.pem
5.308 KB
10 Apr 2024 4.58 AM
root / root
0644
nullcert.pem
0 KB
10 Apr 2024 4.58 AM
root / root
0644
outstanding_bugs.py
0.421 KB
10 Apr 2024 4.58 AM
root / root
0644
outstanding_bugs.pyc
0.401 KB
10 Apr 2024 4.58 AM
root / root
0644
outstanding_bugs.pyo
0.401 KB
10 Apr 2024 4.58 AM
root / root
0644
pickletester.py
63.149 KB
10 Apr 2024 4.58 AM
root / root
0644
pickletester.pyc
65.946 KB
10 Apr 2024 4.58 AM
root / root
0644
pickletester.pyo
65.798 KB
10 Apr 2024 4.58 AM
root / root
0644
profilee.py
2.97 KB
10 Apr 2024 4.58 AM
root / root
0644
profilee.pyc
2.951 KB
10 Apr 2024 4.58 AM
root / root
0644
profilee.pyo
2.951 KB
10 Apr 2024 4.58 AM
root / root
0644
pycacert.pem
5.523 KB
10 Apr 2024 4.58 AM
root / root
0644
pyclbr_input.py
0.633 KB
10 Apr 2024 4.58 AM
root / root
0644
pyclbr_input.pyc
1.717 KB
10 Apr 2024 4.58 AM
root / root
0644
pyclbr_input.pyo
1.717 KB
10 Apr 2024 4.58 AM
root / root
0644
pydoc_mod.py
0.67 KB
10 Apr 2024 4.58 AM
root / root
0644
pydoc_mod.pyc
1.868 KB
10 Apr 2024 4.58 AM
root / root
0644
pydoc_mod.pyo
1.868 KB
10 Apr 2024 4.58 AM
root / root
0644
pydocfodder.py
6.181 KB
10 Apr 2024 4.58 AM
root / root
0644
pydocfodder.pyc
15.687 KB
10 Apr 2024 4.58 AM
root / root
0644
pydocfodder.pyo
15.687 KB
10 Apr 2024 4.58 AM
root / root
0644
pystone.py
7.193 KB
10 Apr 2024 4.58 AM
root / root
0755
pystone.pyc
7.841 KB
10 Apr 2024 4.58 AM
root / root
0644
pystone.pyo
7.841 KB
10 Apr 2024 4.58 AM
root / root
0644
pythoninfo.py
19.725 KB
10 Apr 2024 4.58 AM
root / root
0644
pythoninfo.pyc
20.934 KB
10 Apr 2024 4.58 AM
root / root
0644
pythoninfo.pyo
20.934 KB
10 Apr 2024 4.58 AM
root / root
0644
randv2_32.pck
7.341 KB
10 Apr 2024 4.58 AM
root / root
0644
randv2_64.pck
7.192 KB
10 Apr 2024 4.58 AM
root / root
0644
randv3.pck
7.816 KB
10 Apr 2024 4.58 AM
root / root
0644
re_tests.py
31.123 KB
10 Apr 2024 4.58 AM
root / root
0755
re_tests.pyc
18.232 KB
10 Apr 2024 4.58 AM
root / root
0644
re_tests.pyo
18.232 KB
10 Apr 2024 4.58 AM
root / root
0644
recursion.tar
0.504 KB
10 Apr 2024 4.58 AM
root / root
0644
regrtest.py
69.906 KB
10 Apr 2024 4.58 AM
root / root
0755
regrtest.pyc
58.123 KB
10 Apr 2024 4.58 AM
root / root
0644
regrtest.pyo
57.999 KB
10 Apr 2024 4.58 AM
root / root
0644
relimport.py
0.026 KB
10 Apr 2024 4.58 AM
root / root
0644
relimport.pyc
0.163 KB
10 Apr 2024 4.58 AM
root / root
0644
relimport.pyo
0.163 KB
10 Apr 2024 4.58 AM
root / root
0644
reperf.py
0.502 KB
10 Apr 2024 4.58 AM
root / root
0644
reperf.pyc
0.901 KB
10 Apr 2024 4.58 AM
root / root
0644
reperf.pyo
0.901 KB
10 Apr 2024 4.58 AM
root / root
0644
revocation.crl
0.781 KB
10 Apr 2024 4.58 AM
root / root
0644
sample_doctest.py
1.013 KB
10 Apr 2024 4.58 AM
root / root
0644
sample_doctest.pyc
1.963 KB
10 Apr 2024 4.58 AM
root / root
0644
sample_doctest.pyo
1.963 KB
10 Apr 2024 4.58 AM
root / root
0644
sample_doctest_no_docstrings.py
0.222 KB
10 Apr 2024 4.58 AM
root / root
0644
sample_doctest_no_docstrings.pyc
0.5 KB
10 Apr 2024 4.58 AM
root / root
0644
sample_doctest_no_docstrings.pyo
0.5 KB
10 Apr 2024 4.58 AM
root / root
0644
sample_doctest_no_doctests.py
0.263 KB
10 Apr 2024 4.58 AM
root / root
0644
sample_doctest_no_doctests.pyc
0.724 KB
10 Apr 2024 4.58 AM
root / root
0644
sample_doctest_no_doctests.pyo
0.724 KB
10 Apr 2024 4.58 AM
root / root
0644
script_helper.py
0.04 KB
10 Apr 2024 4.58 AM
root / root
0644
script_helper.pyc
0.182 KB
10 Apr 2024 4.58 AM
root / root
0644
script_helper.pyo
0.182 KB
10 Apr 2024 4.58 AM
root / root
0644
selfsigned_pythontestdotnet.pem
2.08 KB
10 Apr 2024 4.58 AM
root / root
0644
seq_tests.py
13.865 KB
10 Apr 2024 4.58 AM
root / root
0644
seq_tests.pyc
19.233 KB
10 Apr 2024 4.58 AM
root / root
0644
seq_tests.pyo
19.233 KB
10 Apr 2024 4.58 AM
root / root
0644
sgml_input.html
8.1 KB
10 Apr 2024 4.58 AM
root / root
0644
sortperf.py
4.635 KB
10 Apr 2024 4.58 AM
root / root
0644
sortperf.pyc
4.168 KB
10 Apr 2024 4.58 AM
root / root
0644
sortperf.pyo
4.119 KB
10 Apr 2024 4.58 AM
root / root
0644
ssl_cert.pem
1.533 KB
10 Apr 2024 4.58 AM
root / root
0644
ssl_key.passwd.pem
2.472 KB
10 Apr 2024 4.58 AM
root / root
0644
ssl_key.pem
2.43 KB
10 Apr 2024 4.58 AM
root / root
0644
ssl_servers.py
7.303 KB
10 Apr 2024 4.58 AM
root / root
0644
ssl_servers.pyc
8.359 KB
10 Apr 2024 4.58 AM
root / root
0644
ssl_servers.pyo
8.359 KB
10 Apr 2024 4.58 AM
root / root
0644
ssltests.py
0.965 KB
10 Apr 2024 4.58 AM
root / root
0644
ssltests.pyc
1.04 KB
10 Apr 2024 4.58 AM
root / root
0644
ssltests.pyo
1.04 KB
10 Apr 2024 4.58 AM
root / root
0644
string_tests.py
65.096 KB
10 Apr 2024 4.58 AM
root / root
0644
string_tests.pyc
49.218 KB
10 Apr 2024 4.58 AM
root / root
0644
string_tests.pyo
49.218 KB
10 Apr 2024 4.58 AM
root / root
0644
symlink_support.py
3.182 KB
10 Apr 2024 4.58 AM
root / root
0644
symlink_support.pyc
3.226 KB
10 Apr 2024 4.58 AM
root / root
0644
symlink_support.pyo
3.226 KB
10 Apr 2024 4.58 AM
root / root
0644
talos-2019-0758.pem
1.299 KB
10 Apr 2024 4.58 AM
root / root
0644
test_MimeWriter.py
7.415 KB
10 Apr 2024 4.58 AM
root / root
0644
test_MimeWriter.pyc
7.709 KB
10 Apr 2024 4.58 AM
root / root
0644
test_MimeWriter.pyo
7.709 KB
10 Apr 2024 4.58 AM
root / root
0644
test_SimpleHTTPServer.py
1.313 KB
10 Apr 2024 4.58 AM
root / root
0644
test_SimpleHTTPServer.pyc
2.233 KB
10 Apr 2024 4.58 AM
root / root
0644
test_SimpleHTTPServer.pyo
2.233 KB
10 Apr 2024 4.58 AM
root / root
0644
test_StringIO.py
6.932 KB
10 Apr 2024 4.58 AM
root / root
0644
test_StringIO.pyc
8.325 KB
10 Apr 2024 4.58 AM
root / root
0644
test_StringIO.pyo
8.325 KB
10 Apr 2024 4.58 AM
root / root
0644
test___all__.py
4.076 KB
10 Apr 2024 4.58 AM
root / root
0644
test___all__.pyc
3.801 KB
10 Apr 2024 4.58 AM
root / root
0644
test___all__.pyo
3.801 KB
10 Apr 2024 4.58 AM
root / root
0644
test___future__.py
2.455 KB
10 Apr 2024 4.58 AM
root / root
0644
test___future__.pyc
2.786 KB
10 Apr 2024 4.58 AM
root / root
0644
test___future__.pyo
2.786 KB
10 Apr 2024 4.58 AM
root / root
0644
test__locale.py
6.476 KB
10 Apr 2024 4.58 AM
root / root
0644
test__locale.pyc
6.14 KB
10 Apr 2024 4.58 AM
root / root
0644
test__locale.pyo
6.14 KB
10 Apr 2024 4.58 AM
root / root
0644
test__osx_support.py
11.554 KB
10 Apr 2024 4.58 AM
root / root
0644
test__osx_support.pyc
11.178 KB
10 Apr 2024 4.58 AM
root / root
0644
test__osx_support.pyo
11.178 KB
10 Apr 2024 4.58 AM
root / root
0644
test_abc.py
7.822 KB
10 Apr 2024 4.58 AM
root / root
0644
test_abc.pyc
13.128 KB
10 Apr 2024 4.58 AM
root / root
0644
test_abc.pyo
13.128 KB
10 Apr 2024 4.58 AM
root / root
0644
test_abstract_numbers.py
1.646 KB
10 Apr 2024 4.58 AM
root / root
0644
test_abstract_numbers.pyc
2.515 KB
10 Apr 2024 4.58 AM
root / root
0644
test_abstract_numbers.pyo
2.515 KB
10 Apr 2024 4.58 AM
root / root
0644
test_aepack.py
2.688 KB
10 Apr 2024 4.58 AM
root / root
0644
test_aepack.pyc
3.713 KB
10 Apr 2024 4.58 AM
root / root
0644
test_aepack.pyo
3.713 KB
10 Apr 2024 4.58 AM
root / root
0644
test_aifc.py
14.267 KB
10 Apr 2024 4.58 AM
root / root
0644
test_aifc.pyc
17.436 KB
10 Apr 2024 4.58 AM
root / root
0644
test_aifc.pyo
17.436 KB
10 Apr 2024 4.58 AM
root / root
0644
test_al.py
0.734 KB
10 Apr 2024 4.58 AM
root / root
0644
test_al.pyc
0.853 KB
10 Apr 2024 4.58 AM
root / root
0644
test_al.pyo
0.853 KB
10 Apr 2024 4.58 AM
root / root
0644
test_anydbm.py
2.212 KB
10 Apr 2024 4.58 AM
root / root
0644
test_anydbm.pyc
3.678 KB
10 Apr 2024 4.58 AM
root / root
0644
test_anydbm.pyo
3.678 KB
10 Apr 2024 4.58 AM
root / root
0644
test_applesingle.py
1.768 KB
10 Apr 2024 4.58 AM
root / root
0644
test_applesingle.pyc
2.556 KB
10 Apr 2024 4.58 AM
root / root
0644
test_applesingle.pyo
2.556 KB
10 Apr 2024 4.58 AM
root / root
0644
test_argparse.py
155.472 KB
10 Apr 2024 4.58 AM
root / root
0644
test_argparse.pyc
178.991 KB
10 Apr 2024 4.58 AM
root / root
0644
test_argparse.pyo
178.662 KB
10 Apr 2024 4.58 AM
root / root
0644
test_array.py
37.162 KB
10 Apr 2024 4.58 AM
root / root
0644
test_array.pyc
37.688 KB
10 Apr 2024 4.58 AM
root / root
0644
test_array.pyo
37.688 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ascii_formatd.py
1.874 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ascii_formatd.pyc
2.298 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ascii_formatd.pyo
2.298 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ast.py
25.303 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ast.pyc
23.67 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ast.pyo
23.67 KB
10 Apr 2024 4.58 AM
root / root
0644
test_asynchat.py
9.74 KB
10 Apr 2024 4.58 AM
root / root
0644
test_asynchat.pyc
12.072 KB
10 Apr 2024 4.58 AM
root / root
0644
test_asynchat.pyo
12.072 KB
10 Apr 2024 4.58 AM
root / root
0644
test_asyncore.py
22.946 KB
10 Apr 2024 4.58 AM
root / root
0644
test_asyncore.pyc
29.528 KB
10 Apr 2024 4.58 AM
root / root
0644
test_asyncore.pyo
29.528 KB
10 Apr 2024 4.58 AM
root / root
0644
test_atexit.py
2.388 KB
10 Apr 2024 4.58 AM
root / root
0644
test_atexit.pyc
4.381 KB
10 Apr 2024 4.58 AM
root / root
0644
test_atexit.pyo
4.381 KB
10 Apr 2024 4.58 AM
root / root
0644
test_audioop.py
19.449 KB
10 Apr 2024 4.58 AM
root / root
0644
test_audioop.pyc
19.683 KB
10 Apr 2024 4.58 AM
root / root
0644
test_audioop.pyo
19.683 KB
10 Apr 2024 4.58 AM
root / root
0644
test_augassign.py
7.986 KB
10 Apr 2024 4.58 AM
root / root
0644
test_augassign.pyc
13.419 KB
10 Apr 2024 4.58 AM
root / root
0644
test_augassign.pyo
13.419 KB
10 Apr 2024 4.58 AM
root / root
0644
test_base64.py
10.245 KB
10 Apr 2024 4.58 AM
root / root
0644
test_base64.pyc
9.027 KB
10 Apr 2024 4.58 AM
root / root
0644
test_base64.pyo
9.027 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bastion.py
0.037 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bastion.pyc
0.125 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bastion.pyo
0.125 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bdb.py
36.684 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bdb.pyc
37.602 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bdb.pyo
37.521 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bigaddrspace.py
1.272 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bigaddrspace.pyc
1.532 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bigaddrspace.pyo
1.532 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bigmem.py
37.653 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bigmem.pyc
37.436 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bigmem.pyo
37.436 KB
10 Apr 2024 4.58 AM
root / root
0644
test_binascii.py
12.454 KB
10 Apr 2024 4.58 AM
root / root
0644
test_binascii.pyc
11.015 KB
10 Apr 2024 4.58 AM
root / root
0644
test_binascii.pyo
11.015 KB
10 Apr 2024 4.58 AM
root / root
0644
test_binhex.py
0.98 KB
10 Apr 2024 4.58 AM
root / root
0644
test_binhex.pyc
1.767 KB
10 Apr 2024 4.58 AM
root / root
0644
test_binhex.pyo
1.767 KB
10 Apr 2024 4.58 AM
root / root
0644
test_binop.py
10.489 KB
10 Apr 2024 4.58 AM
root / root
0644
test_binop.pyc
12.925 KB
10 Apr 2024 4.58 AM
root / root
0644
test_binop.pyo
12.925 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bisect.py
14.491 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bisect.pyc
15.51 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bisect.pyo
15.51 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bool.py
13.87 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bool.pyc
14.229 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bool.pyo
14.229 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bsddb.py
11.695 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bsddb.pyc
13.169 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bsddb.pyo
13.169 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bsddb185.py
1.229 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bsddb185.pyc
1.911 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bsddb185.pyo
1.911 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bsddb3.py
2.911 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bsddb3.pyc
2.399 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bsddb3.pyo
2.399 KB
10 Apr 2024 4.58 AM
root / root
0644
test_buffer.py
2.017 KB
10 Apr 2024 4.58 AM
root / root
0644
test_buffer.pyc
3.152 KB
10 Apr 2024 4.58 AM
root / root
0644
test_buffer.pyo
3.152 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bufio.py
2.688 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bufio.pyc
2.701 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bufio.pyo
2.701 KB
10 Apr 2024 4.58 AM
root / root
0644
test_builtin.py
65.276 KB
10 Apr 2024 4.58 AM
root / root
0644
test_builtin.pyc
80.332 KB
10 Apr 2024 4.58 AM
root / root
0644
test_builtin.pyo
80.332 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bytes.py
43.973 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bytes.pyc
50.881 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bytes.pyo
50.881 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bz2.py
19.554 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bz2.pyc
20.021 KB
10 Apr 2024 4.58 AM
root / root
0644
test_bz2.pyo
20.021 KB
10 Apr 2024 4.58 AM
root / root
0644
test_calendar.py
33.919 KB
10 Apr 2024 4.58 AM
root / root
0644
test_calendar.pyc
36.432 KB
10 Apr 2024 4.58 AM
root / root
0644
test_calendar.pyo
36.432 KB
10 Apr 2024 4.58 AM
root / root
0644
test_call.py
3.21 KB
10 Apr 2024 4.58 AM
root / root
0644
test_call.pyc
6.076 KB
10 Apr 2024 4.58 AM
root / root
0644
test_call.pyo
6.076 KB
10 Apr 2024 4.58 AM
root / root
0644
test_capi.py
5.425 KB
10 Apr 2024 4.58 AM
root / root
0644
test_capi.pyc
6.15 KB
10 Apr 2024 4.58 AM
root / root
0644
test_capi.pyo
6.15 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cd.py
0.89 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cd.pyc
0.983 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cd.pyo
0.983 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cfgparser.py
28.106 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cfgparser.pyc
27.804 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cfgparser.pyo
27.804 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cgi.py
19.091 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cgi.pyc
18.294 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cgi.pyo
18.294 KB
10 Apr 2024 4.58 AM
root / root
0644
test_charmapcodec.py
1.8 KB
10 Apr 2024 4.58 AM
root / root
0644
test_charmapcodec.pyc
2.617 KB
10 Apr 2024 4.58 AM
root / root
0644
test_charmapcodec.pyo
2.617 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cl.py
3.887 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cl.pyc
4.892 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cl.pyo
4.892 KB
10 Apr 2024 4.58 AM
root / root
0644
test_class.py
19.178 KB
10 Apr 2024 4.58 AM
root / root
0644
test_class.pyc
20.334 KB
10 Apr 2024 4.58 AM
root / root
0644
test_class.pyo
20.334 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmath.py
19.314 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmath.pyc
19.256 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmath.pyo
19.256 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmd.py
6.151 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmd.pyc
8.187 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmd.pyo
8.187 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmd_line.py
5.147 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmd_line.pyc
5.426 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmd_line.pyo
5.426 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmd_line_script.py
11.585 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmd_line_script.pyc
11.847 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cmd_line_script.pyo
11.847 KB
10 Apr 2024 4.58 AM
root / root
0644
test_code.py
4.503 KB
10 Apr 2024 4.58 AM
root / root
0644
test_code.pyc
6.28 KB
10 Apr 2024 4.58 AM
root / root
0644
test_code.pyo
6.28 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codeccallbacks.py
32.496 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codeccallbacks.pyc
28.07 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codeccallbacks.pyo
28.07 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_cn.py
3.527 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_cn.pyc
3.903 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_cn.pyo
3.903 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_hk.py
0.753 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_hk.pyc
1.126 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_hk.pyo
1.126 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_iso2022.py
1.445 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_iso2022.pyc
2.18 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_iso2022.pyo
2.18 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_jp.py
3.771 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_jp.pyc
4.325 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_jp.pyo
4.325 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_kr.py
2.63 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_kr.pyc
2.843 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_kr.pyo
2.843 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_tw.py
0.733 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_tw.pyc
1.116 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecencodings_tw.pyo
1.116 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_cn.py
0.811 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_cn.pyc
1.361 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_cn.pyo
1.361 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_hk.py
0.459 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_hk.pyc
0.838 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_hk.pyo
0.838 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_jp.py
1.784 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_jp.pyc
2.574 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_jp.pyo
2.574 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_kr.py
1.247 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_kr.pyc
1.543 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_kr.pyo
1.543 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_tw.py
0.702 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_tw.pyc
1.184 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecmaps_tw.pyo
1.184 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecs.py
79.553 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecs.pyc
67.042 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codecs.pyo
67.042 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codeop.py
7.469 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codeop.pyc
7.919 KB
10 Apr 2024 4.58 AM
root / root
0644
test_codeop.pyo
7.919 KB
10 Apr 2024 4.58 AM
root / root
0644
test_coercion.py
11.132 KB
10 Apr 2024 4.58 AM
root / root
0644
test_coercion.pyc
15.632 KB
10 Apr 2024 4.58 AM
root / root
0644
test_coercion.pyo
15.632 KB
10 Apr 2024 4.58 AM
root / root
0644
test_collections.py
39.283 KB
10 Apr 2024 4.58 AM
root / root
0644
test_collections.pyc
43.663 KB
10 Apr 2024 4.58 AM
root / root
0644
test_collections.pyo
43.663 KB
10 Apr 2024 4.58 AM
root / root
0644
test_colorsys.py
2.777 KB
10 Apr 2024 4.58 AM
root / root
0644
test_colorsys.pyc
3.78 KB
10 Apr 2024 4.58 AM
root / root
0644
test_colorsys.pyo
3.78 KB
10 Apr 2024 4.58 AM
root / root
0644
test_commands.py
2.578 KB
10 Apr 2024 4.58 AM
root / root
0644
test_commands.pyc
2.247 KB
10 Apr 2024 4.58 AM
root / root
0644
test_commands.pyo
2.247 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compare.py
1.453 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compare.pyc
3.22 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compare.pyo
3.22 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compile.py
24.223 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compile.pyc
26.349 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compile.pyo
26.349 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compileall.py
2.676 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compileall.pyc
3.616 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compileall.pyo
3.616 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compiler.py
10.958 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compiler.pyc
12.672 KB
10 Apr 2024 4.58 AM
root / root
0644
test_compiler.pyo
12.672 KB
10 Apr 2024 4.58 AM
root / root
0644
test_complex.py
28.359 KB
10 Apr 2024 4.58 AM
root / root
0644
test_complex.pyc
34.68 KB
10 Apr 2024 4.58 AM
root / root
0644
test_complex.pyo
34.68 KB
10 Apr 2024 4.58 AM
root / root
0644
test_complex_args.py
3.425 KB
10 Apr 2024 4.58 AM
root / root
0644
test_complex_args.pyc
4.831 KB
10 Apr 2024 4.58 AM
root / root
0644
test_complex_args.pyo
4.831 KB
10 Apr 2024 4.58 AM
root / root
0644
test_contains.py
3.079 KB
10 Apr 2024 4.58 AM
root / root
0644
test_contains.pyc
4.887 KB
10 Apr 2024 4.58 AM
root / root
0644
test_contains.pyo
4.887 KB
10 Apr 2024 4.58 AM
root / root
0644
test_contextlib.py
9.197 KB
10 Apr 2024 4.58 AM
root / root
0644
test_contextlib.pyc
14.579 KB
10 Apr 2024 4.58 AM
root / root
0644
test_contextlib.pyo
14.579 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cookie.py
6.931 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cookie.pyc
7.292 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cookie.pyo
7.292 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cookielib.py
75.125 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cookielib.pyc
51.704 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cookielib.pyo
51.704 KB
10 Apr 2024 4.58 AM
root / root
0644
test_copy.py
22.475 KB
10 Apr 2024 4.58 AM
root / root
0644
test_copy.pyc
41.204 KB
10 Apr 2024 4.58 AM
root / root
0644
test_copy.pyo
41.204 KB
10 Apr 2024 4.58 AM
root / root
0644
test_copy_reg.py
4.513 KB
10 Apr 2024 4.58 AM
root / root
0644
test_copy_reg.pyc
4.944 KB
10 Apr 2024 4.58 AM
root / root
0644
test_copy_reg.pyo
4.944 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cpickle.py
6.809 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cpickle.pyc
10.62 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cpickle.pyo
10.62 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cprofile.py
7.256 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cprofile.pyc
8.086 KB
10 Apr 2024 4.58 AM
root / root
0644
test_cprofile.pyo
8.086 KB
10 Apr 2024 4.58 AM
root / root
0644
test_crypt.py
1.298 KB
10 Apr 2024 4.58 AM
root / root
0644
test_crypt.pyc
2.06 KB
10 Apr 2024 4.58 AM
root / root
0644
test_crypt.pyo
2.06 KB
10 Apr 2024 4.58 AM
root / root
0644
test_csv.py
44.328 KB
10 Apr 2024 4.58 AM
root / root
0644
test_csv.pyc
46.332 KB
10 Apr 2024 4.58 AM
root / root
0644
test_csv.pyo
46.332 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ctypes.py
0.408 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ctypes.pyc
0.726 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ctypes.pyo
0.726 KB
10 Apr 2024 4.58 AM
root / root
0644
test_curses.py
15.53 KB
10 Apr 2024 4.58 AM
root / root
0644
test_curses.pyc
16.396 KB
10 Apr 2024 4.58 AM
root / root
0644
test_curses.pyo
16.396 KB
10 Apr 2024 4.58 AM
root / root
0644
test_datetime.py
133.725 KB
10 Apr 2024 4.58 AM
root / root
0644
test_datetime.pyc
127.232 KB
10 Apr 2024 4.58 AM
root / root
0644
test_datetime.pyo
126.912 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dbm.py
1.236 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dbm.pyc
2.43 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dbm.pyo
2.43 KB
10 Apr 2024 4.58 AM
root / root
0644
test_decimal.py
83.006 KB
10 Apr 2024 4.58 AM
root / root
0644
test_decimal.pyc
80.032 KB
10 Apr 2024 4.58 AM
root / root
0644
test_decimal.pyo
80.032 KB
10 Apr 2024 4.58 AM
root / root
0644
test_decorators.py
9.618 KB
10 Apr 2024 4.58 AM
root / root
0644
test_decorators.pyc
14.211 KB
10 Apr 2024 4.58 AM
root / root
0644
test_decorators.pyo
14.136 KB
10 Apr 2024 4.58 AM
root / root
0644
test_defaultdict.py
5.69 KB
10 Apr 2024 4.58 AM
root / root
0644
test_defaultdict.pyc
6.487 KB
10 Apr 2024 4.58 AM
root / root
0644
test_defaultdict.pyo
6.487 KB
10 Apr 2024 4.58 AM
root / root
0644
test_deque.py
25.562 KB
10 Apr 2024 4.58 AM
root / root
0644
test_deque.pyc
28.944 KB
10 Apr 2024 4.58 AM
root / root
0644
test_deque.pyo
28.9 KB
10 Apr 2024 4.58 AM
root / root
0644
test_descr.py
164.213 KB
10 Apr 2024 4.58 AM
root / root
0644
test_descr.pyc
209.509 KB
10 Apr 2024 4.58 AM
root / root
0644
test_descr.pyo
209.442 KB
10 Apr 2024 4.58 AM
root / root
0644
test_descrtut.py
11.77 KB
10 Apr 2024 4.58 AM
root / root
0644
test_descrtut.pyc
13.092 KB
10 Apr 2024 4.58 AM
root / root
0644
test_descrtut.pyo
13.092 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dict.py
24.177 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dict.pyc
35.261 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dict.pyo
35.261 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dictcomps.py
3.759 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dictcomps.pyc
5.806 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dictcomps.pyo
5.806 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dictviews.py
9.887 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dictviews.pyc
9.451 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dictviews.pyo
9.451 KB
10 Apr 2024 4.58 AM
root / root
0644
test_difflib.py
11.228 KB
10 Apr 2024 4.58 AM
root / root
0644
test_difflib.pyc
13.041 KB
10 Apr 2024 4.58 AM
root / root
0644
test_difflib.pyo
13.041 KB
10 Apr 2024 4.58 AM
root / root
0644
test_difflib_expect.html
100.862 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dircache.py
2.351 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dircache.pyc
2.94 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dircache.pyo
2.94 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dis.py
4.554 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dis.pyc
5.538 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dis.pyo
5.488 KB
10 Apr 2024 4.58 AM
root / root
0644
test_distutils.py
0.376 KB
10 Apr 2024 4.58 AM
root / root
0644
test_distutils.pyc
0.707 KB
10 Apr 2024 4.58 AM
root / root
0644
test_distutils.pyo
0.707 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dl.py
1.101 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dl.pyc
1.369 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dl.pyo
1.369 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest.py
86.23 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest.pyc
89.622 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest.pyo
89.561 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest.txt
0.289 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest2.py
2.331 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest2.pyc
3.546 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest2.pyo
3.546 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest2.txt
0.383 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest3.txt
0.079 KB
10 Apr 2024 4.58 AM
root / root
0644
test_doctest4.txt
0.307 KB
10 Apr 2024 4.58 AM
root / root
0644
test_docxmlrpc.py
8.302 KB
10 Apr 2024 4.58 AM
root / root
0644
test_docxmlrpc.pyc
9.368 KB
10 Apr 2024 4.58 AM
root / root
0644
test_docxmlrpc.pyo
9.368 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dumbdbm.py
5.801 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dumbdbm.pyc
7.239 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dumbdbm.pyo
7.239 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dummy_thread.py
7.001 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dummy_thread.pyc
7.884 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dummy_thread.pyo
7.884 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dummy_threading.py
1.797 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dummy_threading.pyc
2.261 KB
10 Apr 2024 4.58 AM
root / root
0644
test_dummy_threading.pyo
2.261 KB
10 Apr 2024 4.58 AM
root / root
0644
test_email.py
0.389 KB
10 Apr 2024 4.58 AM
root / root
0644
test_email.pyc
0.552 KB
10 Apr 2024 4.58 AM
root / root
0644
test_email.pyo
0.552 KB
10 Apr 2024 4.58 AM
root / root
0644
test_email_codecs.py
0.451 KB
10 Apr 2024 4.58 AM
root / root
0644
test_email_codecs.pyc
0.602 KB
10 Apr 2024 4.58 AM
root / root
0644
test_email_codecs.pyo
0.602 KB
10 Apr 2024 4.58 AM
root / root
0644
test_email_renamed.py
0.301 KB
10 Apr 2024 4.58 AM
root / root
0644
test_email_renamed.pyc
0.491 KB
10 Apr 2024 4.58 AM
root / root
0644
test_email_renamed.pyo
0.491 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ensurepip.py
9.59 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ensurepip.pyc
11.665 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ensurepip.pyo
11.665 KB
10 Apr 2024 4.58 AM
root / root
0644
test_enumerate.py
7.359 KB
10 Apr 2024 4.58 AM
root / root
0644
test_enumerate.pyc
14.593 KB
10 Apr 2024 4.58 AM
root / root
0644
test_enumerate.pyo
14.593 KB
10 Apr 2024 4.58 AM
root / root
0644
test_eof.py
0.851 KB
10 Apr 2024 4.58 AM
root / root
0644
test_eof.pyc
1.427 KB
10 Apr 2024 4.58 AM
root / root
0644
test_eof.pyo
1.427 KB
10 Apr 2024 4.58 AM
root / root
0644
test_epoll.py
7.216 KB
10 Apr 2024 4.58 AM
root / root
0644
test_epoll.pyc
6.067 KB
10 Apr 2024 4.58 AM
root / root
0644
test_epoll.pyo
6.067 KB
10 Apr 2024 4.58 AM
root / root
0644
test_errno.py
1.134 KB
10 Apr 2024 4.58 AM
root / root
0644
test_errno.pyc
1.881 KB
10 Apr 2024 4.58 AM
root / root
0644
test_errno.pyo
1.881 KB
10 Apr 2024 4.58 AM
root / root
0644
test_exception_variations.py
3.946 KB
10 Apr 2024 4.58 AM
root / root
0644
test_exception_variations.pyc
4.143 KB
10 Apr 2024 4.58 AM
root / root
0644
test_exception_variations.pyo
4.143 KB
10 Apr 2024 4.58 AM
root / root
0644
test_exceptions.py
28.087 KB
10 Apr 2024 4.58 AM
root / root
0644
test_exceptions.pyc
25.48 KB
10 Apr 2024 4.58 AM
root / root
0644
test_exceptions.pyo
25.438 KB
10 Apr 2024 4.58 AM
root / root
0644
test_extcall.py
8.318 KB
10 Apr 2024 4.58 AM
root / root
0644
test_extcall.pyc
8.951 KB
10 Apr 2024 4.58 AM
root / root
0644
test_extcall.pyo
8.951 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fcntl.py
4.344 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fcntl.pyc
5.136 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fcntl.pyo
5.136 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file.py
10.919 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file.pyc
11.062 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file.pyo
10.965 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file2k.py
32.937 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file2k.py.stdin-test
32.855 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file2k.pyc
33.71 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file2k.pyo
33.528 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file_eintr.py
10.234 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file_eintr.pyc
8.59 KB
10 Apr 2024 4.58 AM
root / root
0644
test_file_eintr.pyo
8.496 KB
10 Apr 2024 4.58 AM
root / root
0644
test_filecmp.py
5.27 KB
10 Apr 2024 4.58 AM
root / root
0644
test_filecmp.pyc
5.174 KB
10 Apr 2024 4.58 AM
root / root
0644
test_filecmp.pyo
5.174 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fileinput.py
11.572 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fileinput.pyc
12 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fileinput.pyo
12 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fileio.py
16.708 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fileio.pyc
19.681 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fileio.pyo
19.681 KB
10 Apr 2024 4.58 AM
root / root
0644
test_float.py
62.903 KB
10 Apr 2024 4.58 AM
root / root
0644
test_float.pyc
50.806 KB
10 Apr 2024 4.58 AM
root / root
0644
test_float.pyo
50.806 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fnmatch.py
6.133 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fnmatch.pyc
6.85 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fnmatch.pyo
6.85 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fork1.py
2.156 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fork1.pyc
2.413 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fork1.pyo
2.413 KB
10 Apr 2024 4.58 AM
root / root
0644
test_format.py
15.901 KB
10 Apr 2024 4.58 AM
root / root
0644
test_format.pyc
13.236 KB
10 Apr 2024 4.58 AM
root / root
0644
test_format.pyo
13.236 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fpformat.py
2.643 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fpformat.pyc
3.116 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fpformat.pyo
3.116 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fractions.py
23.941 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fractions.pyc
26.315 KB
10 Apr 2024 4.58 AM
root / root
0644
test_fractions.pyo
26.085 KB
10 Apr 2024 4.58 AM
root / root
0644
test_frozen.py
1.207 KB
10 Apr 2024 4.58 AM
root / root
0644
test_frozen.pyc
1.543 KB
10 Apr 2024 4.58 AM
root / root
0644
test_frozen.pyo
1.543 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ftplib.py
29.891 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ftplib.pyc
37.578 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ftplib.pyo
37.516 KB
10 Apr 2024 4.58 AM
root / root
0644
test_funcattrs.py
12.45 KB
10 Apr 2024 4.58 AM
root / root
0644
test_funcattrs.pyc
14.92 KB
10 Apr 2024 4.58 AM
root / root
0644
test_funcattrs.pyo
14.92 KB
10 Apr 2024 4.58 AM
root / root
0644
test_functools.py
23.466 KB
10 Apr 2024 4.58 AM
root / root
0644
test_functools.pyc
34.05 KB
10 Apr 2024 4.58 AM
root / root
0644
test_functools.pyo
34.05 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future.py
3.769 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future.pyc
5.148 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future.pyo
5.148 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future1.py
0.224 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future1.pyc
0.563 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future1.pyo
0.563 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future2.py
0.147 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future2.pyc
0.577 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future2.pyo
0.577 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future3.py
0.563 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future3.pyc
1.648 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future3.pyo
1.648 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future4.py
1.48 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future4.pyc
1.632 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future4.pyo
1.632 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future5.py
0.53 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future5.pyc
1.251 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future5.pyo
1.251 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future_builtins.py
1.287 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future_builtins.pyc
1.923 KB
10 Apr 2024 4.58 AM
root / root
0644
test_future_builtins.pyo
1.923 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gc.py
23.837 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gc.pyc
22.14 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gc.pyo
22.081 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gdb.py
39.78 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gdb.pyc
32.27 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gdb.pyo
32.27 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gdbm.py
2.772 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gdbm.pyc
3.538 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gdbm.pyo
3.538 KB
10 Apr 2024 4.58 AM
root / root
0644
test_generators.py
49.627 KB
10 Apr 2024 4.58 AM
root / root
0644
test_generators.pyc
45.1 KB
10 Apr 2024 4.58 AM
root / root
0644
test_generators.pyo
44.441 KB
10 Apr 2024 4.58 AM
root / root
0644
test_genericpath.py
10.314 KB
10 Apr 2024 4.58 AM
root / root
0644
test_genericpath.pyc
10.194 KB
10 Apr 2024 4.58 AM
root / root
0644
test_genericpath.pyo
10.194 KB
10 Apr 2024 4.58 AM
root / root
0644
test_genexps.py
7.234 KB
10 Apr 2024 4.58 AM
root / root
0644
test_genexps.pyc
7.472 KB
10 Apr 2024 4.58 AM
root / root
0644
test_genexps.pyo
7.472 KB
10 Apr 2024 4.58 AM
root / root
0644
test_getargs.py
0.916 KB
10 Apr 2024 4.58 AM
root / root
0644
test_getargs.pyc
1.15 KB
10 Apr 2024 4.58 AM
root / root
0644
test_getargs.pyo
1.15 KB
10 Apr 2024 4.58 AM
root / root
0644
test_getargs2.py
39.705 KB
10 Apr 2024 4.58 AM
root / root
0644
test_getargs2.pyc
38.504 KB
10 Apr 2024 4.58 AM
root / root
0644
test_getargs2.pyo
38.504 KB
10 Apr 2024 4.58 AM
root / root
0644
test_getopt.py
6.81 KB
10 Apr 2024 4.58 AM
root / root
0644
test_getopt.pyc
6.78 KB
10 Apr 2024 4.58 AM
root / root
0644
test_getopt.pyo
6.78 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gettext.py
23.016 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gettext.pyc
25 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gettext.pyo
25 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gl.py
6.572 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gl.pyc
8.389 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gl.pyo
8.389 KB
10 Apr 2024 4.58 AM
root / root
0644
test_glob.py
6.781 KB
10 Apr 2024 4.58 AM
root / root
0644
test_glob.pyc
8.299 KB
10 Apr 2024 4.58 AM
root / root
0644
test_glob.pyo
8.299 KB
10 Apr 2024 4.58 AM
root / root
0644
test_global.py
0.979 KB
10 Apr 2024 4.58 AM
root / root
0644
test_global.pyc
1.812 KB
10 Apr 2024 4.58 AM
root / root
0644
test_global.pyo
1.812 KB
10 Apr 2024 4.58 AM
root / root
0644
test_grammar.py
39.1 KB
10 Apr 2024 4.58 AM
root / root
0644
test_grammar.pyc
45.598 KB
10 Apr 2024 4.58 AM
root / root
0644
test_grammar.pyo
45.188 KB
10 Apr 2024 4.58 AM
root / root
0644
test_grp.py
3.214 KB
10 Apr 2024 4.58 AM
root / root
0644
test_grp.pyc
2.984 KB
10 Apr 2024 4.58 AM
root / root
0644
test_grp.pyo
2.984 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gzip.py
13.171 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gzip.pyc
12.894 KB
10 Apr 2024 4.58 AM
root / root
0644
test_gzip.pyo
12.894 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hash.py
7.973 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hash.pyc
12.169 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hash.pyo
12.169 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hashlib.py
20.054 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hashlib.pyc
20.328 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hashlib.pyo
20.143 KB
10 Apr 2024 4.58 AM
root / root
0644
test_heapq.py
15.402 KB
10 Apr 2024 4.58 AM
root / root
0644
test_heapq.pyc
22.76 KB
10 Apr 2024 4.58 AM
root / root
0644
test_heapq.pyo
22.76 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hmac.py
16.975 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hmac.pyc
15.192 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hmac.pyo
15.192 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hotshot.py
5.002 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hotshot.pyc
6.559 KB
10 Apr 2024 4.58 AM
root / root
0644
test_hotshot.pyo
6.559 KB
10 Apr 2024 4.58 AM
root / root
0644
test_htmllib.py
1.932 KB
10 Apr 2024 4.58 AM
root / root
0644
test_htmllib.pyc
3.324 KB
10 Apr 2024 4.58 AM
root / root
0644
test_htmllib.pyo
3.324 KB
10 Apr 2024 4.58 AM
root / root
0644
test_htmlparser.py
24.735 KB
10 Apr 2024 4.58 AM
root / root
0644
test_htmlparser.pyc
27.164 KB
10 Apr 2024 4.58 AM
root / root
0644
test_htmlparser.pyo
27.164 KB
10 Apr 2024 4.58 AM
root / root
0644
test_httplib.py
39.874 KB
10 Apr 2024 4.58 AM
root / root
0644
test_httplib.pyc
40.26 KB
10 Apr 2024 4.58 AM
root / root
0644
test_httplib.pyo
40.26 KB
10 Apr 2024 4.58 AM
root / root
0644
test_httpservers.py
24.559 KB
10 Apr 2024 4.58 AM
root / root
0644
test_httpservers.pyc
29.76 KB
10 Apr 2024 4.58 AM
root / root
0644
test_httpservers.pyo
29.76 KB
10 Apr 2024 4.58 AM
root / root
0644
test_idle.py
0.802 KB
10 Apr 2024 4.58 AM
root / root
0644
test_idle.pyc
0.754 KB
10 Apr 2024 4.58 AM
root / root
0644
test_idle.pyo
0.754 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imageop.py
6.823 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imageop.pyc
5.242 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imageop.pyo
5.242 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imaplib.py
7.551 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imaplib.pyc
9.797 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imaplib.pyo
9.797 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imgfile.py
4.186 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imgfile.pyc
2.401 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imgfile.pyo
2.401 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imghdr.py
3.768 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imghdr.pyc
5.791 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imghdr.pyo
5.791 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imp.py
2.31 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imp.pyc
2.651 KB
10 Apr 2024 4.58 AM
root / root
0644
test_imp.pyo
2.651 KB
10 Apr 2024 4.58 AM
root / root
0644
test_import.py
24.318 KB
10 Apr 2024 4.58 AM
root / root
0644
test_import.pyc
22.346 KB
10 Apr 2024 4.58 AM
root / root
0644
test_import.pyo
22.212 KB
10 Apr 2024 4.58 AM
root / root
0644
test_import_magic.py
2.214 KB
10 Apr 2024 4.58 AM
root / root
0644
test_import_magic.pyc
2.584 KB
10 Apr 2024 4.58 AM
root / root
0644
test_import_magic.pyo
2.584 KB
10 Apr 2024 4.58 AM
root / root
0644
test_importhooks.py
8.165 KB
10 Apr 2024 4.58 AM
root / root
0644
test_importhooks.pyc
9.931 KB
10 Apr 2024 4.58 AM
root / root
0644
test_importhooks.pyo
9.931 KB
10 Apr 2024 4.58 AM
root / root
0644
test_importlib.py
5.631 KB
10 Apr 2024 4.58 AM
root / root
0644
test_importlib.pyc
6.376 KB
10 Apr 2024 4.58 AM
root / root
0644
test_importlib.pyo
6.376 KB
10 Apr 2024 4.58 AM
root / root
0644
test_index.py
9.826 KB
10 Apr 2024 4.58 AM
root / root
0644
test_index.pyc
16.884 KB
10 Apr 2024 4.58 AM
root / root
0644
test_index.pyo
16.884 KB
10 Apr 2024 4.58 AM
root / root
0644
test_inspect.py
35.548 KB
10 Apr 2024 4.58 AM
root / root
0644
test_inspect.pyc
41.727 KB
10 Apr 2024 4.58 AM
root / root
0644
test_inspect.pyo
41.673 KB
10 Apr 2024 4.58 AM
root / root
0644
test_int.py
19.544 KB
10 Apr 2024 4.58 AM
root / root
0644
test_int.pyc
20.121 KB
10 Apr 2024 4.58 AM
root / root
0644
test_int.pyo
20.121 KB
10 Apr 2024 4.58 AM
root / root
0644
test_int_literal.py
8.914 KB
10 Apr 2024 4.58 AM
root / root
0644
test_int_literal.pyc
4.885 KB
10 Apr 2024 4.58 AM
root / root
0644
test_int_literal.pyo
4.885 KB
10 Apr 2024 4.58 AM
root / root
0644
test_io.py
123.404 KB
10 Apr 2024 4.58 AM
root / root
0644
test_io.pyc
130.105 KB
10 Apr 2024 4.58 AM
root / root
0644
test_io.pyo
130.014 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ioctl.py
3.233 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ioctl.pyc
3.499 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ioctl.pyo
3.499 KB
10 Apr 2024 4.58 AM
root / root
0644
test_isinstance.py
9.576 KB
10 Apr 2024 4.58 AM
root / root
0644
test_isinstance.pyc
12.317 KB
10 Apr 2024 4.58 AM
root / root
0644
test_isinstance.pyo
12.317 KB
10 Apr 2024 4.58 AM
root / root
0644
test_iter.py
29.298 KB
10 Apr 2024 4.58 AM
root / root
0644
test_iter.pyc
35.379 KB
10 Apr 2024 4.58 AM
root / root
0644
test_iter.pyo
35.347 KB
10 Apr 2024 4.58 AM
root / root
0644
test_iterlen.py
7.952 KB
10 Apr 2024 4.58 AM
root / root
0644
test_iterlen.pyc
12.321 KB
10 Apr 2024 4.58 AM
root / root
0644
test_iterlen.pyo
12.321 KB
10 Apr 2024 4.58 AM
root / root
0644
test_itertools.py
73.607 KB
10 Apr 2024 4.58 AM
root / root
0644
test_itertools.pyc
87.461 KB
10 Apr 2024 4.58 AM
root / root
0644
test_itertools.pyo
87.461 KB
10 Apr 2024 4.58 AM
root / root
0644
test_json.py
0.319 KB
10 Apr 2024 4.58 AM
root / root
0644
test_json.pyc
0.654 KB
10 Apr 2024 4.58 AM
root / root
0644
test_json.pyo
0.654 KB
10 Apr 2024 4.58 AM
root / root
0644
test_kqueue.py
8.108 KB
10 Apr 2024 4.58 AM
root / root
0644
test_kqueue.pyc
7.158 KB
10 Apr 2024 4.58 AM
root / root
0644
test_kqueue.pyo
7.158 KB
10 Apr 2024 4.58 AM
root / root
0644
test_largefile.py
7.463 KB
10 Apr 2024 4.58 AM
root / root
0644
test_largefile.pyc
6.405 KB
10 Apr 2024 4.58 AM
root / root
0644
test_largefile.pyo
6.405 KB
10 Apr 2024 4.58 AM
root / root
0644
test_lib2to3.py
0.6 KB
10 Apr 2024 4.58 AM
root / root
0644
test_lib2to3.pyc
0.966 KB
10 Apr 2024 4.58 AM
root / root
0644
test_lib2to3.pyo
0.966 KB
10 Apr 2024 4.58 AM
root / root
0644
test_linecache.py
4.555 KB
10 Apr 2024 4.58 AM
root / root
0644
test_linecache.pyc
4.33 KB
10 Apr 2024 4.58 AM
root / root
0644
test_linecache.pyo
4.33 KB
10 Apr 2024 4.58 AM
root / root
0644
test_linuxaudiodev.py
3.104 KB
10 Apr 2024 4.58 AM
root / root
0644
test_linuxaudiodev.pyc
3.71 KB
10 Apr 2024 4.58 AM
root / root
0644
test_linuxaudiodev.pyo
3.71 KB
10 Apr 2024 4.58 AM
root / root
0644
test_list.py
2.581 KB
10 Apr 2024 4.58 AM
root / root
0644
test_list.pyc
3.099 KB
10 Apr 2024 4.58 AM
root / root
0644
test_list.pyo
3.099 KB
10 Apr 2024 4.58 AM
root / root
0644
test_locale.py
19.106 KB
10 Apr 2024 4.58 AM
root / root
0644
test_locale.pyc
22.411 KB
10 Apr 2024 4.58 AM
root / root
0644
test_locale.pyo
22.411 KB
10 Apr 2024 4.58 AM
root / root
0644
test_logging.py
61.139 KB
10 Apr 2024 4.58 AM
root / root
0644
test_logging.pyc
47.46 KB
10 Apr 2024 4.58 AM
root / root
0644
test_logging.pyo
47.46 KB
10 Apr 2024 4.58 AM
root / root
0644
test_long.py
37.451 KB
10 Apr 2024 4.58 AM
root / root
0644
test_long.pyc
45.225 KB
10 Apr 2024 4.58 AM
root / root
0644
test_long.pyo
45.041 KB
10 Apr 2024 4.58 AM
root / root
0644
test_long_future.py
8.814 KB
10 Apr 2024 4.58 AM
root / root
0644
test_long_future.pyc
12.054 KB
10 Apr 2024 4.58 AM
root / root
0644
test_long_future.pyo
12.054 KB
10 Apr 2024 4.58 AM
root / root
0644
test_longexp.py
0.311 KB
10 Apr 2024 4.58 AM
root / root
0644
test_longexp.pyc
0.896 KB
10 Apr 2024 4.58 AM
root / root
0644
test_longexp.pyo
0.896 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macos.py
2.718 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macos.pyc
2.932 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macos.pyo
2.932 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macostools.py
2.924 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macostools.pyc
3.606 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macostools.pyo
3.606 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macpath.py
2.871 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macpath.pyc
3.854 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macpath.pyo
3.854 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macurl2path.py
1.796 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macurl2path.pyc
1.896 KB
10 Apr 2024 4.58 AM
root / root
0644
test_macurl2path.pyo
1.896 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mailbox.py
84.54 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mailbox.pyc
84.453 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mailbox.pyo
84.453 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mailcap.py
10.659 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mailcap.pyc
8.278 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mailcap.pyo
8.278 KB
10 Apr 2024 4.58 AM
root / root
0644
test_marshal.py
15.516 KB
10 Apr 2024 4.58 AM
root / root
0644
test_marshal.pyc
17.293 KB
10 Apr 2024 4.58 AM
root / root
0644
test_marshal.pyo
17.293 KB
10 Apr 2024 4.58 AM
root / root
0644
test_math.py
43.447 KB
10 Apr 2024 4.58 AM
root / root
0644
test_math.pyc
38.922 KB
10 Apr 2024 4.58 AM
root / root
0644
test_math.pyo
38.922 KB
10 Apr 2024 4.58 AM
root / root
0644
test_md5.py
1.748 KB
10 Apr 2024 4.58 AM
root / root
0644
test_md5.pyc
2.74 KB
10 Apr 2024 4.58 AM
root / root
0644
test_md5.pyo
2.74 KB
10 Apr 2024 4.58 AM
root / root
0644
test_memoryio.py
27.79 KB
10 Apr 2024 4.58 AM
root / root
0644
test_memoryio.pyc
28.57 KB
10 Apr 2024 4.58 AM
root / root
0644
test_memoryio.pyo
28.57 KB
10 Apr 2024 4.58 AM
root / root
0644
test_memoryview.py
12.339 KB
10 Apr 2024 4.58 AM
root / root
0644
test_memoryview.pyc
13.958 KB
10 Apr 2024 4.58 AM
root / root
0644
test_memoryview.pyo
13.958 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mhlib.py
10.881 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mhlib.pyc
11.504 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mhlib.pyo
11.504 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mimetools.py
1.736 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mimetools.pyc
2.499 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mimetools.pyo
2.499 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mimetypes.py
6.096 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mimetypes.pyc
8.404 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mimetypes.pyo
8.404 KB
10 Apr 2024 4.58 AM
root / root
0644
test_minidom.py
61.933 KB
10 Apr 2024 4.58 AM
root / root
0644
test_minidom.pyc
52.697 KB
10 Apr 2024 4.58 AM
root / root
0644
test_minidom.pyo
52.697 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mmap.py
25.232 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mmap.pyc
21.504 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mmap.pyo
21.454 KB
10 Apr 2024 4.58 AM
root / root
0644
test_module.py
2.686 KB
10 Apr 2024 4.58 AM
root / root
0644
test_module.pyc
3.309 KB
10 Apr 2024 4.58 AM
root / root
0644
test_module.pyo
3.309 KB
10 Apr 2024 4.58 AM
root / root
0644
test_modulefinder.py
8.175 KB
10 Apr 2024 4.58 AM
root / root
0644
test_modulefinder.pyc
8.196 KB
10 Apr 2024 4.58 AM
root / root
0644
test_modulefinder.pyo
8.196 KB
10 Apr 2024 4.58 AM
root / root
0644
test_msilib.py
3.003 KB
10 Apr 2024 4.58 AM
root / root
0644
test_msilib.pyc
3.642 KB
10 Apr 2024 4.58 AM
root / root
0644
test_msilib.pyo
3.642 KB
10 Apr 2024 4.58 AM
root / root
0644
test_multibytecodec.py
10.816 KB
10 Apr 2024 4.58 AM
root / root
0644
test_multibytecodec.pyc
12.393 KB
10 Apr 2024 4.58 AM
root / root
0644
test_multibytecodec.pyo
12.393 KB
10 Apr 2024 4.58 AM
root / root
0644
test_multifile.py
1.662 KB
10 Apr 2024 4.58 AM
root / root
0644
test_multifile.pyc
2.027 KB
10 Apr 2024 4.58 AM
root / root
0644
test_multifile.pyo
1.962 KB
10 Apr 2024 4.58 AM
root / root
0644
test_multiprocessing.py
85.156 KB
10 Apr 2024 4.58 AM
root / root
0644
test_multiprocessing.pyc
90.999 KB
10 Apr 2024 4.58 AM
root / root
0644
test_multiprocessing.pyo
90.871 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mutants.py
8.302 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mutants.pyc
6.464 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mutants.pyo
6.464 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mutex.py
0.976 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mutex.pyc
1.701 KB
10 Apr 2024 4.58 AM
root / root
0644
test_mutex.pyo
1.701 KB
10 Apr 2024 4.58 AM
root / root
0644
test_netrc.py
4.685 KB
10 Apr 2024 4.58 AM
root / root
0644
test_netrc.pyc
6.568 KB
10 Apr 2024 4.58 AM
root / root
0644
test_netrc.pyo
6.568 KB
10 Apr 2024 4.58 AM
root / root
0644
test_new.py
5.91 KB
10 Apr 2024 4.58 AM
root / root
0644
test_new.pyc
5.622 KB
10 Apr 2024 4.58 AM
root / root
0644
test_new.pyo
5.622 KB
10 Apr 2024 4.58 AM
root / root
0644
test_nis.py
1.147 KB
10 Apr 2024 4.58 AM
root / root
0644
test_nis.pyc
1.313 KB
10 Apr 2024 4.58 AM
root / root
0644
test_nis.pyo
1.313 KB
10 Apr 2024 4.58 AM
root / root
0644
test_nntplib.py
1.613 KB
10 Apr 2024 4.58 AM
root / root
0644
test_nntplib.pyc
2.897 KB
10 Apr 2024 4.58 AM
root / root
0644
test_nntplib.pyo
2.897 KB
10 Apr 2024 4.58 AM
root / root
0644
test_normalization.py
3.058 KB
10 Apr 2024 4.58 AM
root / root
0644
test_normalization.pyc
4.023 KB
10 Apr 2024 4.58 AM
root / root
0644
test_normalization.pyo
4.023 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ntpath.py
14.735 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ntpath.pyc
16.218 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ntpath.pyo
16.218 KB
10 Apr 2024 4.58 AM
root / root
0644
test_old_mailbox.py
4.77 KB
10 Apr 2024 4.58 AM
root / root
0644
test_old_mailbox.pyc
5.879 KB
10 Apr 2024 4.58 AM
root / root
0644
test_old_mailbox.pyo
5.879 KB
10 Apr 2024 4.58 AM
root / root
0644
test_opcodes.py
3.036 KB
10 Apr 2024 4.58 AM
root / root
0644
test_opcodes.pyc
4.071 KB
10 Apr 2024 4.58 AM
root / root
0644
test_opcodes.pyo
4.071 KB
10 Apr 2024 4.58 AM
root / root
0644
test_openpty.py
0.764 KB
10 Apr 2024 4.58 AM
root / root
0644
test_openpty.py.tty-fail
0.665 KB
10 Apr 2024 4.58 AM
root / root
0644
test_openpty.pyc
1.283 KB
10 Apr 2024 4.58 AM
root / root
0644
test_openpty.pyo
1.283 KB
10 Apr 2024 4.58 AM
root / root
0644
test_operator.py
21.377 KB
10 Apr 2024 4.58 AM
root / root
0644
test_operator.pyc
27.404 KB
10 Apr 2024 4.58 AM
root / root
0644
test_operator.pyo
27.404 KB
10 Apr 2024 4.58 AM
root / root
0644
test_optparse.py
61.251 KB
10 Apr 2024 4.58 AM
root / root
0644
test_optparse.pyc
75.765 KB
10 Apr 2024 4.58 AM
root / root
0644
test_optparse.pyo
75.765 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ordered_dict.py
13.114 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ordered_dict.pyc
16.095 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ordered_dict.pyo
16.095 KB
10 Apr 2024 4.58 AM
root / root
0644
test_os.py
39.34 KB
10 Apr 2024 4.58 AM
root / root
0644
test_os.pyc
36.406 KB
10 Apr 2024 4.58 AM
root / root
0644
test_os.pyo
36.406 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ossaudiodev.py
5.951 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ossaudiodev.pyc
5.024 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ossaudiodev.pyo
5.024 KB
10 Apr 2024 4.58 AM
root / root
0644
test_parser.py
24.811 KB
10 Apr 2024 4.58 AM
root / root
0644
test_parser.pyc
25.074 KB
10 Apr 2024 4.58 AM
root / root
0644
test_parser.pyo
25.074 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pdb.py
11.41 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pdb.pyc
12.948 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pdb.pyo
12.948 KB
10 Apr 2024 4.58 AM
root / root
0644
test_peepholer.py
8.645 KB
10 Apr 2024 4.58 AM
root / root
0644
test_peepholer.pyc
9.735 KB
10 Apr 2024 4.58 AM
root / root
0644
test_peepholer.pyo
9.735 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pep247.py
1.988 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pep247.pyc
2.476 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pep247.pyo
2.476 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pep277.py
7.57 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pep277.pyc
7.157 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pep277.pyo
7.157 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pep352.py
8.835 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pep352.pyc
8.769 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pep352.pyo
8.769 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pickle.py
3.314 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pickle.pyc
5.093 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pickle.pyo
5.093 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pickletools.py
0.597 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pickletools.pyc
1.273 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pickletools.pyo
1.273 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pipes.py
6.829 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pipes.pyc
7.208 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pipes.pyo
7.208 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pkg.py
9.252 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pkg.pyc
9.153 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pkg.pyo
9.153 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pkgimport.py
2.813 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pkgimport.pyc
3.406 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pkgimport.pyo
3.406 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pkgutil.py
4.542 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pkgutil.pyc
5.454 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pkgutil.pyo
5.454 KB
10 Apr 2024 4.58 AM
root / root
0644
test_platform.py
11.093 KB
10 Apr 2024 4.58 AM
root / root
0644
test_platform.pyc
12.102 KB
10 Apr 2024 4.58 AM
root / root
0644
test_platform.pyo
12.102 KB
10 Apr 2024 4.58 AM
root / root
0644
test_plistlib.py
7.796 KB
10 Apr 2024 4.58 AM
root / root
0644
test_plistlib.pyc
9.15 KB
10 Apr 2024 4.58 AM
root / root
0644
test_plistlib.pyo
9.15 KB
10 Apr 2024 4.58 AM
root / root
0644
test_poll.py
7.144 KB
10 Apr 2024 4.58 AM
root / root
0644
test_poll.pyc
6.965 KB
10 Apr 2024 4.58 AM
root / root
0644
test_poll.pyo
6.965 KB
10 Apr 2024 4.58 AM
root / root
0644
test_popen.py
1.563 KB
10 Apr 2024 4.58 AM
root / root
0644
test_popen.pyc
1.994 KB
10 Apr 2024 4.58 AM
root / root
0644
test_popen.pyo
1.994 KB
10 Apr 2024 4.58 AM
root / root
0644
test_popen2.py
4.214 KB
10 Apr 2024 4.58 AM
root / root
0644
test_popen2.pyc
4.459 KB
10 Apr 2024 4.58 AM
root / root
0644
test_popen2.pyo
4.459 KB
10 Apr 2024 4.58 AM
root / root
0644
test_poplib.py
10.611 KB
10 Apr 2024 4.58 AM
root / root
0644
test_poplib.pyc
15.72 KB
10 Apr 2024 4.58 AM
root / root
0644
test_poplib.pyo
15.657 KB
10 Apr 2024 4.58 AM
root / root
0644
test_posix.py
26.44 KB
10 Apr 2024 4.58 AM
root / root
0644
test_posix.pyc
24.551 KB
10 Apr 2024 4.58 AM
root / root
0644
test_posix.pyo
24.551 KB
10 Apr 2024 4.58 AM
root / root
0644
test_posixpath.py
21.275 KB
10 Apr 2024 4.58 AM
root / root
0644
test_posixpath.pyc
17.92 KB
10 Apr 2024 4.58 AM
root / root
0644
test_posixpath.pyo
17.92 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pow.py
4.515 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pow.pyc
4.667 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pow.pyo
4.667 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pprint.py
25.651 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pprint.pyc
26.244 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pprint.pyo
26.244 KB
10 Apr 2024 4.58 AM
root / root
0644
test_print.py
4.683 KB
10 Apr 2024 4.58 AM
root / root
0644
test_print.pyc
5.947 KB
10 Apr 2024 4.58 AM
root / root
0644
test_print.pyo
5.947 KB
10 Apr 2024 4.58 AM
root / root
0644
test_profile.py
7.843 KB
10 Apr 2024 4.58 AM
root / root
0644
test_profile.pyc
8.332 KB
10 Apr 2024 4.58 AM
root / root
0644
test_profile.pyo
8.332 KB
10 Apr 2024 4.58 AM
root / root
0644
test_property.py
6.766 KB
10 Apr 2024 4.58 AM
root / root
0644
test_property.pyc
11.664 KB
10 Apr 2024 4.58 AM
root / root
0644
test_property.pyo
11.664 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pstats.py
0.937 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pstats.pyc
1.412 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pstats.pyo
1.412 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pty.py
11.385 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pty.py.tty-fail
11.286 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pty.pyc
8.084 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pty.pyo
8.084 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pwd.py
4.188 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pwd.pyc
3.218 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pwd.pyo
3.218 KB
10 Apr 2024 4.58 AM
root / root
0644
test_py3kwarn.py
18.901 KB
10 Apr 2024 4.58 AM
root / root
0644
test_py3kwarn.pyc
23.021 KB
10 Apr 2024 4.58 AM
root / root
0644
test_py3kwarn.pyo
23.021 KB
10 Apr 2024 4.58 AM
root / root
0644
test_py_compile.py
1.7 KB
10 Apr 2024 4.58 AM
root / root
0644
test_py_compile.pyc
2.418 KB
10 Apr 2024 4.58 AM
root / root
0644
test_py_compile.pyo
2.418 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pyclbr.py
7.731 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pyclbr.pyc
6.818 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pyclbr.pyo
6.818 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pydoc.py
23.875 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pydoc.pyc
26.147 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pydoc.pyo
26.147 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pyexpat.py
25.742 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pyexpat.pyc
29.988 KB
10 Apr 2024 4.58 AM
root / root
0644
test_pyexpat.pyo
29.988 KB
10 Apr 2024 4.58 AM
root / root
0644
test_queue.py
11.694 KB
10 Apr 2024 4.58 AM
root / root
0644
test_queue.pyc
10.011 KB
10 Apr 2024 4.58 AM
root / root
0644
test_queue.pyo
10.011 KB
10 Apr 2024 4.58 AM
root / root
0644
test_quopri.py
7.309 KB
10 Apr 2024 4.58 AM
root / root
0644
test_quopri.pyc
7.962 KB
10 Apr 2024 4.58 AM
root / root
0644
test_quopri.pyo
7.962 KB
10 Apr 2024 4.58 AM
root / root
0644
test_random.py
25.158 KB
10 Apr 2024 4.58 AM
root / root
0644
test_random.pyc
25.536 KB
10 Apr 2024 4.58 AM
root / root
0644
test_random.pyo
25.536 KB
10 Apr 2024 4.58 AM
root / root
0644
test_re.py
59.429 KB
10 Apr 2024 4.58 AM
root / root
0644
test_re.pyc
53.845 KB
10 Apr 2024 4.58 AM
root / root
0644
test_re.pyo
53.59 KB
10 Apr 2024 4.58 AM
root / root
0644
test_readline.py
2.365 KB
10 Apr 2024 4.58 AM
root / root
0644
test_readline.pyc
2.575 KB
10 Apr 2024 4.58 AM
root / root
0644
test_readline.pyo
2.575 KB
10 Apr 2024 4.58 AM
root / root
0644
test_regrtest.py
28.505 KB
10 Apr 2024 4.58 AM
root / root
0644
test_regrtest.pyc
27.907 KB
10 Apr 2024 4.58 AM
root / root
0644
test_regrtest.pyo
27.907 KB
10 Apr 2024 4.58 AM
root / root
0644
test_repr.py
12.475 KB
10 Apr 2024 4.58 AM
root / root
0644
test_repr.pyc
15.309 KB
10 Apr 2024 4.58 AM
root / root
0644
test_repr.pyo
15.309 KB
10 Apr 2024 4.58 AM
root / root
0644
test_resource.py
4.756 KB
10 Apr 2024 4.58 AM
root / root
0644
test_resource.pyc
4.072 KB
10 Apr 2024 4.58 AM
root / root
0644
test_resource.pyo
4.072 KB
10 Apr 2024 4.58 AM
root / root
0644
test_rfc822.py
9.239 KB
10 Apr 2024 4.58 AM
root / root
0644
test_rfc822.pyc
9.688 KB
10 Apr 2024 4.58 AM
root / root
0644
test_rfc822.pyo
9.688 KB
10 Apr 2024 4.58 AM
root / root
0644
test_richcmp.py
11.197 KB
10 Apr 2024 4.58 AM
root / root
0644
test_richcmp.pyc
15.967 KB
10 Apr 2024 4.58 AM
root / root
0644
test_richcmp.pyo
15.967 KB
10 Apr 2024 4.58 AM
root / root
0644
test_rlcompleter.py
4.342 KB
10 Apr 2024 4.58 AM
root / root
0644
test_rlcompleter.pyc
4.932 KB
10 Apr 2024 4.58 AM
root / root
0644
test_rlcompleter.pyo
4.932 KB
10 Apr 2024 4.58 AM
root / root
0644
test_robotparser.py
6.908 KB
10 Apr 2024 4.58 AM
root / root
0644
test_robotparser.pyc
9.812 KB
10 Apr 2024 4.58 AM
root / root
0644
test_robotparser.pyo
9.812 KB
10 Apr 2024 4.58 AM
root / root
0644
test_runpy.py
17.043 KB
10 Apr 2024 4.58 AM
root / root
0644
test_runpy.pyc
16.007 KB
10 Apr 2024 4.58 AM
root / root
0644
test_runpy.pyo
16.007 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sax.py
37.773 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sax.pyc
38.055 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sax.pyo
38.055 KB
10 Apr 2024 4.58 AM
root / root
0644
test_scope.py
15.172 KB
10 Apr 2024 4.58 AM
root / root
0644
test_scope.pyc
24.835 KB
10 Apr 2024 4.58 AM
root / root
0644
test_scope.pyo
24.835 KB
10 Apr 2024 4.58 AM
root / root
0644
test_scriptpackages.py
1.364 KB
10 Apr 2024 4.58 AM
root / root
0644
test_scriptpackages.pyc
2.532 KB
10 Apr 2024 4.58 AM
root / root
0644
test_scriptpackages.pyo
2.532 KB
10 Apr 2024 4.58 AM
root / root
0644
test_select.py
2.112 KB
10 Apr 2024 4.58 AM
root / root
0644
test_select.pyc
3.399 KB
10 Apr 2024 4.58 AM
root / root
0644
test_select.pyo
3.399 KB
10 Apr 2024 4.58 AM
root / root
0644
test_set.py
61.322 KB
10 Apr 2024 4.58 AM
root / root
0644
test_set.pyc
84.45 KB
10 Apr 2024 4.58 AM
root / root
0644
test_set.pyo
84.45 KB
10 Apr 2024 4.58 AM
root / root
0644
test_setcomps.py
3.757 KB
10 Apr 2024 4.58 AM
root / root
0644
test_setcomps.pyc
3.993 KB
10 Apr 2024 4.58 AM
root / root
0644
test_setcomps.pyo
3.993 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sets.py
27.254 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sets.pyc
41.098 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sets.pyo
41.098 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sgmllib.py
15.359 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sgmllib.pyc
18.058 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sgmllib.pyo
18.058 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sha.py
1.663 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sha.pyc
2.141 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sha.pyo
2.141 KB
10 Apr 2024 4.58 AM
root / root
0644
test_shelve.py
4.488 KB
10 Apr 2024 4.58 AM
root / root
0644
test_shelve.pyc
6.869 KB
10 Apr 2024 4.58 AM
root / root
0644
test_shelve.pyo
6.869 KB
10 Apr 2024 4.58 AM
root / root
0644
test_shlex.py
5.57 KB
10 Apr 2024 4.58 AM
root / root
0644
test_shlex.pyc
6.286 KB
10 Apr 2024 4.58 AM
root / root
0644
test_shlex.pyo
6.286 KB
10 Apr 2024 4.58 AM
root / root
0644
test_shutil.py
34.104 KB
10 Apr 2024 4.58 AM
root / root
0644
test_shutil.pyc
31.378 KB
10 Apr 2024 4.58 AM
root / root
0644
test_shutil.pyo
31.278 KB
10 Apr 2024 4.58 AM
root / root
0644
test_signal.py
19.146 KB
10 Apr 2024 4.58 AM
root / root
0644
test_signal.pyc
17.229 KB
10 Apr 2024 4.58 AM
root / root
0644
test_signal.pyo
17.229 KB
10 Apr 2024 4.58 AM
root / root
0644
test_site.py
16.934 KB
10 Apr 2024 4.58 AM
root / root
0644
test_site.py.lib64
16.759 KB
10 Apr 2024 4.58 AM
root / root
0644
test_site.pyc
15.986 KB
10 Apr 2024 4.58 AM
root / root
0644
test_site.pyo
15.986 KB
10 Apr 2024 4.58 AM
root / root
0644
test_slice.py
4.546 KB
10 Apr 2024 4.58 AM
root / root
0644
test_slice.pyc
6.361 KB
10 Apr 2024 4.58 AM
root / root
0644
test_slice.pyo
6.361 KB
10 Apr 2024 4.58 AM
root / root
0644
test_smtplib.py
19.549 KB
10 Apr 2024 4.58 AM
root / root
0644
test_smtplib.pyc
20.938 KB
10 Apr 2024 4.58 AM
root / root
0644
test_smtplib.pyo
20.938 KB
10 Apr 2024 4.58 AM
root / root
0644
test_smtpnet.py
0.799 KB
10 Apr 2024 4.58 AM
root / root
0644
test_smtpnet.pyc
1.391 KB
10 Apr 2024 4.58 AM
root / root
0644
test_smtpnet.pyo
1.391 KB
10 Apr 2024 4.58 AM
root / root
0644
test_socket.py
63.06 KB
10 Apr 2024 4.58 AM
root / root
0644
test_socket.pyc
73.318 KB
10 Apr 2024 4.58 AM
root / root
0644
test_socket.pyo
73.318 KB
10 Apr 2024 4.58 AM
root / root
0644
test_socketserver.py
12.51 KB
10 Apr 2024 4.58 AM
root / root
0644
test_socketserver.pyc
14.116 KB
10 Apr 2024 4.58 AM
root / root
0644
test_socketserver.pyo
14.116 KB
10 Apr 2024 4.58 AM
root / root
0644
test_softspace.py
0.625 KB
10 Apr 2024 4.58 AM
root / root
0644
test_softspace.pyc
1.324 KB
10 Apr 2024 4.58 AM
root / root
0644
test_softspace.pyo
1.324 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sort.py
9.241 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sort.pyc
12.425 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sort.pyo
12.425 KB
10 Apr 2024 4.58 AM
root / root
0644
test_source_encoding.py
5.915 KB
10 Apr 2024 4.58 AM
root / root
0644
test_source_encoding.pyc
7.687 KB
10 Apr 2024 4.58 AM
root / root
0644
test_source_encoding.pyo
7.687 KB
10 Apr 2024 4.58 AM
root / root
0644
test_spwd.py
2.297 KB
10 Apr 2024 4.58 AM
root / root
0644
test_spwd.pyc
2.437 KB
10 Apr 2024 4.58 AM
root / root
0644
test_spwd.pyo
2.437 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sqlite.py
0.569 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sqlite.pyc
0.821 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sqlite.pyo
0.821 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ssl.py
154.992 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ssl.pyc
114.979 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ssl.pyo
114.979 KB
10 Apr 2024 4.58 AM
root / root
0644
test_startfile.py
1.556 KB
10 Apr 2024 4.58 AM
root / root
0644
test_startfile.pyc
1.972 KB
10 Apr 2024 4.58 AM
root / root
0644
test_startfile.pyo
1.972 KB
10 Apr 2024 4.58 AM
root / root
0644
test_stat.py
5.563 KB
10 Apr 2024 4.58 AM
root / root
0644
test_stat.pyc
5.841 KB
10 Apr 2024 4.58 AM
root / root
0644
test_stat.pyo
5.841 KB
10 Apr 2024 4.58 AM
root / root
0644
test_str.py
23.433 KB
10 Apr 2024 4.58 AM
root / root
0644
test_str.pyc
24.741 KB
10 Apr 2024 4.58 AM
root / root
0644
test_str.pyo
24.741 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strftime.py
6.908 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strftime.pyc
7.244 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strftime.pyo
7.244 KB
10 Apr 2024 4.58 AM
root / root
0644
test_string.py
18.2 KB
10 Apr 2024 4.58 AM
root / root
0644
test_string.pyc
21.075 KB
10 Apr 2024 4.58 AM
root / root
0644
test_string.pyo
21.075 KB
10 Apr 2024 4.58 AM
root / root
0644
test_stringprep.py
3.17 KB
10 Apr 2024 4.58 AM
root / root
0644
test_stringprep.pyc
2.115 KB
10 Apr 2024 4.58 AM
root / root
0644
test_stringprep.pyo
2.115 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strop.py
6.691 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strop.pyc
8.61 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strop.pyo
8.61 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strptime.py
28.596 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strptime.pyc
26.495 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strptime.pyo
26.495 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strtod.py
19.742 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strtod.pyc
15.32 KB
10 Apr 2024 4.58 AM
root / root
0644
test_strtod.pyo
15.106 KB
10 Apr 2024 4.58 AM
root / root
0644
test_struct.py
24.272 KB
10 Apr 2024 4.58 AM
root / root
0644
test_struct.pyc
21.873 KB
10 Apr 2024 4.58 AM
root / root
0644
test_struct.pyo
21.873 KB
10 Apr 2024 4.58 AM
root / root
0644
test_structmembers.py
3.453 KB
10 Apr 2024 4.58 AM
root / root
0644
test_structmembers.pyc
5.104 KB
10 Apr 2024 4.58 AM
root / root
0644
test_structmembers.pyo
5.104 KB
10 Apr 2024 4.58 AM
root / root
0644
test_structseq.py
3.599 KB
10 Apr 2024 4.58 AM
root / root
0644
test_structseq.pyc
5.385 KB
10 Apr 2024 4.58 AM
root / root
0644
test_structseq.pyo
5.385 KB
10 Apr 2024 4.58 AM
root / root
0644
test_subprocess.py
60.93 KB
10 Apr 2024 4.58 AM
root / root
0644
test_subprocess.pyc
54.378 KB
10 Apr 2024 4.58 AM
root / root
0644
test_subprocess.pyo
54.378 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sunau.py
3.712 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sunau.pyc
4.571 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sunau.pyo
4.571 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sunaudiodev.py
0.671 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sunaudiodev.pyc
1.176 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sunaudiodev.pyo
1.176 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sundry.py
2.917 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sundry.pyc
3.38 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sundry.pyo
3.38 KB
10 Apr 2024 4.58 AM
root / root
0644
test_support.py
0.077 KB
10 Apr 2024 4.58 AM
root / root
0644
test_support.pyc
0.251 KB
10 Apr 2024 4.58 AM
root / root
0644
test_support.pyo
0.251 KB
10 Apr 2024 4.58 AM
root / root
0644
test_symtable.py
6.163 KB
10 Apr 2024 4.58 AM
root / root
0644
test_symtable.pyc
8.16 KB
10 Apr 2024 4.58 AM
root / root
0644
test_symtable.pyo
8.16 KB
10 Apr 2024 4.58 AM
root / root
0644
test_syntax.py
27.48 KB
10 Apr 2024 4.58 AM
root / root
0644
test_syntax.pyc
28.911 KB
10 Apr 2024 4.58 AM
root / root
0644
test_syntax.pyo
28.911 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sys.py
31.322 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sys.pyc
28.441 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sys.pyo
28.441 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sys_setprofile.py
11.111 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sys_setprofile.pyc
16.55 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sys_setprofile.pyo
16.55 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sys_settrace.py
31.606 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sys_settrace.pyc
38.489 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sys_settrace.pyo
38.423 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sysconfig.py
12.689 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sysconfig.pyc
10.939 KB
10 Apr 2024 4.58 AM
root / root
0644
test_sysconfig.pyo
10.939 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tarfile.py
66.433 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tarfile.pyc
69.25 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tarfile.pyo
69.25 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tcl.py
29.777 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tcl.pyc
31.814 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tcl.pyo
31.814 KB
10 Apr 2024 4.58 AM
root / root
0644
test_telnetlib.py
15.688 KB
10 Apr 2024 4.58 AM
root / root
0644
test_telnetlib.pyc
18.715 KB
10 Apr 2024 4.58 AM
root / root
0644
test_telnetlib.pyo
18.715 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tempfile.py
34.967 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tempfile.pyc
35.879 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tempfile.pyo
35.879 KB
10 Apr 2024 4.58 AM
root / root
0644
test_test_support.py
16.046 KB
10 Apr 2024 4.58 AM
root / root
0644
test_test_support.pyc
17.676 KB
10 Apr 2024 4.58 AM
root / root
0644
test_test_support.pyo
17.676 KB
10 Apr 2024 4.58 AM
root / root
0644
test_textwrap.py
25.196 KB
10 Apr 2024 4.58 AM
root / root
0644
test_textwrap.pyc
21.487 KB
10 Apr 2024 4.58 AM
root / root
0644
test_textwrap.pyo
21.487 KB
10 Apr 2024 4.58 AM
root / root
0644
test_thread.py
8.977 KB
10 Apr 2024 4.58 AM
root / root
0644
test_thread.pyc
9.934 KB
10 Apr 2024 4.58 AM
root / root
0644
test_thread.pyo
9.934 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threaded_import.py
2.518 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threaded_import.pyc
1.837 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threaded_import.pyo
1.837 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threadedtempfile.py
1.974 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threadedtempfile.pyc
2.974 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threadedtempfile.pyo
2.974 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threading.py
33.876 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threading.pyc
32.239 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threading.pyo
32.239 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threading_local.py
6.454 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threading_local.pyc
9.377 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threading_local.pyo
9.377 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threadsignals.py
2.971 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threadsignals.pyc
3.139 KB
10 Apr 2024 4.58 AM
root / root
0644
test_threadsignals.pyo
3.139 KB
10 Apr 2024 4.58 AM
root / root
0644
test_time.py
13.212 KB
10 Apr 2024 4.58 AM
root / root
0644
test_time.pyc
10.905 KB
10 Apr 2024 4.58 AM
root / root
0644
test_time.pyo
10.905 KB
10 Apr 2024 4.58 AM
root / root
0644
test_timeit.py
11.511 KB
10 Apr 2024 4.58 AM
root / root
0644
test_timeit.pyc
14.627 KB
10 Apr 2024 4.58 AM
root / root
0644
test_timeit.pyo
14.627 KB
10 Apr 2024 4.58 AM
root / root
0644
test_timeout.py
6.997 KB
10 Apr 2024 4.58 AM
root / root
0644
test_timeout.pyc
7.064 KB
10 Apr 2024 4.58 AM
root / root
0644
test_timeout.pyo
7.064 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tk.py
0.603 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tk.pyc
0.871 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tk.pyo
0.871 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tokenize.py
27.534 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tokenize.pyc
27.466 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tokenize.pyo
27.466 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tools.py
13.08 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tools.pyc
14.198 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tools.pyo
14.198 KB
10 Apr 2024 4.58 AM
root / root
0644
test_trace.py
11.539 KB
10 Apr 2024 4.58 AM
root / root
0644
test_trace.pyc
13.668 KB
10 Apr 2024 4.58 AM
root / root
0644
test_trace.pyo
13.668 KB
10 Apr 2024 4.58 AM
root / root
0644
test_traceback.py
9.431 KB
10 Apr 2024 4.58 AM
root / root
0644
test_traceback.pyc
10.174 KB
10 Apr 2024 4.58 AM
root / root
0644
test_traceback.pyo
10.174 KB
10 Apr 2024 4.58 AM
root / root
0644
test_transformer.py
1.094 KB
10 Apr 2024 4.58 AM
root / root
0644
test_transformer.pyc
1.529 KB
10 Apr 2024 4.58 AM
root / root
0644
test_transformer.pyo
1.445 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ttk_guionly.py
0.976 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ttk_guionly.pyc
1.266 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ttk_guionly.pyo
1.266 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ttk_textonly.py
0.53 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ttk_textonly.pyc
0.839 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ttk_textonly.pyo
0.839 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tuple.py
5.281 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tuple.pyc
7.225 KB
10 Apr 2024 4.58 AM
root / root
0644
test_tuple.pyo
7.225 KB
10 Apr 2024 4.58 AM
root / root
0644
test_turtle.py
12.282 KB
10 Apr 2024 4.58 AM
root / root
0644
test_turtle.pyc
16.075 KB
10 Apr 2024 4.58 AM
root / root
0644
test_turtle.pyo
16.075 KB
10 Apr 2024 4.58 AM
root / root
0644
test_typechecks.py
3.092 KB
10 Apr 2024 4.58 AM
root / root
0644
test_typechecks.pyc
5.115 KB
10 Apr 2024 4.58 AM
root / root
0644
test_typechecks.pyo
5.115 KB
10 Apr 2024 4.58 AM
root / root
0644
test_types.py
29.026 KB
10 Apr 2024 4.58 AM
root / root
0644
test_types.pyc
25.297 KB
10 Apr 2024 4.58 AM
root / root
0644
test_types.pyo
25.072 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ucn.py
5.981 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ucn.pyc
6.289 KB
10 Apr 2024 4.58 AM
root / root
0644
test_ucn.pyo
6.289 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unary.py
1.815 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unary.pyc
2.754 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unary.pyo
2.754 KB
10 Apr 2024 4.58 AM
root / root
0644
test_undocumented_details.py
1.142 KB
10 Apr 2024 4.58 AM
root / root
0644
test_undocumented_details.pyc
2.026 KB
10 Apr 2024 4.58 AM
root / root
0644
test_undocumented_details.pyo
2.026 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unicode.py
82.079 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unicode.pyc
67.562 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unicode.pyo
67.562 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unicode_file.py
8.22 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unicode_file.pyc
5.74 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unicode_file.pyo
5.74 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unicodedata.py
12.324 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unicodedata.pyc
12.23 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unicodedata.pyo
12.23 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unittest.py
0.197 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unittest.pyc
0.505 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unittest.pyo
0.505 KB
10 Apr 2024 4.58 AM
root / root
0644
test_univnewlines.py
3.983 KB
10 Apr 2024 4.58 AM
root / root
0644
test_univnewlines.pyc
5.333 KB
10 Apr 2024 4.58 AM
root / root
0644
test_univnewlines.pyo
5.333 KB
10 Apr 2024 4.58 AM
root / root
0644
test_univnewlines2k.py
3.758 KB
10 Apr 2024 4.58 AM
root / root
0644
test_univnewlines2k.pyc
5.24 KB
10 Apr 2024 4.58 AM
root / root
0644
test_univnewlines2k.pyo
5.24 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unpack.py
2.496 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unpack.pyc
2.794 KB
10 Apr 2024 4.58 AM
root / root
0644
test_unpack.pyo
2.794 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib.py
46.788 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib.pyc
43.856 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib.pyo
43.805 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib2.py
58.219 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib2.pyc
56.535 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib2.pyo
56.372 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib2_localnet.py
24.878 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib2_localnet.pyc
25.918 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib2_localnet.pyo
25.854 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib2net.py
12.22 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib2net.pyc
9.992 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllib2net.pyo
9.992 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllibnet.py
9.745 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllibnet.pyc
10.234 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urllibnet.pyo
10.234 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urlparse.py
45.831 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urlparse.pyc
37.813 KB
10 Apr 2024 4.58 AM
root / root
0644
test_urlparse.pyo
37.813 KB
10 Apr 2024 4.58 AM
root / root
0644
test_userdict.py
12.003 KB
10 Apr 2024 4.58 AM
root / root
0644
test_userdict.pyc
11.586 KB
10 Apr 2024 4.58 AM
root / root
0644
test_userdict.pyo
11.586 KB
10 Apr 2024 4.58 AM
root / root
0644
test_userlist.py
1.85 KB
10 Apr 2024 4.58 AM
root / root
0644
test_userlist.pyc
3.216 KB
10 Apr 2024 4.58 AM
root / root
0644
test_userlist.pyo
3.216 KB
10 Apr 2024 4.58 AM
root / root
0644
test_userstring.py
4.733 KB
10 Apr 2024 4.58 AM
root / root
0644
test_userstring.pyc
5.331 KB
10 Apr 2024 4.58 AM
root / root
0644
test_userstring.pyo
5.331 KB
10 Apr 2024 4.58 AM
root / root
0644
test_uu.py
5.569 KB
10 Apr 2024 4.58 AM
root / root
0644
test_uu.pyc
6.771 KB
10 Apr 2024 4.58 AM
root / root
0644
test_uu.pyo
6.771 KB
10 Apr 2024 4.58 AM
root / root
0644
test_uuid.py
22.952 KB
10 Apr 2024 4.58 AM
root / root
0644
test_uuid.pyc
26.169 KB
10 Apr 2024 4.58 AM
root / root
0644
test_uuid.pyo
26.169 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wait3.py
1.037 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wait3.pyc
1.522 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wait3.pyo
1.522 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wait4.py
1.118 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wait4.pyc
1.443 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wait4.pyo
1.443 KB
10 Apr 2024 4.58 AM
root / root
0644
test_warnings.py
37.531 KB
10 Apr 2024 4.58 AM
root / root
0644
test_warnings.pyc
32.756 KB
10 Apr 2024 4.58 AM
root / root
0644
test_warnings.pyo
32.737 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wave.py
4.515 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wave.pyc
5.443 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wave.pyo
5.443 KB
10 Apr 2024 4.58 AM
root / root
0644
test_weakref.py
52.487 KB
10 Apr 2024 4.58 AM
root / root
0644
test_weakref.pyc
53.01 KB
10 Apr 2024 4.58 AM
root / root
0644
test_weakref.pyo
53.01 KB
10 Apr 2024 4.58 AM
root / root
0644
test_weakset.py
15.289 KB
10 Apr 2024 4.58 AM
root / root
0644
test_weakset.pyc
19.079 KB
10 Apr 2024 4.58 AM
root / root
0644
test_weakset.pyo
19.079 KB
10 Apr 2024 4.58 AM
root / root
0644
test_whichdb.py
1.734 KB
10 Apr 2024 4.58 AM
root / root
0644
test_whichdb.pyc
2.215 KB
10 Apr 2024 4.58 AM
root / root
0644
test_whichdb.pyo
2.215 KB
10 Apr 2024 4.58 AM
root / root
0644
test_winreg.py
20.344 KB
10 Apr 2024 4.58 AM
root / root
0644
test_winreg.pyc
15.319 KB
10 Apr 2024 4.58 AM
root / root
0644
test_winreg.pyo
15.319 KB
10 Apr 2024 4.58 AM
root / root
0644
test_winsound.py
3.575 KB
10 Apr 2024 4.58 AM
root / root
0644
test_winsound.pyc
5.367 KB
10 Apr 2024 4.58 AM
root / root
0644
test_winsound.pyo
5.367 KB
10 Apr 2024 4.58 AM
root / root
0644
test_with.py
25.798 KB
10 Apr 2024 4.58 AM
root / root
0644
test_with.pyc
34.272 KB
10 Apr 2024 4.58 AM
root / root
0644
test_with.pyo
34.272 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wsgiref.py
20.37 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wsgiref.pyc
23.461 KB
10 Apr 2024 4.58 AM
root / root
0644
test_wsgiref.pyo
23.461 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xdrlib.py
2.296 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xdrlib.pyc
3.527 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xdrlib.pyo
3.527 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xml_etree.py
97.721 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xml_etree.pyc
99.258 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xml_etree.pyo
99.258 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xml_etree_c.py
2.685 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xml_etree_c.pyc
2.951 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xml_etree_c.pyo
2.951 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xmllib.py
1.267 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xmllib.pyc
2.112 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xmllib.pyo
2.112 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xmlrpc.py
42.808 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xmlrpc.pyc
44.932 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xmlrpc.pyo
44.932 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xpickle.py
8.083 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xpickle.pyc
8.474 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xpickle.pyo
8.474 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xrange.py
7.642 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xrange.pyc
7 KB
10 Apr 2024 4.58 AM
root / root
0644
test_xrange.pyo
7 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipfile.py
73.162 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipfile.pyc
69.847 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipfile.pyo
69.847 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipfile64.py
5.93 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipfile64.pyc
5.465 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipfile64.pyo
5.465 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipimport.py
16.423 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipimport.pyc
16.609 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipimport.pyo
16.609 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipimport_support.py
10.596 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipimport_support.pyc
7.127 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zipimport_support.pyo
7.065 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zlib.py
28.84 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zlib.pyc
27.87 KB
10 Apr 2024 4.58 AM
root / root
0644
test_zlib.pyo
27.87 KB
10 Apr 2024 4.58 AM
root / root
0644
testall.py
0.268 KB
10 Apr 2024 4.58 AM
root / root
0644
testall.pyc
0.383 KB
10 Apr 2024 4.58 AM
root / root
0644
testall.pyo
0.383 KB
10 Apr 2024 4.58 AM
root / root
0644
testcodec.py
1.022 KB
10 Apr 2024 4.58 AM
root / root
0644
testcodec.pyc
1.68 KB
10 Apr 2024 4.58 AM
root / root
0644
testcodec.pyo
1.68 KB
10 Apr 2024 4.58 AM
root / root
0644
testimg.uue
70.666 KB
10 Apr 2024 4.58 AM
root / root
0644
testimgr.uue
70.67 KB
10 Apr 2024 4.58 AM
root / root
0644
testrgb.uue
58.63 KB
10 Apr 2024 4.58 AM
root / root
0644
testtar.tar
275 KB
10 Apr 2024 4.58 AM
root / root
0644
tf_inherit_check.py
0.567 KB
10 Apr 2024 4.58 AM
root / root
0644
tf_inherit_check.pyc
0.529 KB
10 Apr 2024 4.58 AM
root / root
0644
tf_inherit_check.pyo
0.529 KB
10 Apr 2024 4.58 AM
root / root
0644
threaded_import_hangers.py
1.377 KB
10 Apr 2024 4.58 AM
root / root
0644
threaded_import_hangers.pyc
1.219 KB
10 Apr 2024 4.58 AM
root / root
0644
threaded_import_hangers.pyo
1.219 KB
10 Apr 2024 4.58 AM
root / root
0644
time_hashlib.py
2.789 KB
10 Apr 2024 4.58 AM
root / root
0644
time_hashlib.pyc
3.188 KB
10 Apr 2024 4.58 AM
root / root
0644
time_hashlib.pyo
3.188 KB
10 Apr 2024 4.58 AM
root / root
0644
tokenize_tests.txt
2.387 KB
10 Apr 2024 4.58 AM
root / root
0644
warning_tests.py
0.234 KB
10 Apr 2024 4.58 AM
root / root
0644
warning_tests.pyc
0.522 KB
10 Apr 2024 4.58 AM
root / root
0644
warning_tests.pyo
0.522 KB
10 Apr 2024 4.58 AM
root / root
0644
win_console_handler.py
1.386 KB
10 Apr 2024 4.58 AM
root / root
0644
win_console_handler.pyc
1.42 KB
10 Apr 2024 4.58 AM
root / root
0644
win_console_handler.pyo
1.42 KB
10 Apr 2024 4.58 AM
root / root
0644
xmltests.py
0.485 KB
10 Apr 2024 4.58 AM
root / root
0644
xmltests.pyc
0.735 KB
10 Apr 2024 4.58 AM
root / root
0644
xmltests.pyo
0.735 KB
10 Apr 2024 4.58 AM
root / root
0644
zipdir.zip
0.365 KB
10 Apr 2024 4.58 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF