#2088·coturn

TLS: no fatal "no_application_protocol" alert when none of the client's ALPN protocols is supported

Author: SIPify-JHOCreated Sep 30, 2026Updated Sep 30, 2026
  • RFC 7301 §3.2: "In the event that the server supports no protocols that the client advertises, then the server SHALL respond with a fatal "no_application_protocol" alert." RFC 9325 §3.8 advises servers to strictly enforce this, to prevent cross-protocol attacks.
  • ServerALPNCallback() returns SSL_TLSEXT_ERR_NOACK when no label matches (src/apps/relay/mainrelay.c:4143-4187, with a //??? comment): the handshake completes without ALPN. It also selects http/1.1 when offered.
  • Observed with openssl s_client -alpn h2: handshake accepted, "No ALPN negotiated".
  • Suggested fix: return SSL_TLSEXT_ERR_ALERT_FATAL when the client offered ALPN and neither stun.turn nor stun.nat-discovery is acceptable; select http/1.1 only when the web admin is enabled. A client that offers no ALPN at all stays accepted.

Version: coturn 4.18.0 (tag, commit 23c6c1d3). Code references point to that tag; the code involved is unchanged on master (dd644d0a).