QUIC: add error code for handshake failed.

Roman Arutyunyan arut at nginx.com
Tue Feb 21 12:23:00 UTC 2023


On Thu, Feb 16, 2023 at 06:42:27PM +0400, Sergey Kandaurov wrote:

[..]

> # HG changeset patch
> # User Sergey Kandaurov <pluknet at nginx.com>
> # Date 1676558213 -14400
> #      Thu Feb 16 18:36:53 2023 +0400
> # Branch quic
> # Node ID 2fcd590d85da9c3a0205a18cb295ec316c03f18e
> # Parent  12b756caaf167d2239fd3bd7a75b270ca89ca26b
> QUIC: using NGX_QUIC_ERR_CRYPTO macro in ALPN checks.
> 
> Patch by Jiuzhou Cui.
> 
> diff --git a/src/event/quic/ngx_event_quic_ssl.c b/src/event/quic/ngx_event_quic_ssl.c
> --- a/src/event/quic/ngx_event_quic_ssl.c
> +++ b/src/event/quic/ngx_event_quic_ssl.c
> @@ -190,7 +190,7 @@ ngx_quic_add_handshake_data(ngx_ssl_conn
>          SSL_get0_alpn_selected(ssl_conn, &alpn_data, &alpn_len);
>  
>          if (alpn_len == 0) {
> -            qc->error = 0x100 + SSL_AD_NO_APPLICATION_PROTOCOL;
> +            qc->error = NGX_QUIC_ERR_CRYPTO(SSL_AD_NO_APPLICATION_PROTOCOL);
>              qc->error_reason = "unsupported protocol in ALPN extension";
>  
>              ngx_log_error(NGX_LOG_INFO, c->log, 0,
> 
> -- 
> Sergey Kandaurov
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> https://mailman.nginx.org/mailman/listinfo/nginx-devel

Looks ok


More information about the nginx-devel mailing list