Commit f98ad85327 for openssl.org

commit f98ad85327db6b7860906d71e16342adf8f5ef33
Author: Andrew Dinh <andrewd@openssl.org>
Date:   Mon Sep 7 23:43:52 2026 -0400

    Port script_66

    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:45 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 a7653f7a52..ae493749b8 100644
--- a/test/quic_multistream_test.c
+++ b/test/quic_multistream_test.c
@@ -2545,23 +2545,7 @@ err:
 }

 static const struct script_op script_66[] = {
-    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(S_BIDI_ID(0) + 1, OSSL_QUIC_FRAME_TYPE_MAX_STREAM_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 a3593b051b..fabe088022 100644
--- a/test/radix/quic_tests.c
+++ b/test/radix/quic_tests.c
@@ -3764,8 +3764,61 @@ DEF_SCRIPT(script_65, "Fault injection - CRYPTO - zero-length is accepted")
     OP_READ_EXPECT(Ca, "orange", 6);
 }

-DEF_SCRIPT(script_66, "place holder for multistrem script_66")
+static int script_66_inject_plain(RADIX_FAULT *fault, QUIC_PKT_HDR *hdr,
+    unsigned char *buf, size_t len)
+{
+    int ok = 0;
+    WPACKET wpkt;
+    unsigned char frame_buf[64];
+    size_t written;
+
+    if (fault->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, fault->word1)))
+        goto err;
+
+    if (fault->word1 == OSSL_QUIC_FRAME_TYPE_MAX_STREAM_DATA)
+        if (!TEST_true(WPACKET_quic_write_vlint(&wpkt, /* stream ID */
+                fault->word0 - 1)))
+            goto err;
+
+    if (!TEST_true(WPACKET_quic_write_vlint(&wpkt, OSSL_QUIC_VLINT_MAX))
+        || !TEST_true(WPACKET_get_total_written(&wpkt, &written))
+        || !radix_fault_prepend_frame(fault, frame_buf, written))
+        goto err;
+
+    ok = 1;
+err:
+    if (ok)
+        WPACKET_finish(&wpkt);
+    else
+        WPACKET_cleanup(&wpkt);
+    return ok;
+}
+
+DEF_SCRIPT(script_66, "Fault injection - large MAX_STREAM_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(S_BIDI_ID(0) + 1, OSSL_QUIC_FRAME_TYPE_MAX_STREAM_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_67, "place holder for multistrem script_67")