Open
Description
Problem:
When attempting to debug a failed TLS connection (with s2n-tls-hyper
) the error message is very unhelpful
2024-11-07T00:37:42.759643Z INFO internet_http_client: querying https://www.cloudflare.com/ with Policy("test_all_tls12")
2024-11-07T00:37:42.781361Z TRACE hyper_util::client::legacy::pool: checkout waiting for idle connection: ("https", www.cloudflare.com)
2024-11-07T00:37:42.781408Z TRACE hyper_util::client::legacy::connect::http: Http::connect; scheme=Some("https"), host=Some("www.cloudflare.com"), port=None
2024-11-07T00:37:42.783138Z DEBUG hyper_util::client::legacy::connect::http: connecting to 104.16.124.96:443
2024-11-07T00:37:42.791454Z DEBUG hyper_util::client::legacy::connect::http: connected to 104.16.124.96:443
2024-11-07T00:37:42.800514Z TRACE hyper_util::client::legacy::pool: checkout dropped for ("https", www.cloudflare.com)
test http_get ... FAILED
failures:
---- http_get stdout ----
Error: hyper_util::client::legacy::Error(Connect, TlsError(Error { code: 268435456, name: "S2N_ERR_ALERT", message: "TLS alert received", kind: Alert, source: Library, debug: "Error encountered in lib/tls/s2n_alerts.c:245", errno: "Success" }))
Solution:
An obvious improvement would be to include the specific TLS alert code that the peer sent.
Presumably we could accomplish this using
Lines 3325 to 3332 in 53691f9
Activity