def test_handshake_fail(self): self.server_start_tls(_server_ssl_options()) client_future = self.client_start_tls( dict(cert_reqs=ssl.CERT_REQUIRED, ca_certs=certifi.where())) with ExpectLog(gen_log, "SSL Error"): with self.assertRaises(ssl.SSLError): yield client_future
def _default_ca_certs(): if certifi is None: raise Exception("The 'certifi' package is required to use https " "in simple_httpclient") return certifi.where()