summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-01-22 13:53:30 +0000
committerHugo Landau <hlandau@openssl.org>2024-02-08 16:50:00 +0000
commit69616017a613c7442fa51794d51f167b0de2fc9c (patch)
tree80a09ba578dedd1a002297396744785878143358 /ssl
parenta1446ff2060c6bad71ef79f16e7894e83fd5fb82 (diff)
QUIC CHANNEL: Defer transport parameter generation
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23360)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/quic_channel.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c
index 12be659168..48584ffd3a 100644
--- a/ssl/quic/quic_channel.c
+++ b/ssl/quic/quic_channel.c
@@ -342,14 +342,6 @@ static int ch_init(QUIC_CHANNEL *ch)
ossl_ackm_set_tx_max_ack_delay(ch->ackm, ossl_ms2time(ch->tx_max_ack_delay));
ossl_ackm_set_rx_max_ack_delay(ch->ackm, ossl_ms2time(ch->rx_max_ack_delay));
- /*
- * Determine the QUIC Transport Parameters and serialize the transport
- * parameters block. (For servers, we do this later as we must defer
- * generation until we have received the client's transport parameters.)
- */
- if (!ch->is_server && !ch_generate_transport_params(ch))
- goto err;
-
ch_update_idle(ch);
ossl_list_ch_insert_tail(&ch->port->channel_list, ch);
ch->on_port_list = 1;
@@ -2584,6 +2576,15 @@ int ossl_quic_channel_start(QUIC_CHANNEL *ch)
ch->qrx, ch->qtx))
return 0;
+ /*
+ * Determine the QUIC Transport Parameters and serialize the transport
+ * parameters block. (For servers, we do this later as we must defer
+ * generation until we have received the client's transport parameters.)
+ */
+ if (!ch->is_server && !ch->got_local_transport_params
+ && !ch_generate_transport_params(ch))
+ return 0;
+
/* Change state. */
ch_record_state_transition(ch, QUIC_CHANNEL_STATE_ACTIVE);
ch->doing_proactive_ver_neg = 0; /* not currently supported */