diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-28 13:57:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-28 14:40:25 -0400 |
commit | a742a826f6fe4eafef047c4dd7ca7fa899d2f823 (patch) | |
tree | 7c83b2c177eeac4630736ed010266e6bcd36ebb3 /src/lib/crypt_ops/crypto_rand.c | |
parent | 0f02d2c0411448668d2dfe11b61e1ea72ee7a3b2 (diff) | |
download | tor-a742a826f6fe4eafef047c4dd7ca7fa899d2f823.tar.gz tor-a742a826f6fe4eafef047c4dd7ca7fa899d2f823.zip |
Remove all include common/ uses in crypto_ops and tls.
Diffstat (limited to 'src/lib/crypt_ops/crypto_rand.c')
-rw-r--r-- | src/lib/crypt_ops/crypto_rand.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/crypt_ops/crypto_rand.c b/src/lib/crypt_ops/crypto_rand.c index 8ac7d3bfe8..6f479b013b 100644 --- a/src/lib/crypt_ops/crypto_rand.c +++ b/src/lib/crypt_ops/crypto_rand.c @@ -22,15 +22,18 @@ #endif /* defined(_WIN32) */ #include "lib/container/smartlist.h" -#include "common/compat.h" #include "lib/crypt_ops/compat_openssl.h" #include "lib/crypt_ops/crypto_util.h" -#include "lib/sandbox/sandbox.h" -#include "lib/testsupport/testsupport.h" -#include "lib/log/torlog.h" -#include "common/util.h" #include "lib/encoding/binascii.h" #include "lib/intmath/weakrng.h" +#include "lib/log/torlog.h" +#include "lib/log/util_bug.h" +#include "lib/malloc/util_malloc.h" +#include "lib/sandbox/sandbox.h" +#include "lib/string/compat_string.h" +#include "lib/string/util_string.h" +#include "lib/testsupport/testsupport.h" +#include "lib/fs/files.h" DISABLE_GCC_WARNING(redundant-decls) #include <openssl/rand.h> @@ -63,6 +66,8 @@ ENABLE_GCC_WARNING(redundant-decls) #include <sys/random.h> #endif +#include <string.h> + /** * How many bytes of entropy we add at once. * @@ -238,7 +243,7 @@ crypto_strongest_rand_fallback(uint8_t *out, size_t out_len) fd = open(sandbox_intern_string(filenames[i]), O_RDONLY, 0); if (fd<0) continue; log_info(LD_CRYPTO, "Reading entropy from \"%s\"", filenames[i]); - n = read_all(fd, (char*)out, out_len, 0); + n = read_all_from_fd(fd, (char*)out, out_len); close(fd); if (n != out_len) { /* LCOV_EXCL_START |