]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Always back off on the first packet noise from client to server
authorTomas Mraz <tomas@openssl.org>
Wed, 4 Oct 2023 15:23:27 +0000 (17:23 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 6 Oct 2023 08:24:58 +0000 (10:24 +0200)
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)

test/helpers/quictestlib.c

index 0ae05e5701e29a92f53758c48f9130b452570ca6..26cd67e23630ab73f20186cc88ab1ae0a028ec52 100644 (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;