Skip to content

Commit 6737270

Browse files
committed
Fix connection delay range
1 parent 4f7d3e6 commit 6737270

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tls/s2n_connection.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ int s2n_connection_set_blinding(struct s2n_connection *conn, s2n_blinding blindi
346346

347347
int s2n_connection_get_delay(struct s2n_connection *conn)
348348
{
349-
/* Delay between 1ms and 10 seconds */
350-
return s2n_public_random(1000 + 10000000);
349+
/* Delay between 1ms and 10 seconds in microseconds */
350+
return 1000 + s2n_public_random(10 * 1000 * 1000 - 1000);
351351
}
352352

353353
const uint8_t *s2n_connection_get_ocsp_response(struct s2n_connection *conn, uint32_t *length)

0 commit comments

Comments
 (0)