From 8f67c6bb7cab70bbcc231ee3e18d140a2857ebdb Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Wed, 4 Oct 2023 17:23:27 +0200 Subject: [PATCH] Always back off on the first packet noise from client to server The test server cannot really cope with modifications Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/22267) --- test/helpers/quictestlib.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/helpers/quictestlib.c b/test/helpers/quictestlib.c index 0ae05e5701e..26cd67e2363 100644 --- a/test/helpers/quictestlib.c +++ b/test/helpers/quictestlib.c @@ -105,8 +105,8 @@ static void noise_msg_callback(int write_p, int version, int content_type, * of our noise being too much such that the connection itself * fails. We back off on the noise for a bit to avoid that. */ - BIO_ctrl(noiseargs->cbio, BIO_CTRL_NOISE_BACK_OFF, 0, NULL); - BIO_ctrl(noiseargs->sbio, BIO_CTRL_NOISE_BACK_OFF, 0, NULL); + (void)BIO_ctrl(noiseargs->cbio, BIO_CTRL_NOISE_BACK_OFF, 0, NULL); + (void)BIO_ctrl(noiseargs->sbio, BIO_CTRL_NOISE_BACK_OFF, 0, NULL); } } @@ -235,6 +235,14 @@ int qtest_create_quic_objects(OSSL_LIB_CTX *libctx, SSL_CTX *clientctx, if (!TEST_ptr(noisebio)) goto err; sbio = BIO_push(noisebio, sbio); + /* + * TODO(QUIC SERVER): + * Currently the simplistic handler of the quic tserver cannot cope + * with noise introduced in the first packet received from the + * client. This needs to be removed once we have proper server side + * handling. + */ + (void)BIO_ctrl(sbio, BIO_CTRL_NOISE_BACK_OFF, 0, NULL); (*fault)->noiseargs.cbio = cbio; (*fault)->noiseargs.sbio = sbio; -- 2.47.2