Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_ssl fails on Fedora 29: test_min_max_version() #79890

Closed
vstinner opened this issue Jan 10, 2019 · 3 comments
Closed

test_ssl fails on Fedora 29: test_min_max_version() #79890

vstinner opened this issue Jan 10, 2019 · 3 comments
Labels
3.8 only security fixes tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

BPO 35709
Nosy @vstinner, @tirkarthi
Superseder
  • bpo-35045: test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-01-10.16:59:42.111>
    created_at = <Date 2019-01-10.16:47:37.387>
    labels = ['3.8', 'tests']
    title = 'test_ssl fails on Fedora 29: test_min_max_version()'
    updated_at = <Date 2019-01-10.16:59:42.110>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-01-10.16:59:42.110>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-01-10.16:59:42.111>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2019-01-10.16:47:37.387>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35709
    keywords = []
    message_count = 3.0
    messages = ['333402', '333405', '333408']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'xtreak']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '35045'
    type = None
    url = 'https://bugs.python.org/issue35709'
    versions = ['Python 3.8']

    @vstinner
    Copy link
    Member Author

    test_ssl fails on Fedora 29:

    vstinner@apu$ ./python -m test test_ssl -m test_min_max_version -v
    == CPython 3.8.0a0 (heads/pytime_inf:aaea5b25d1, Jan 10 2019, 17:40:16) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)]
    == Linux-4.19.13-300.fc29.x86_64-x86_64-with-glibc2.28 little-endian
    == cwd: /home/vstinner/prog/python/master/build/test_python_26069
    == CPU count: 8
    == encodings: locale=UTF-8, FS=utf-8
    Run tests sequentially
    0:00:00 load avg: 2.33 [1/1] test_ssl
    test_ssl: testing with 'OpenSSL 1.1.1 FIPS 11 Sep 2018' (1, 1, 1, 0, 15)
    under 'Linux-4.19.13-300.fc29.x86_64-x86_64-with-glibc2.28'
    HAS_SNI = True
    OP_ALL = 0x80000054
    OP_NO_TLSv1_1 = 0x10000000
    test_min_max_version (test.test_ssl.ContextTests) ... FAIL
    test_min_max_version (test.test_ssl.ThreadedTests) ... server: new connection from ('127.0.0.1', 35268)
    server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
    server: selected protocol is now None
    server: new connection from ('127.0.0.1', 40390)
    server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1.0', 256)
    server: selected protocol is now None
    server: new connection from ('127.0.0.1', 36674)

     server:  bad connection attempt from ('127.0.0.1', 36674):
    Traceback (most recent call last):
       File "/home/vstinner/prog/python/master/Lib/test/test_ssl.py", line 2150, in wrap_conn
        self.sslconn = self.server.context.wrap_socket(
       File "/home/vstinner/prog/python/master/Lib/ssl.py", line 405, in wrap_socket
        return self.sslsocket_class._create(
       File "/home/vstinner/prog/python/master/Lib/ssl.py", line 853, in _create
        self.do_handshake()
       File "/home/vstinner/prog/python/master/Lib/ssl.py", line 1117, in do_handshake
        self._sslobj.do_handshake()
     ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1055)
    ok

    ======================================================================
    FAIL: test_min_max_version (test.test_ssl.ContextTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/home/vstinner/prog/python/master/Lib/test/test_ssl.py", line 1069, in test_min_max_version
        self.assertEqual(
    AssertionError: <TLSVersion.TLSv1: 769> != <TLSVersion.MINIMUM_SUPPORTED: -2>

    Ran 2 tests in 0.026s

    FAILED (failures=1)
    test test_ssl failed
    test_ssl failed

    == Tests result: FAILURE ==

    1 test failed:
    test_ssl

    Total duration: 269 ms
    Tests result: FAILURE

    vstinner@apu$ ./python -m test.pythoninfo|grep ^ssl
    ssl.HAS_SNI: True
    ssl.OPENSSL_VERSION: OpenSSL 1.1.1 FIPS 11 Sep 2018
    ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 0, 15)
    ssl.OP_ALL: 0x80000054
    ssl.OP_NO_TLSv1_1: 0x10000000

    @vstinner vstinner added 3.8 only security fixes tests Tests in the Lib/test dir labels Jan 10, 2019
    @tirkarthi
    Copy link
    Member

    Seems related https://bugs.python.org/issue35045

    @vstinner
    Copy link
    Member Author

    Oh right, it's a duplicate of bpo-35045.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants