diff --git a/tornado/iostream.py b/tornado/iostream.py index 53e81fff3..198833c2a 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -1366,7 +1366,7 @@ def _do_ssl_handshake(self) -> None: peer = self.socket.getpeername() except Exception: peer = "(not connected)" - gen_log.warning( + gen_log.info( "SSL Error on %s %s: %s", self.socket.fileno(), peer, err ) return self.close(exc_info=err) diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py index ca909f276..040228ea6 100644 --- a/tornado/test/iostream_test.py +++ b/tornado/test/iostream_test.py @@ -1066,7 +1066,7 @@ def test_start_tls_smtp(self): def test_handshake_fail(self): server_future = self.server_start_tls(_server_ssl_options()) # Certificates are verified with the default configuration. - with ExpectLog(gen_log, "SSL Error"): + with ExpectLog(gen_log, "SSL Error", level=logging.INFO): client_future = self.client_start_tls(server_hostname="localhost") with self.assertRaises(ssl.SSLError): yield client_future @@ -1077,7 +1077,7 @@ def test_handshake_fail(self): def test_check_hostname(self): # Test that server_hostname parameter to start_tls is being used. server_future = self.server_start_tls(_server_ssl_options()) - with ExpectLog(gen_log, "SSL Error"): + with ExpectLog(gen_log, "SSL Error", level=logging.INFO): client_future = self.client_start_tls( ssl.create_default_context(), server_hostname="127.0.0.1" ) @@ -1231,7 +1231,7 @@ async def test_no_match(self): with ExpectLog( gen_log, ".*alert bad certificate", - level=logging.WARNING, + level=logging.INFO, required=platform.system() != "Windows", ): with self.assertRaises(ssl.SSLCertVerificationError):