crypto/tls has a hard-coded limitation const maxHandshake = 65536 for handshake message length.
While a ClientHello message could has a maximum length of 131396 under extreme conditions, according to OpenSSL source code.
The 64KiB limitation is good at security perspective, to reduce server resource consumption. But I think it should be documented, as a Go specific behavior.
crypto/tlshas a hard-coded limitationconst maxHandshake = 65536for handshake message length.While a ClientHello message could has a maximum length of
131396under extreme conditions, according to OpenSSL source code.The 64KiB limitation is good at security perspective, to reduce server resource consumption. But I think it should be documented, as a Go specific behavior.