(self)
| 244 | self._assert_connection_success(server, cert_reqs=ssl.CERT_NONE) |
| 245 | |
| 246 | def test_set_server_cert(self): |
| 247 | server = self._server_socket(keyfile=SERVER_KEY, certfile=CLIENT_CERT) |
| 248 | with self._assert_raises(Exception): |
| 249 | server.certfile = 'foo' |
| 250 | with self._assert_raises(Exception): |
| 251 | server.certfile = None |
| 252 | server.certfile = SERVER_CERT |
| 253 | self._assert_connection_success(server, cert_reqs=ssl.CERT_REQUIRED, ca_certs=SERVER_CERT) |
| 254 | |
| 255 | def test_client_cert(self): |
| 256 | if not _match_has_ipaddress: |
nothing calls this directly
no test coverage detected