Commit 0195690851 for openssl.org

commit 0195690851b2f23eb4b965d7394c14a4531de2de
Author: Andrew Dinh <andrewd@openssl.org>
Date:   Mon Sep 7 23:44:38 2026 -0400

    Port script_67

    Assisted-by: Claude:claude-sonnet-5
    Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
    Reviewed-by: Neil Horman <nhorman@openssl.org>
    Merge-date: Mon Oct  5 10:18:46 2026
    Merged-from: https://github.com/openssl/openssl/pull/32786

diff --git a/test/quic_multistream_test.c b/test/quic_multistream_test.c
index ae493749b8..e9d59c4c17 100644
--- a/test/quic_multistream_test.c
+++ b/test/quic_multistream_test.c
@@ -2503,47 +2503,6 @@ static const struct script_op script_65[] = {
 };

 /* 66. Fault injection - large MAX_STREAM_DATA */
-static int script_66_inject_plain(struct helper *h, QUIC_PKT_HDR *hdr,
-    unsigned char *buf, size_t len)
-{
-    int ok = 0;
-    WPACKET wpkt;
-    unsigned char frame_buf[64];
-    size_t written;
-
-    if (h->inject_word0 == 0 || hdr->type != QUIC_PKT_TYPE_1RTT)
-        return 1;
-
-    if (!TEST_true(WPACKET_init_static_len(&wpkt, frame_buf,
-            sizeof(frame_buf), 0)))
-        return 0;
-
-    if (!TEST_true(WPACKET_quic_write_vlint(&wpkt, h->inject_word1)))
-        goto err;
-
-    if (h->inject_word1 == OSSL_QUIC_FRAME_TYPE_MAX_STREAM_DATA)
-        if (!TEST_true(WPACKET_quic_write_vlint(&wpkt, /* stream ID */
-                h->inject_word0 - 1)))
-            goto err;
-
-    if (!TEST_true(WPACKET_quic_write_vlint(&wpkt, OSSL_QUIC_VLINT_MAX)))
-        goto err;
-
-    if (!TEST_true(WPACKET_get_total_written(&wpkt, &written)))
-        goto err;
-
-    if (!qtest_fault_prepend_frame(h->qtf, frame_buf, written))
-        goto err;
-
-    ok = 1;
-err:
-    if (ok)
-        WPACKET_finish(&wpkt);
-    else
-        WPACKET_cleanup(&wpkt);
-    return ok;
-}
-
 static const struct script_op script_66[] = {
     /* test moved to test/radix/quic_tests.c */
     OP_END
@@ -2551,23 +2510,7 @@ static const struct script_op script_66[] = {

 /* 67. Fault injection - large MAX_DATA */
 static const struct script_op script_67[] = {
-    OP_S_SET_INJECT_PLAIN(script_66_inject_plain),
-    OP_C_SET_ALPN("ossltest"),
-    OP_C_CONNECT_WAIT(),
-    OP_C_SET_DEFAULT_STREAM_MODE(SSL_DEFAULT_STREAM_MODE_NONE),
-
-    OP_S_NEW_STREAM_BIDI(a, S_BIDI_ID(0)),
-    OP_S_WRITE(a, "apple", 5),
-
-    OP_C_ACCEPT_STREAM_WAIT(a),
-    OP_C_READ_EXPECT(a, "apple", 5),
-
-    OP_SET_INJECT_WORD(1, OSSL_QUIC_FRAME_TYPE_MAX_DATA),
-    OP_S_WRITE(a, "orange", 6),
-    OP_C_READ_EXPECT(a, "orange", 6),
-    OP_C_WRITE(a, "Strawberry", 10),
-    OP_S_READ_EXPECT(a, "Strawberry", 10),
-
+    /* test moved to test/radix/quic_tests.c */
     OP_END
 };

diff --git a/test/radix/quic_tests.c b/test/radix/quic_tests.c
index fabe088022..a137a29851 100644
--- a/test/radix/quic_tests.c
+++ b/test/radix/quic_tests.c
@@ -3821,8 +3821,24 @@ DEF_SCRIPT(script_66, "Fault injection - large MAX_STREAM_DATA")
     OP_READ_EXPECT(Sa, "Strawberry", 10);
 }

-DEF_SCRIPT(script_67, "place holder for multistrem script_67")
+DEF_SCRIPT(script_67, "Fault injection - large MAX_DATA")
 {
+    OP_SIMPLE_PAIR_CONN_ND();
+    OP_ACCEPT_CONN_WAIT_ND(L, S, 0);
+
+    OP_SET_INJECT_PLAIN(S, script_66_inject_plain);
+
+    OP_NEW_STREAM(S, Sa, 0);
+    OP_WRITE(Sa, "apple", 5);
+
+    OP_ACCEPT_STREAM_WAIT(C, Ca, 0);
+    OP_READ_EXPECT(Ca, "apple", 5);
+
+    OP_SET_INJECT_WORD(1, OSSL_QUIC_FRAME_TYPE_MAX_DATA);
+    OP_WRITE(Sa, "orange", 6);
+    OP_READ_EXPECT(Ca, "orange", 6);
+    OP_WRITE(Ca, "Strawberry", 10);
+    OP_READ_EXPECT(Sa, "Strawberry", 10);
 }

 DEF_SCRIPT(script_68, "place holder for multistrem script_68")