# HG changeset patch # User Sergey Kandaurov # Date 1643195740 -10800 # Node ID 3d0fc72d409e4f359f074bdbbf98025d1c97e7f9 # Parent c37ea624c307f3d4ccb540c525593a1a675e2f3e HTTP/3: removed draft versions support in ALPN. diff --git a/src/event/quic/ngx_event_quic.c b/src/event/quic/ngx_event_quic.c --- a/src/event/quic/ngx_event_quic.c +++ b/src/event/quic/ngx_event_quic.c @@ -1477,15 +1477,3 @@ ngx_quic_shutdown_quic(ngx_connection_t } -uint32_t -ngx_quic_version(ngx_connection_t *c) -{ - uint32_t version; - ngx_quic_connection_t *qc; - - qc = ngx_quic_get_connection(c); - - version = qc->version; - - return (version & 0xff000000) == 0xff000000 ? version & 0xff : version; -} diff --git a/src/event/quic/ngx_event_quic.h b/src/event/quic/ngx_event_quic.h --- a/src/event/quic/ngx_event_quic.h +++ b/src/event/quic/ngx_event_quic.h @@ -77,7 +77,6 @@ void ngx_quic_shutdown_connection(ngx_co const char *reason); ngx_int_t ngx_quic_reset_stream(ngx_connection_t *c, ngx_uint_t err); ngx_int_t ngx_quic_shutdown_stream(ngx_connection_t *c, int how); -uint32_t ngx_quic_version(ngx_connection_t *c); ngx_int_t ngx_quic_handle_read_event(ngx_event_t *rev, ngx_uint_t flags); ngx_int_t ngx_quic_handle_write_event(ngx_event_t *wev, size_t lowat); ngx_int_t ngx_quic_get_packet_dcid(ngx_log_t *log, u_char *data, size_t len, diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c --- a/src/http/modules/ngx_http_ssl_module.c +++ b/src/http/modules/ngx_http_ssl_module.c @@ -419,9 +419,6 @@ ngx_http_ssl_alpn_select(ngx_ssl_conn_t unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg) { -#if (NGX_HTTP_V3) - const char *fmt; -#endif unsigned int srvlen; unsigned char *srv; #if (NGX_DEBUG) @@ -466,23 +463,11 @@ ngx_http_ssl_alpn_select(ngx_ssl_conn_t if (h3scf->hq) { srv = (unsigned char *) NGX_HTTP_V3_HQ_ALPN_PROTO; srvlen = sizeof(NGX_HTTP_V3_HQ_ALPN_PROTO) - 1; - fmt = NGX_HTTP_V3_HQ_ALPN_DRAFT_FMT; } else #endif { srv = (unsigned char *) NGX_HTTP_V3_ALPN_PROTO; srvlen = sizeof(NGX_HTTP_V3_ALPN_PROTO) - 1; - fmt = NGX_HTTP_V3_ALPN_DRAFT_FMT; - } - - /* QUIC draft */ - - if (ngx_quic_version(c) > 1) { - srv = ngx_pnalloc(c->pool, sizeof("\x05h3-xx") - 1); - if (srv == NULL) { - return SSL_TLSEXT_ERR_NOACK; - } - srvlen = ngx_sprintf(srv, fmt, ngx_quic_version(c)) - srv; } } else diff --git a/src/http/v3/ngx_http_v3.h b/src/http/v3/ngx_http_v3.h --- a/src/http/v3/ngx_http_v3.h +++ b/src/http/v3/ngx_http_v3.h @@ -20,10 +20,7 @@ #define NGX_HTTP_V3_ALPN_PROTO "\x02h3" -#define NGX_HTTP_V3_ALPN_DRAFT_FMT "\x05h3-%02uD" - #define NGX_HTTP_V3_HQ_ALPN_PROTO "\x0Ahq-interop" -#define NGX_HTTP_V3_HQ_ALPN_DRAFT_FMT "\x05hq-%02uD" #define NGX_HTTP_V3_VARLEN_INT_LEN 4 #define NGX_HTTP_V3_PREFIX_INT_LEN 11