HTTP/3: removed draft versions support in ALPN.

This commit is contained in:
Sergey Kandaurov 2022-01-26 14:15:40 +03:00
parent 281afc950d
commit 5efdec7158
4 changed files with 0 additions and 31 deletions

View File

@ -1477,15 +1477,3 @@ ngx_quic_shutdown_quic(ngx_connection_t *c)
}
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;
}

View File

@ -77,7 +77,6 @@ void ngx_quic_shutdown_connection(ngx_connection_t *c, ngx_uint_t err,
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,

View File

@ -419,9 +419,6 @@ ngx_http_ssl_alpn_select(ngx_ssl_conn_t *ssl_conn, const unsigned char **out,
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 *ssl_conn, const unsigned char **out,
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

View File

@ -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