]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC CHANNEL: Remove stream 0-specific code
authorHugo Landau <hlandau@openssl.org>
Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)
committerHugo Landau <hlandau@openssl.org>
Fri, 12 May 2023 13:47:10 +0000 (14:47 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

ssl/quic/quic_channel.c
ssl/quic/quic_channel_local.h

index bb693352e794244066525e0dd6472d0e239bd420..5d72ac82a3ec5da6e28b2b4805bc9f4ef75545d5 100644 (file)
@@ -225,26 +225,6 @@ static int ch_init(QUIC_CHANNEL *ch)
             goto err;
     }
 
-    if ((ch->stream0 = ossl_quic_stream_map_alloc(&ch->qsm, 0,
-                                                  QUIC_STREAM_INITIATOR_CLIENT
-                                                  | QUIC_STREAM_DIR_BIDI)) == NULL)
-        goto err;
-
-    if ((ch->stream0->sstream = ossl_quic_sstream_new(INIT_APP_BUF_LEN)) == NULL)
-        goto err;
-
-    if ((ch->stream0->rstream = ossl_quic_rstream_new(NULL, NULL, 0)) == NULL)
-        goto err;
-
-    if (!ossl_quic_txfc_init(&ch->stream0->txfc, &ch->conn_txfc))
-        goto err;
-
-    if (!ossl_quic_rxfc_init(&ch->stream0->rxfc, &ch->conn_rxfc,
-                             1 * 1024 * 1024,
-                             5 * 1024 * 1024,
-                             get_time, ch))
-        goto err;
-
     /* Plug in the TLS handshake layer. */
     tls_args.s                          = ch->tls;
     tls_args.crypto_send_cb             = ch_on_crypto_send;
@@ -311,11 +291,6 @@ static void ch_cleanup(QUIC_CHANNEL *ch)
         ossl_statm_destroy(&ch->statm);
     ossl_ackm_free(ch->ackm);
 
-    if (ch->stream0 != NULL) {
-        assert(ch->have_qsm);
-        ossl_quic_stream_map_release(&ch->qsm, ch->stream0); /* frees sstream */
-    }
-
     if (ch->have_qsm)
         ossl_quic_stream_map_cleanup(&ch->qsm);
 
index 1e9e0e1e68bc3413e9c07e2342e2f3c1154ac35e..555e6117d89097d01df89070ef5a9b31eba079b3 100644 (file)
@@ -97,12 +97,6 @@ struct quic_channel_st {
     QUIC_SSTREAM                    *crypto_send[QUIC_PN_SPACE_NUM];
     QUIC_RSTREAM                    *crypto_recv[QUIC_PN_SPACE_NUM];
 
-    /*
-     * Our (currently only) application data stream. This is a bidirectional
-     * client-initiated stream and thus (in QUICv1) always has a stream ID of 0.
-     */
-    QUIC_STREAM                     *stream0;
-
     /* Internal state. */
     /*
      * Client: The DCID used in the first Initial packet we transmit as a client.