From fa5a7c5a5f7cdcd3571ccbf7cc70c2f7e1ecb166 Mon Sep 17 00:00:00 2001 From: Watson Ladd Date: Mon, 15 Jul 2024 14:29:17 -0700 Subject: [PATCH] QUIC: respond to Rich's comments --- README.md | 5 +++-- ssl/ssl_lib.c | 9 +++------ ssl/statem/statem_lib.c | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index eada105022db7..37343dd937807 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ should use the official OpenSSL distributions. The APIs here are used by Microsoft's [MsQuic](https://github.com/microsoft/msquic) and Google's [Chromium QUIC](https://chromium.googlesource.com/chromium/src/+/master/net/quic/) +QUIC implementations, among others. We are not in competition with OpenSSL project. We informed them of our plans to fork the code before we went public. We do not speak for the @@ -28,12 +29,12 @@ As stated in their blog post, the OpenSSL team is focused on their 3.0 release There is a community need for a QUIC-capable TLS library. This fork is intended as stopgap solution to enable higher level frameworks and runtimes to use QUIC with the proven and reliable TLS functionality from OpenSSL. This fork will be -maintained until OpenSSL officially provides reasonable support for QUIC +maintained until OpenSSL officially provides reasonable support for other QUIC implementations. This fork can be considered a supported version of [OpenSSL PR 8797](https://github.com/openssl/openssl/pull/8797). -We will endeavor to track OpenSSL releases within a day or so, and there is an +We will endeavor to track OpenSSL releases within days, and there is an item below about how we'll follow their tagging. On to the questions and answers. diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index ed72d7d3fc390..1634a22b7a9c8 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -569,6 +569,7 @@ int SSL_clear(SSL *s) int SSL_clear_quic(SSL *s) { SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s); + OPENSSL_free(sc->ext.peer_quic_transport_params_draft); sc->ext.peer_quic_transport_params_draft = NULL; sc->ext.peer_quic_transport_params_draft_len = 0; @@ -579,9 +580,7 @@ int SSL_clear_quic(SSL *s) sc->quic_write_level = ssl_encryption_initial; sc->quic_latest_level_received = ssl_encryption_initial; while (sc->quic_input_data_head != NULL) { - QUIC_DATA *qd; - - qd = sc->quic_input_data_head; + QUIC_DATA *qd = sc->quic_input_data_head; sc->quic_input_data_head = qd->next; OPENSSL_free(qd); } @@ -1515,9 +1514,7 @@ void ossl_ssl_connection_free(SSL *ssl) OPENSSL_free(s->ext.peer_quic_transport_params); BUF_MEM_free(s->quic_buf); while (s->quic_input_data_head != NULL) { - QUIC_DATA *qd; - - qd = s->quic_input_data_head; + QUIC_DATA *qd = s->quic_input_data_head; s->quic_input_data_head = qd->next; OPENSSL_free(qd); } diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index fd24e6fa78b2a..2a90abf86e469 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -98,7 +98,7 @@ int ssl3_do_write(SSL_CONNECTION *s, uint8_t type) s->init_num); if (!ret) { ret = -1; - /* QUIC can't sent anything out sice the above failed */ + /* QUIC can't sent anything out since the above failed */ ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR); } else { written = s->init_num;