Skip to content

Commit f666139

Browse files
committed
test: exercise cumulative ALPN byte ceiling
1 parent dfac05c commit f666139

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎crates/originweave-tls/tests/policy_contract.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,16 @@ fn tls_policy_bounds_timeouts_and_alpn() {
116116
));
117117
}
118118

119+
let cumulative_overflow: Vec<Vec<u8>> = (0_u8..5)
120+
.map(|index| vec![b'a' + index; MAX_ALPN_PROTOCOL_LENGTH])
121+
.collect();
119122
let invalid_alpn_sets = [
120123
vec![Vec::new()],
121124
vec![b"h2".to_vec(), b"h2".to_vec()],
122125
std::iter::repeat_n(b"h2".to_vec(), MAX_ALPN_PROTOCOL_COUNT + 1).collect(),
123126
vec![vec![b'a'; MAX_ALPN_PROTOCOL_LENGTH + 1]],
124127
vec![vec![b'a'; MAX_ALPN_TOTAL_BYTES + 1]],
128+
cumulative_overflow,
125129
];
126130
for alpn in invalid_alpn_sets {
127131
assert!(

0 commit comments

Comments
 (0)