aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-07 15:03:32 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-07 15:03:32 -0400
commit9ca1af9a8757ee73cf4018263cb3ae2340ebaa9f (patch)
treec747d03a54dde4ad4defa2c4c129545aa31064b1 /src/lib
parent13d0855a893a46a0f6dc06dc7d983ea321f7206a (diff)
parent3695ef6343fa1c05cd15a3ddf35c3fe6991ff2ad (diff)
downloadtor-9ca1af9a8757ee73cf4018263cb3ae2340ebaa9f.tar.gz
tor-9ca1af9a8757ee73cf4018263cb3ae2340ebaa9f.zip
Merge remote-tracking branch 'dgoulet/ticket20700_035_03'
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/crypt_ops/crypto_rand.c4
-rw-r--r--src/lib/crypt_ops/crypto_rand.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/crypt_ops/crypto_rand.c b/src/lib/crypt_ops/crypto_rand.c
index 78471bf398..313d829a57 100644
--- a/src/lib/crypt_ops/crypto_rand.c
+++ b/src/lib/crypt_ops/crypto_rand.c
@@ -335,8 +335,8 @@ crypto_strongest_rand_raw(uint8_t *out, size_t out_len)
* Try to get <b>out_len</b> bytes of the strongest entropy we can generate,
* storing it into <b>out</b>.
**/
-void
-crypto_strongest_rand(uint8_t *out, size_t out_len)
+MOCK_IMPL(void,
+crypto_strongest_rand,(uint8_t *out, size_t out_len))
{
#define DLEN DIGEST512_LEN
diff --git a/src/lib/crypt_ops/crypto_rand.h b/src/lib/crypt_ops/crypto_rand.h
index 938f11909e..25bcfa1f1c 100644
--- a/src/lib/crypt_ops/crypto_rand.h
+++ b/src/lib/crypt_ops/crypto_rand.h
@@ -21,7 +21,7 @@
int crypto_seed_rng(void) ATTR_WUR;
MOCK_DECL(void,crypto_rand,(char *to, size_t n));
void crypto_rand_unmocked(char *to, size_t n);
-void crypto_strongest_rand(uint8_t *out, size_t out_len);
+MOCK_DECL(void,crypto_strongest_rand,(uint8_t *out, size_t out_len));
int crypto_rand_int(unsigned int max);
int crypto_rand_int_range(unsigned int min, unsigned int max);
uint64_t crypto_rand_uint64_range(uint64_t min, uint64_t max);