delimited list of protocol names, for instance: "http/1.1,http/1.0" (without
quotes). This requires that the SSL library is built with support for TLS
extensions enabled (check with haproxy -vv). The ALPN extension replaces the
- initial NPN extension. ALPN is required to connect to HTTP/2 servers.
+ initial NPN extension. ALPN is required to connect to HTTP/2 servers. It is
+ also required to be able to use HTTP/3 via a QUIC server, "h3" serves as a
+ default value for QUIC servers without "alpn" setting.
Versions of OpenSSL prior to 1.0.2 didn't support ALPN and only supposed the
now obsolete NPN extension.
If both HTTP/2 and HTTP/1.1 are expected to be supported, both versions can
ha_warning("QUIC protocol detected, enabling ssl. Use 'ssl' to shut this warning.\n");
}
- if (!srv->ssl_ctx.alpn_str &&
- ssl_sock_parse_alpn("h3", &srv->ssl_ctx.alpn_str,
- &srv->ssl_ctx.alpn_len, &errmsg) != 0) {
- return ERR_ALERT | ERR_FATAL;
+ if (!srv->ssl_ctx.alpn_str) {
+ srv->ssl_ctx.alpn_str = strdup("\002h3");
+ if (!srv->ssl_ctx.alpn_str) {
+ ha_alert("out of memory while trying to allocate a default alpn string.\n");
+ return ERR_ALERT | ERR_FATAL;
+ }
+ srv->ssl_ctx.alpn_len = strlen(srv->ssl_ctx.alpn_str);
}
#else
ha_alert("QUIC protocol selected but support not compiled in (check build options).\n");