Minor updates
authorHugo Landau <hlandau@openssl.org>
Fri, 8 Dec 2023 07:51:16 +0000 (07:51 +0000)
committerHugo Landau <hlandau@openssl.org>
Thu, 21 Dec 2023 08:12:06 +0000 (08:12 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

doc/man3/ERR_set_mark.pod
ssl/quic/quic_channel.c
ssl/quic/quic_port.c
ssl/quic/quic_record_rx.c

index d6d715e2f69657a19c7a7f4723c8981b81ca79b6..070a7f6e2938f16ce07246cdfc74e39f5cb420a1 100644 (file)
@@ -3,7 +3,7 @@
 =head1 NAME
 
 ERR_set_mark, ERR_clear_last_mark, ERR_pop_to_mark, ERR_count_to_mark, ERR_pop -
-set mark, clear mark and pop errors until mark
+set mark, clear mark, pop errors until mark and pop last error
 
 =head1 SYNOPSIS
 
index 6a87588e9001e6ede786f8887578681236c58e3b..b5f019f40ed5218b7d66eebf0b4eef6ef903d22e 100644 (file)
@@ -122,12 +122,15 @@ static int ch_init(QUIC_CHANNEL *ch)
     OSSL_QRX_ARGS qrx_args = {0};
     QUIC_TLS_ARGS tls_args = {0};
     uint32_t pn_space;
-    size_t rx_short_dcid_len = ossl_quic_port_get_rx_short_dcid_len(ch->port);
-    size_t tx_init_dcid_len = ossl_quic_port_get_tx_init_dcid_len(ch->port);
+    size_t rx_short_dcid_len;
+    size_t tx_init_dcid_len;
 
     if (ch->port == NULL || ch->lcidm == NULL || ch->srtm == NULL)
         goto err;
 
+    rx_short_dcid_len = ossl_quic_port_get_rx_short_dcid_len(ch->port);
+    tx_init_dcid_len = ossl_quic_port_get_tx_init_dcid_len(ch->port);
+
     /* For clients, generate our initial DCID. */
     if (!ch->is_server
         && !ossl_quic_gen_rand_conn_id(ch->port->engine->libctx, tx_init_dcid_len,
index 3dbcd10957a15644ee50ee840d94307e3a1835ad..b4e2deeb84db6851f79f4daf059ddb4ffd739525 100644 (file)
@@ -473,7 +473,7 @@ static int port_try_handle_stateless_reset(QUIC_PORT *port, const QUIC_URXE *e)
     for (i = 0;; ++i) {
         if (!ossl_quic_srtm_lookup(port->srtm,
                                    (QUIC_STATELESS_RESET_TOKEN *)(data + e->data_len
-                                       - sizeof(QUIC_STATELESS_RESET_TOKEN)),
+                                   - sizeof(QUIC_STATELESS_RESET_TOKEN)),
                                    i, &opaque, NULL))
             break;
 
index 393007df50fc95182bf3280105ded1c9b15c4796..97dadd3dbe3419313b956435365bba08b9de0eae 100644 (file)
@@ -173,11 +173,11 @@ OSSL_QRX *ossl_qrx_new(const OSSL_QRX_ARGS *args)
     size_t i;
 
     if (args->demux == NULL || args->max_deferred == 0)
-        return 0;
+        return NULL;
 
     qrx = OPENSSL_zalloc(sizeof(OSSL_QRX));
     if (qrx == NULL)
-        return 0;
+        return NULL;
 
     for (i = 0; i < OSSL_NELEM(qrx->largest_pn); ++i)
         qrx->largest_pn[i] = args->init_largest_pn[i];