QUIC CHANNEL: Finish cleanup of LCIDM integration
authorHugo Landau <hlandau@openssl.org>
Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)
committerHugo Landau <hlandau@openssl.org>
Thu, 21 Dec 2023 08:12:00 +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)

ssl/quic/quic_channel.c

index 7d2517cef4449883731be35109912591d62c6e0b..0b1eea2babd3c16dcad521cdb9289c1cd1e27c71 100644 (file)
@@ -221,6 +221,10 @@ static int ch_init(QUIC_CHANNEL *ch)
 
     ch->have_qsm = 1;
 
+    if (!ch->is_server
+        && !ossl_quic_lcidm_generate_initial(ch->lcidm, ch, &txp_args.cur_scid))
+        goto err;
+
     /* We use a zero-length SCID. */
     txp_args.cur_dcid               = ch->init_dcid;
     txp_args.ack_delay_exponent     = 3;
@@ -270,11 +274,6 @@ static int ch_init(QUIC_CHANNEL *ch)
                                     ch))
         goto err;
 
-    /* TODO plug this correctly */
-    if (!ch->is_server
-        && !ossl_quic_lcidm_generate_initial(ch->lcidm, ch, &txp_args.cur_scid))
-        goto err;
-
     for (pn_space = QUIC_PN_SPACE_INITIAL; pn_space < QUIC_PN_SPACE_NUM; ++pn_space) {
         ch->crypto_recv[pn_space] = ossl_quic_rstream_new(NULL, NULL, 0);
         if (ch->crypto_recv[pn_space] == NULL)