diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-07-26 18:10:16 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-08-10 18:19:44 +0100 |
commit | a1aff2c63f84ddfdb656302653a29aa5035d7275 (patch) | |
tree | 00079638c989b54b2bd72e1b840d9b1ce6abadf1 /test | |
parent | ed0d6ba4589acc4da38c4197910aed9705eba5e1 (diff) | |
download | openssl-a1aff2c63f84ddfdb656302653a29aa5035d7275.tar.gz |
QUIC TEST: Ensure PATH_RESPONSE is ignored
Fixes https://github.com/openssl/project/issues/77
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21565)
Diffstat (limited to 'test')
-rw-r--r-- | test/quic_multistream_test.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/test/quic_multistream_test.c b/test/quic_multistream_test.c index f2c3c63953..4fa6a17eb6 100644 --- a/test/quic_multistream_test.c +++ b/test/quic_multistream_test.c @@ -2928,7 +2928,7 @@ static int script_41_inject_plain(struct helper *h, QUIC_PKT_HDR *hdr, sizeof(frame_buf), 0))) return 0; - if (!TEST_true(WPACKET_quic_write_vlint(&wpkt, OSSL_QUIC_FRAME_TYPE_PATH_CHALLENGE)) + if (!TEST_true(WPACKET_quic_write_vlint(&wpkt, h->inject_word1)) || !TEST_true(WPACKET_put_bytes_u64(&wpkt, path_challenge))) goto err; @@ -3014,7 +3014,7 @@ static const struct script_op script_41[] = { OP_S_BIND_STREAM_ID (a, C_BIDI_ID(0)) OP_S_READ_EXPECT (a, "apple", 5) - OP_SET_INJECT_WORD (1, 0) + OP_SET_INJECT_WORD (1, OSSL_QUIC_FRAME_TYPE_PATH_CHALLENGE) OP_S_WRITE (a, "orange", 6) OP_C_READ_EXPECT (DEFAULT, "orange", 6) @@ -3395,6 +3395,28 @@ static const struct script_op script_50[] = { OP_END }; +/* 51. Fault injection - PATH_CHALLENGE is ignored */ +static const struct script_op script_51[] = { + OP_S_SET_INJECT_PLAIN (script_41_inject_plain) + OP_C_SET_ALPN ("ossltest") + OP_C_CONNECT_WAIT () + + OP_C_WRITE (DEFAULT, "apple", 5) + OP_S_BIND_STREAM_ID (a, C_BIDI_ID(0)) + OP_S_READ_EXPECT (a, "apple", 5) + + OP_SET_INJECT_WORD (1, OSSL_QUIC_FRAME_TYPE_PATH_RESPONSE) + + OP_S_WRITE (a, "orange", 6) + OP_C_READ_EXPECT (DEFAULT, "orange", 6) + + OP_C_WRITE (DEFAULT, "Strawberry", 10) + OP_S_READ_EXPECT (a, "Strawberry", 10) + + OP_END +}; + + static const struct script_op *const scripts[] = { script_1, script_2, @@ -3446,6 +3468,7 @@ static const struct script_op *const scripts[] = { script_48, script_49, script_50, + script_51, }; static int test_script(int idx) |