From: Tomas Mraz Date: Wed, 4 Oct 2023 15:23:27 +0000 (+0200) Subject: Always back off on the first packet noise from client to server X-Git-Tag: openssl-3.2.0-beta1~115 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f67c6bb7cab70bbcc231ee3e18d140a2857ebdb;p=thirdparty%2Fopenssl.git 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) --- 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;