Stream: git-wasmtime

Topic: wasmtime / PR #13686 fix tls server name extraction for i...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 18 2026 at 09:55):

netliomax25-code opened PR #13686 from netliomax25-code:wasi-http-tls-server-name-ipv6 to bytecodealliance:main:

  1. The default outbound TLS path in p2 and p3 derives the certificate verification host name (rustls's ServerName) with authority.split(":").next().
  2. An IPv6 authority is bracketed, e.g. [2001:db8::1]:443, so that split returns [2001 and ServerName::try_from rejects it. HTTPS to an IPv6 literal then always fails the handshake, even though the TCP connect uses the full authority and reaches the right peer.

Pull the host out of the authority directly, dropping the brackets for the IPv6 form, in one shared helper used by both sites. Added a unit test covering host:port, IPv4, and the bracketed IPv6 forms.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 18 2026 at 09:56):

netliomax25-code requested dicej for a review on PR #13686.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 18 2026 at 09:56):

netliomax25-code requested wasmtime-wasi-reviewers for a review on PR #13686.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 18 2026 at 14:25):

:memo: rvolosatovs submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 18 2026 at 14:25):

:speech_balloon: rvolosatovs created PR review comment:

Could this return ServerName directly?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 18 2026 at 14:25):

:speech_balloon: rvolosatovs created PR review comment:

What do you think about first trying https://doc.rust-lang.org/std/net/enum.SocketAddr.html#impl-FromStr-for-SocketAddr returning ServerName::IpAddress on success and otherwise trying to split off the : part and passing that to ServerName::try_from?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2026 at 10:59):

netliomax25-code updated PR #13686.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2026 at 10:59):

:memo: netliomax25-code submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2026 at 10:59):

:speech_balloon: netliomax25-code created PR review comment:

Done. The helper now returns ServerName<'static> directly: it parses the authority as a SocketAddr first and returns ServerName::IpAddress on success, which handles the bracketed IPv6 form, and otherwise splits off the port and hands the host to ServerName::try_from. The authority always carries a port at this point (both p2 and p3 append 443/80 when none is given), so IP literals always parse as a SocketAddr. Both call sites just map_err the result now, dropping the local ServerName import and the to_owned(). Updated the unit test to assert on the resulting ServerName.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2026 at 11:00):

:memo: netliomax25-code submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2026 at 11:00):

:speech_balloon: netliomax25-code created PR review comment:

Yep, it returns ServerName<'static> now.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2026 at 17:03):

:thumbs_up: rvolosatovs submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2026 at 17:03):

rvolosatovs added PR #13686 fix tls server name extraction for ipv6 authorities in wasi-http to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2026 at 17:30):

:check: rvolosatovs merged PR #13686.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 19 2026 at 17:30):

rvolosatovs removed PR #13686 fix tls server name extraction for ipv6 authorities in wasi-http from the merge queue.


Last updated: Jul 29 2026 at 05:03 UTC