Always back off on the first packet noise from client to server

The test server cannot really cope with modifications

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22267)
This commit is contained in:
Tomas Mraz 2023-10-04 17:23:27 +02:00
parent 6dfc57f8a9
commit 8f67c6bb7c

View File

@ -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;