summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2023-08-02 09:35:35 +1000
committerTomas Mraz <tomas@openssl.org>2023-08-16 12:07:17 +0200
commitcdd916313a89def99493e00b49958ced894ca209 (patch)
tree5cb1b4690011d15d974d3a820955cbf050468f79 /test
parent945fde53a3db5011940a059fd1407b81197c9e14 (diff)
quic: process stateless resets
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21649)
Diffstat (limited to 'test')
-rw-r--r--test/quic_txp_test.c4
-rw-r--r--test/quic_wire_test.c20
2 files changed, 14 insertions, 10 deletions
diff --git a/test/quic_txp_test.c b/test/quic_txp_test.c
index fd9e56816e..e6acd5af80 100644
--- a/test/quic_txp_test.c
+++ b/test/quic_txp_test.c
@@ -403,7 +403,7 @@ static int schedule_cfq_new_conn_id(struct helper *h)
ncid.seq_num = 2345;
ncid.retire_prior_to = 1234;
ncid.conn_id = cid_1;
- memcpy(ncid.stateless_reset_token, reset_token_1, sizeof(reset_token_1));
+ memcpy(ncid.stateless_reset.token, reset_token_1, sizeof(reset_token_1));
if (!TEST_ptr(buf_mem = BUF_MEM_new()))
goto err;
@@ -442,7 +442,7 @@ static int check_cfq_new_conn_id(struct helper *h)
|| !TEST_uint64_t_eq(h->frame.new_conn_id.retire_prior_to, 1234)
|| !TEST_mem_eq(&h->frame.new_conn_id.conn_id, sizeof(cid_1),
&cid_1, sizeof(cid_1))
- || !TEST_mem_eq(&h->frame.new_conn_id.stateless_reset_token,
+ || !TEST_mem_eq(&h->frame.new_conn_id.stateless_reset.token,
sizeof(reset_token_1),
reset_token_1,
sizeof(reset_token_1)))
diff --git a/test/quic_wire_test.c b/test/quic_wire_test.c
index f9c6688d99..5691be7dd5 100644
--- a/test/quic_wire_test.c
+++ b/test/quic_wire_test.c
@@ -746,8 +746,10 @@ static const OSSL_QUIC_FRAME_NEW_CONN_ID encode_case_16_f = {
{0x33, 0x44, 0x55, 0x66}
},
{
- 0xde, 0x06, 0xcb, 0x76, 0x5d, 0xb1, 0xa7, 0x71,
- 0x78, 0x09, 0xbb, 0xe8, 0x50, 0x19, 0x12, 0x9a
+ {
+ 0xde, 0x06, 0xcb, 0x76, 0x5d, 0xb1, 0xa7, 0x71,
+ 0x78, 0x09, 0xbb, 0xe8, 0x50, 0x19, 0x12, 0x9a
+ }
}
};
@@ -783,10 +785,10 @@ static int encode_case_16_dec(PACKET *pkt, ossl_ssize_t fail)
encode_case_16_conn_id, sizeof(encode_case_16_conn_id)))
return 0;
- if (!TEST_mem_eq(f.stateless_reset_token,
- sizeof(f.stateless_reset_token),
- encode_case_16_f.stateless_reset_token,
- sizeof(encode_case_16_f.stateless_reset_token)))
+ if (!TEST_mem_eq(f.stateless_reset.token,
+ sizeof(f.stateless_reset.token),
+ encode_case_16_f.stateless_reset.token,
+ sizeof(encode_case_16_f.stateless_reset.token)))
return 0;
return 1;
@@ -811,8 +813,10 @@ static const OSSL_QUIC_FRAME_NEW_CONN_ID encode_case_16b_f = {
{0x33, 0x44, 0x55, 0x66}
},
{
- 0xde, 0x06, 0xcb, 0x76, 0x5d, 0xb1, 0xa7, 0x71,
- 0x78, 0x09, 0xbb, 0xe8, 0x50, 0x19, 0x12, 0x9a
+ {
+ 0xde, 0x06, 0xcb, 0x76, 0x5d, 0xb1, 0xa7, 0x71,
+ 0x78, 0x09, 0xbb, 0xe8, 0x50, 0x19, 0x12, 0x9a
+ }
}
};