mirror of
https://github.com/telemt/telemt.git
synced 2026-04-18 02:54:10 +03:00
Fixes in TLS-F
This commit is contained in:
@@ -18,6 +18,9 @@ fn jitter_and_clamp_sizes(sizes: &[usize], rng: &SecureRandom) -> Vec<usize> {
|
||||
.iter()
|
||||
.map(|&size| {
|
||||
let base = size.clamp(MIN_APP_DATA, MAX_APP_DATA);
|
||||
if base == MIN_APP_DATA || base == MAX_APP_DATA {
|
||||
return base;
|
||||
}
|
||||
let jitter_range = ((base as f64) * 0.03).round() as i64;
|
||||
if jitter_range == 0 {
|
||||
return base;
|
||||
|
||||
Reference in New Issue
Block a user