Copilot commented on code in PR #3638:
URL: https://github.com/apache/thrift/pull/3638#discussion_r3594678854


##########
test/rs/src/bin/test_client.rs:
##########
@@ -87,10 +97,20 @@ fn run() -> thrift::Result<()> {
         None => {
             let listen_address = format!("{}:{}", host, port);
             info!(
-                "Client binds to {} with {}+{} stack",
-                listen_address, protocol, transport
+                "Client connects to {} with {}+{}{} stack",
+                listen_address,
+                protocol,
+                transport,
+                if ssl { "+tls" } else { "" }
             );
-            bind(listen_address.as_str(), protocol, transport)?
+            let tls = if ssl {
+                let server_name = ServerName::try_from(host.to_owned())
+                    .map_err(|e| format!("invalid TLS server name {host:?}: 
{e}"))?;
+                Some((server_name, tls_config()))
+            } else {
+                None
+            };

Review Comment:
   `--ssl` currently derives the rustls `ServerName` from `--host` (defaulting 
to `127.0.0.1`). rustls SNI names must be DNS names, and the shared cross-test 
server cert is issued to `localhost`, so `ip-ssl` runs will fail unless 
`--host=localhost` is provided. Consider using `localhost` for SNI when the 
host is an IP literal.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to