diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_ssl.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 0d38d77..2df6232 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -4460,11 +4460,18 @@ class TestPostHandshakeAuth(unittest.TestCase): '(certificate required|EOF occurred)' ): # receive CertificateRequest - self.assertEqual(s.recv(1024), b'OK\n') + data = s.recv(1024) + if not data: + raise ssl.SSLError(1, "EOF occurred") + self.assertEqual(data, b'OK\n') + # send empty Certificate + Finish s.write(b'HASCERT') + # receive alert - s.recv(1024) + data = s.recv(1024) + if not data: + raise ssl.SSLError(1, "EOF occurred") def test_pha_optional(self): if support.verbose: |