diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-01-21 15:38:39 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-01-21 15:38:39 +0000 |
commit | 8ebceeb352113839467b7bf26e4d910c1f31308e (patch) | |
tree | d4f652ce727802d1b63b54b3fdcc8bed3bcff64b /src/or/main.c | |
parent | bf2b71beb86804acc16f98b8a10ffbb9544ff758 (diff) | |
download | tor-8ebceeb352113839467b7bf26e4d910c1f31308e.tar.gz tor-8ebceeb352113839467b7bf26e4d910c1f31308e.zip |
Make sure that even in the weird fiddly paths that lead to init_keys,
crypto_global_init gets called. Also have it be crypto_global_init
that calls crypto_seed_rng, so we are not dependent on OpenSSL's
RAND_poll in these fiddly cases.
Should fix bug 907. Bugfix on 0.0.9pre6. Backport candidate.
svn:r18210
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c index d1c2b516ff..353082749c 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1817,9 +1817,8 @@ tor_init(int argc, char *argv[]) "and you probably shouldn't."); #endif - crypto_global_init(get_options()->HardwareAccel); - if (crypto_seed_rng(1)) { - log_err(LD_BUG, "Unable to seed random number generator. Exiting."); + if (crypto_global_init(get_options()->HardwareAccel)) { + log_err(LD_BUG, "Unable to initialize OpenSSL. Exiting."); return -1; } |