@@ -5566,15 +5566,20 @@ def non_linux_skip_if_other_okay_error(self, err):
55665566 return # Expect the full test setup to always work on Linux.
55675567 if (isinstance (err , ConnectionResetError ) or
55685568 (isinstance (err , OSError ) and err .errno == errno .EINVAL ) or
5569- re .search ('wrong.version.number' , str (getattr (err , "reason" , "" )), re .I )):
5569+ re .search ('wrong.version.number' , str (getattr (err , "reason" , "" )), re .I ) or
5570+ re .search ('record.layer.failure' , str (getattr (err , "reason" , "" )), re .I )
5571+ ):
55705572 # On Windows the TCP RST leads to a ConnectionResetError
55715573 # (ECONNRESET) which Linux doesn't appear to surface to userspace.
55725574 # If wrap_socket() winds up on the "if connected:" path and doing
5573- # the actual wrapping... we get an SSLError from OpenSSL. Typically
5574- # WRONG_VERSION_NUMBER. While appropriate, neither is the scenario
5575- # we're specifically trying to test. The way this test is written
5576- # is known to work on Linux. We'll skip it anywhere else that it
5577- # does not present as doing so.
5575+ # the actual wrapping... we get an SSLError from OpenSSL. This is
5576+ # typically WRONG_VERSION_NUMBER. The same happens on iOS, but
5577+ # RECORD_LAYER_FAILURE is the error.
5578+ #
5579+ # While appropriate, neither is the scenario we're specifically
5580+ # trying to test. The way this test is written is known to work on
5581+ # Linux. We'll skip it anywhere else that it does not present as
5582+ # doing so.
55785583 try :
55795584 self .skipTest (f"Could not recreate conditions on { sys .platform } :"
55805585 f" { err = } " )
0 commit comments