This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients christian.heimes, erlendaasland, pablogsal, vstinner
Date 2021-05-27.22:58:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This issue now prevents me to merge backport :-(

I'm debugging it on Windows.

I tried:

vstinner@DESKTOP-DK7VBIL C:\vstinner\python\main>python -u -X dev -m test -u all test_ssl -m test_pha_required_nocert -v -F -j2
0:00:35 load avg: 8.32 [ 77/1] test_ssl failed
test_ssl: testing with 'OpenSSL 1.1.1k  25 Mar 2021' (1, 1, 1, 11, 15)
          under Windows ('10', '10.0.19042', 'SP0', 'Multiprocessor Free')
          HAS_SNI = True
          OP_ALL = 0x-7fffffac
          OP_NO_TLSv1_1 = 0x10000000
test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth) ...  server:  new connection from ('', 51115)
 client cert is None
 client did not provide a cert
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
TLS: (<ssl.SSLSocket fd=680, family=AF_INET, type=SOCK_STREAM, proto=0, laddr=('', 51114), raddr=('', 51115)>, 'write', TLSVersion.TLS
v1_3, _TLSContentType.ALERT, _TLSAlertType.CERTIFICATE_REQUIRED, b'\x02t')
Test server failure:
Traceback (most recent call last):
   File "C:\vstinner\python\main\lib\test\", line 2444, in run
    msg =
   File "C:\vstinner\python\main\lib\test\", line 2421, in read
   File "C:\vstinner\python\main\lib\", line 1131, in read
 ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2523)

FAIL: test_pha_required_nocert (test.test_ssl.TestPostHandshakeAuth)
Traceback (most recent call last):
  File "C:\vstinner\python\main\lib\test\", line 4458, in test_pha_required_nocert
    with self.assertRaisesRegex(
AssertionError: SSLError not raised

This is not the crash, but the fact that the test is not reliable doesn't help to debug :-(

Moreover, I had to patch unittest locally, since a frame globals was None!?

test test_ssl crashed -- Traceback (most recent call last):
  File "C:\vstinner\python\main\lib\test\libregrtest\", line 282, in _runtest_inner
    refleak = _runtest_inner2(ns, test_name)
  File "C:\vstinner\python\main\lib\unittest\", line 209, in _count_relevant_tb_levels
    while tb and not self._is_relevant_tb_level(tb):
  File "C:\vstinner\python\main\lib\unittest\", line 205, in _is_relevant_tb_level
    return '__unittest' in tb.tb_frame.f_globals
TypeError: argument of type 'NoneType' is not iterable
Date User Action Args
2021-05-27 22:58:03vstinnersetrecipients: + vstinner, christian.heimes, pablogsal, erlendaasland
2021-05-27 22:58:03vstinnersetmessageid: <>
2021-05-27 22:58:03vstinnerlinkissue44252 messages
2021-05-27 22:58:02vstinnercreate