diff options
author | Suphanat Chunhapanya <haxx.pop@gmail.com> | 2018-04-13 04:56:17 +0700 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-09-07 13:59:22 -0400 |
commit | 10f4c46e50478e7620f3c23413ddd292d883e8ca (patch) | |
tree | b6075b04f23c8337fd2a97d4932100c30d233db9 /src/lib/crypt_ops | |
parent | 0dab4ac2dde6431913761e8365b0d21174b3181e (diff) | |
download | tor-10f4c46e50478e7620f3c23413ddd292d883e8ca.tar.gz tor-10f4c46e50478e7620f3c23413ddd292d883e8ca.zip |
test: Build an HSv3 descriptor with authorized client
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/lib/crypt_ops')
-rw-r--r-- | src/lib/crypt_ops/crypto_rand.c | 4 | ||||
-rw-r--r-- | src/lib/crypt_ops/crypto_rand.h | 2 |
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 fb9d0c2c6c..554777cf58 100644 --- a/src/lib/crypt_ops/crypto_rand.c +++ b/src/lib/crypt_ops/crypto_rand.c @@ -319,8 +319,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 SHA512_DIGEST_LENGTH /* We're going to hash DLEN bytes from the system RNG together with some 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); |