aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-09-13 12:31:41 -0400
committerNick Mathewson <nickm@torproject.org>2013-09-13 12:31:41 -0400
commite0b2cd061bd62fc790d434b2da7ecc51ed100904 (patch)
tree0bdd72522895a018e4fc9765df0f3067eff940a1 /src/common/crypto.c
parentdffc5c3f240e7734e85a427b951c4e493c85906c (diff)
parent7cf1b9cc33ab2ba13d84e08105699dd1f39dae1d (diff)
downloadtor-e0b2cd061bd62fc790d434b2da7ecc51ed100904.tar.gz
tor-e0b2cd061bd62fc790d434b2da7ecc51ed100904.zip
Merge remote-tracking branch 'ctoader/gsoc-cap-stage2'
Conflicts: src/common/sandbox.c
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 6f1a0bca57..6849499642 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -56,6 +56,7 @@
#include "../common/util.h"
#include "container.h"
#include "compat.h"
+#include "sandbox.h"
#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(0,9,8)
#error "We require OpenSSL >= 0.9.8"
@@ -2349,7 +2350,7 @@ crypto_strongest_rand(uint8_t *out, size_t out_len)
return 0;
#else
for (i = 0; filenames[i]; ++i) {
- fd = open(filenames[i], O_RDONLY, 0);
+ 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);