Skip to content

net/http: add ListenAndServeTLS / ServeTLS (software TLS) - #79

Open
0pcom wants to merge 1 commit into
tinygo-org:mainfrom
0magnet:http-serve-tls
Open

net/http: add ListenAndServeTLS / ServeTLS (software TLS)#79
0pcom wants to merge 1 commit into
tinygo-org:mainfrom
0magnet:http-serve-tls

Conversation

@0pcom

@0pcom 0pcom commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Adds Server.ServeTLS, Server.ListenAndServeTLS and the package-level ListenAndServeTLS, mirroring the standard library (no HTTP/2 negotiation). This also satisfies quic-go/http3's reference to http.ListenAndServeTLS.

This pairs with a tinygo-side change that links Go's full software crypto/tls on the host/native target (where the netdev is raw syscalls with no TLS offload, so the hardware-offload crypto/tls wrapper could never work) — PR on the tinygo repo to follow. On netdev targets with TLS offload these methods are additive and unused.

Verified against tinygo dev (0.42.0) with that change: ServeTLS on a loopback listener completes a real TLS 1.3 handshake and serves an HTTPS GET to both an in-process tls.Client and external curl -k.

🤖 Generated with Claude Code

https://claude.ai/code/session_01C3X3gvq8ZggMRvzVzWm66i

The host/native target now uses Go's software crypto/tls (real handshake
over the host netdev) instead of the netdev hardware-offload stub, so
net/http can offer a working HTTPS server. Add ServeTLS, Server.ListenAndServeTLS
and the package-level ListenAndServeTLS, mirroring the standard library
(no HTTP/2 negotiation). This also satisfies quic-go/http3's reference to
http.ListenAndServeTLS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant