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()returnsSSL_TLSEXT_ERR_NOACKwhen no label matches (src/apps/relay/mainrelay.c:4143-4187, with a//???comment): the handshake completes without ALPN. It also selectshttp/1.1when offered.- Observed with
openssl s_client -alpn h2: handshake accepted, "No ALPN negotiated". - Suggested fix: return
SSL_TLSEXT_ERR_ALERT_FATALwhen the client offered ALPN and neitherstun.turnnorstun.nat-discoveryis acceptable; selecthttp/1.1only 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).
Source: coturn/coturn