Commit 489358d755 for openssl.org
commit 489358d755a68c8f6f634e572e4e2e1b81867937
Author: Andrew Dinh <andrewd@openssl.org>
Date: Mon Sep 7 23:48:25 2026 -0400
Port script_69
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:47 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 154e8164ed..87d6defda1 100644
--- a/test/quic_multistream_test.c
+++ b/test/quic_multistream_test.c
@@ -2515,57 +2515,6 @@ static const struct script_op script_67[] = {
};
/* 68. Fault injection - Unexpected TLS messages */
-static int script_68_inject_handshake(struct helper *h, unsigned char *msg,
- size_t msglen)
-{
- const unsigned char *data;
- size_t datalen;
- const unsigned char certreq[] = {
- SSL3_MT_CERTIFICATE_REQUEST, /* CertificateRequest message */
- 0, 0, 12, /* Length of message */
- 1, 1, /* certificate_request_context */
- 0, 8, /* Extensions block length */
- 0, TLSEXT_TYPE_signature_algorithms, /* sig_algs extension*/
- 0, 4, /* 4 bytes of sig algs extension*/
- 0, 2, /* sigalgs list is 2 bytes long */
- 8, 4 /* rsa_pss_rsae_sha256 */
- };
- const unsigned char keyupdate[] = {
- SSL3_MT_KEY_UPDATE, /* KeyUpdate message */
- 0, 0, 1, /* Length of message */
- SSL_KEY_UPDATE_NOT_REQUESTED /* update_not_requested */
- };
-
- /* We transform the NewSessionTicket message into something else */
- switch (h->inject_word0) {
- case 0:
- return 1;
-
- case 1:
- /* CertificateRequest message */
- data = certreq;
- datalen = sizeof(certreq);
- break;
-
- case 2:
- /* KeyUpdate message */
- data = keyupdate;
- datalen = sizeof(keyupdate);
- break;
-
- default:
- return 0;
- }
-
- if (!TEST_true(qtest_fault_resize_message(h->qtf,
- datalen - SSL3_HM_HEADER_LENGTH)))
- return 0;
-
- memcpy(msg, data, datalen);
-
- return 1;
-}
-
/* Send a CertificateRequest message post-handshake */
static const struct script_op script_68[] = {
/* test moved to test/radix/quic_tests.c */
@@ -2574,22 +2523,7 @@ static const struct script_op script_68[] = {
/* 69. Send a TLS KeyUpdate message post-handshake */
static const struct script_op script_69[] = {
- OP_S_SET_INJECT_HANDSHAKE(script_68_inject_handshake),
- OP_C_SET_ALPN("ossltest"),
- OP_C_CONNECT_WAIT(),
- OP_C_SET_DEFAULT_STREAM_MODE(SSL_DEFAULT_STREAM_MODE_NONE),
-
- OP_C_NEW_STREAM_BIDI(a, C_BIDI_ID(0)),
- OP_C_WRITE(a, "apple", 5),
- OP_S_BIND_STREAM_ID(a, C_BIDI_ID(0)),
- OP_S_READ_EXPECT(a, "apple", 5),
-
- OP_SET_INJECT_WORD(2, 0),
- OP_S_NEW_TICKET(),
- OP_S_WRITE(a, "orange", 6),
-
- OP_C_EXPECT_CONN_CLOSE_INFO(OSSL_QUIC_ERR_CRYPTO_ERR_BEGIN + SSL_AD_UNEXPECTED_MESSAGE, 0, 0),
-
+ /* 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 7e9573346b..7598d50cd2 100644
--- a/test/radix/quic_tests.c
+++ b/test/radix/quic_tests.c
@@ -3913,8 +3913,25 @@ DEF_SCRIPT(script_68, "Send a CertificateRequest message post-handshake")
OP_EXPECT_CONN_CLOSE_INFO(C, OSSL_QUIC_ERR_PROTOCOL_VIOLATION, 0, 0);
}
-DEF_SCRIPT(script_69, "place holder for multistrem script_69")
+DEF_SCRIPT(script_69, "Send a TLS KeyUpdate message post-handshake")
{
+ OP_SIMPLE_PAIR_CONN_ND();
+ OP_ACCEPT_CONN_WAIT_ND(L, S, 0);
+
+ OP_SET_INJECT_HANDSHAKE(S, script_68_inject_handshake);
+
+ OP_NEW_STREAM(C, Ca, 0);
+ OP_WRITE(Ca, "apple", 5);
+ OP_ACCEPT_STREAM_WAIT(S, Sa, 0);
+ OP_READ_EXPECT(Sa, "apple", 5);
+
+ OP_ENGINE_TICK_DISABLE(S);
+ OP_SET_INJECT_WORD(2, 0);
+ OP_NEW_TICKET(S);
+ OP_WRITE(Sa, "orange", 6);
+ OP_ENGINE_TICK_ENABLE(S);
+
+ OP_EXPECT_CONN_CLOSE_INFO(C, OSSL_QUIC_ERR_CRYPTO_ERR_BEGIN + SSL_AD_UNEXPECTED_MESSAGE, 0, 0);
}
DEF_SCRIPT(script_70, "place holder for multistrem script_70")