aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorCristian Toader <cristian.matei.toader@gmail.com>2013-08-09 19:07:20 +0300
committerCristian Toader <cristian.matei.toader@gmail.com>2013-08-09 19:07:20 +0300
commit89b39db003922f5b05f9e4e2fc7658b225a2f70a (patch)
tree9ba3299dfa21bfc5231a6e5c1e032b8439fe84b3 /src/common/crypto.c
parentb3a8c08a9217effb0065b9bc5769f18e120ca4d1 (diff)
downloadtor-89b39db003922f5b05f9e4e2fc7658b225a2f70a.tar
tor-89b39db003922f5b05f9e4e2fc7658b225a2f70a.tar.gz
updated filters to work with orport
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 e60172b74..71d516683 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);