From 164d3a6b59eea4d2fc48d14b2e17004e8ab27e13 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Wed, 29 Jan 2025 13:19:49 -0500 Subject: [PATCH] Use the recorded short conn id len in pktsplitbio Do the same thing in our pktsplit bio Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/26592) --- test/helpers/pktsplitbio.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/helpers/pktsplitbio.c b/test/helpers/pktsplitbio.c index 8b8ff364abe..3e5a31de77e 100644 --- a/test/helpers/pktsplitbio.c +++ b/test/helpers/pktsplitbio.c @@ -53,8 +53,9 @@ static int pkt_split_dgram_recvmmsg(BIO *bio, BIO_MSG *msg, size_t stride, BIO *next = BIO_next(bio); size_t i, j, data_len = 0, msg_cnt = 0; BIO_MSG *thismsg; + QTEST_DATA *bdata = BIO_get_data(bio); - if (!TEST_ptr(next)) + if (!TEST_ptr(next) || !TEST_ptr(bdata)) return 0; /* @@ -88,11 +89,8 @@ static int pkt_split_dgram_recvmmsg(BIO *bio, BIO_MSG *msg, size_t stride, return 0; /* Decode the packet header */ - /* - * TODO(QUIC SERVER): We need to query the short connection id len - * here, e.g. via some API SSL_get_short_conn_id_len() - */ - if (ossl_quic_wire_decode_pkt_hdr(&pkt, 0, 0, 0, &hdr, NULL, NULL) != 1) + if (ossl_quic_wire_decode_pkt_hdr(&pkt, bdata->short_conn_id_len, + 0, 0, &hdr, NULL, NULL) != 1) return 0; remain = PACKET_remaining(&pkt); if (remain > 0) { -- 2.47.2