-
- Downloads
Add crypto_rand_int_range() and use it
Incidently, this fixes a bug where the maximum value was never used when
only using crypto_rand_int(). For instance this example below in
rendservice.c never gets to INTRO_POINT_LIFETIME_MAX_SECONDS.
int intro_point_lifetime_seconds =
INTRO_POINT_LIFETIME_MIN_SECONDS +
crypto_rand_int(INTRO_POINT_LIFETIME_MAX_SECONDS -
INTRO_POINT_LIFETIME_MIN_SECONDS);
Signed-off-by:
David Goulet <dgoulet@ev0ke.net>
Showing
- src/common/crypto.c 20 additions, 1 deletionsrc/common/crypto.c
- src/common/crypto.h 1 addition, 0 deletionssrc/common/crypto.h
- src/common/tortls.c 2 additions, 1 deletionsrc/common/tortls.c
- src/or/entrynodes.c 4 additions, 2 deletionssrc/or/entrynodes.c
- src/or/main.c 1 addition, 1 deletionsrc/or/main.c
- src/or/rendservice.c 4 additions, 6 deletionssrc/or/rendservice.c
- src/or/router.c 3 additions, 1 deletionsrc/or/router.c
Loading
Please register or sign in to comment