From: Hugo Landau Date: Tue, 24 Oct 2023 07:15:18 +0000 (+0100) Subject: QUIC APL: Add support for querying frame type causing closure X-Git-Tag: openssl-3.2.0-beta1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55abe7486089ffa24b52e68a56b7eaed9a60a8ee;p=thirdparty%2Fopenssl.git QUIC APL: Add support for querying frame type causing closure Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/22485) --- diff --git a/doc/man3/SSL_get_conn_close_info.pod b/doc/man3/SSL_get_conn_close_info.pod index b82e434f2b0..fb8e0d25d38 100644 --- a/doc/man3/SSL_get_conn_close_info.pod +++ b/doc/man3/SSL_get_conn_close_info.pod @@ -14,7 +14,7 @@ closed #define SSL_CONN_CLOSE_FLAG_TRANSPORT typedef struct ssl_conn_close_info_st { - uint64_t error_code; + uint64_t error_code, frame_type; char *reason; size_t reason_len; uint32_t flags; @@ -42,6 +42,13 @@ This is a 62-bit QUIC error code. It is either a 62-bit application error code QUIC transport error code (if B is set in I). +=item I + +If B is set, this may be set to a QUIC frame type +number which caused the connection to be closed. It may also be set to 0 if no +frame type was specified as causing the connection to be closed. If +B is not set, this is set to 0. + =item I If non-NULL, this is intended to be a UTF-8 textual string briefly describing diff --git a/include/openssl/ssl.h.in b/include/openssl/ssl.h.in index 59b587e657e..9f91039f8a1 100644 --- a/include/openssl/ssl.h.in +++ b/include/openssl/ssl.h.in @@ -2348,7 +2348,7 @@ __owur int SSL_get_stream_write_error_code(SSL *ssl, uint64_t *app_error_code); #define SSL_CONN_CLOSE_FLAG_TRANSPORT (1U << 1) typedef struct ssl_conn_close_info_st { - uint64_t error_code; + uint64_t error_code, frame_type; const char *reason; size_t reason_len; uint32_t flags; diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index bdf5d5fea88..d3310f87288 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -3441,6 +3441,7 @@ int ossl_quic_get_conn_close_info(SSL *ssl, return 0; info->error_code = tc->error_code; + info->frame_type = tc->frame_type; info->reason = tc->reason; info->reason_len = tc->reason_len; info->flags = 0;