mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-31870: Add a timeout parameter to ssl.get_server_certificate() (GH-22270)
This commit is contained in:
parent
6c681e1a4a
commit
b2fac1afaa
5 changed files with 27 additions and 6 deletions
|
|
@ -2136,6 +2136,11 @@ class SimpleBackgroundTests(unittest.TestCase):
|
|||
# independent test method
|
||||
_test_get_server_certificate_fail(self, *self.server_addr)
|
||||
|
||||
def test_get_server_certificate_timeout(self):
|
||||
with self.assertRaises(socket.timeout):
|
||||
ssl.get_server_certificate(self.server_addr, ca_certs=SIGNING_CA,
|
||||
timeout=0.0001)
|
||||
|
||||
def test_ciphers(self):
|
||||
with test_wrap_socket(socket.socket(socket.AF_INET),
|
||||
cert_reqs=ssl.CERT_NONE, ciphers="ALL") as s:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue