Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic.c @ 7998:f537f99b86ee quic
QUIC: do not verify the selected ALPN protocol.
The right protocol is selected by the HTTP code. In the QUIC code only verify
that some protocol was selected and trigger an error otherwise.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Sat, 18 Jul 2020 00:08:04 +0300 |
parents | b250b515e5b6 |
children | 0d2b2664b41c |
comparison
equal
deleted
inserted
replaced
7997:b250b515e5b6 | 7998:f537f99b86ee |
---|---|
415 unsigned int len; | 415 unsigned int len; |
416 const unsigned char *data; | 416 const unsigned char *data; |
417 | 417 |
418 SSL_get0_alpn_selected(c->ssl->connection, &data, &len); | 418 SSL_get0_alpn_selected(c->ssl->connection, &data, &len); |
419 | 419 |
420 if (len != NGX_QUIC_ALPN_LEN | 420 if (len == 0) { |
421 || ngx_strncmp(data, NGX_QUIC_ALPN_STR, NGX_QUIC_ALPN_LEN) != 0) | |
422 { | |
423 qc->error = 0x100 + SSL_AD_NO_APPLICATION_PROTOCOL; | 421 qc->error = 0x100 + SSL_AD_NO_APPLICATION_PROTOCOL; |
424 qc->error_reason = "unsupported protocol in ALPN extension"; | 422 qc->error_reason = "unsupported protocol in ALPN extension"; |
425 | 423 |
426 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 424 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
427 "quic unsupported protocol in ALPN extension"); | 425 "quic unsupported protocol in ALPN extension"); |