MCPcopy
hub / github.com/urllib3/urllib3 / _wrap_in_ssl

Method _wrap_in_ssl

test/with_dummyserver/test_socketlevel.py:203–215  ·  view source on GitHub ↗

Given a single socket, wraps it in TLS.

(self, sock: socket.socket)

Source from the content-addressed store, hash-verified

201 shutil.rmtree(cls.tmpdir)
202
203 def _wrap_in_ssl(self, sock: socket.socket) -> ssl.SSLSocket:
204 """
205 Given a single socket, wraps it in TLS.
206 """
207 return original_ssl_wrap_socket(
208 sock,
209 ssl_version=ssl.PROTOCOL_SSLv23,
210 cert_reqs=ssl.CERT_REQUIRED,
211 ca_certs=self.ca_path,
212 certfile=self.cert_path,
213 keyfile=self.key_path,
214 server_side=True,
215 )
216
217 def test_client_certs_two_files(self) -> None:
218 """

Callers 1

socket_handlerMethod · 0.95

Calls 1

original_ssl_wrap_socketFunction · 0.85

Tested by

no test coverage detected