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/common/crypto.c | |
parent | bf2b71beb86804acc16f98b8a10ffbb9544ff758 (diff) | |
download | tor-8ebceeb352113839467b7bf26e4d910c1f31308e.tar tor-8ebceeb352113839467b7bf26e4d910c1f31308e.tar.gz |
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/common/crypto.c')
-rw-r--r-- | src/common/crypto.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index ab6670039..0abd30be1 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -197,6 +197,7 @@ crypto_global_init(int useAccel) log_engine("3DES", ENGINE_get_cipher_engine(NID_des_ede3_ecb)); log_engine("AES", ENGINE_get_cipher_engine(NID_aes_128_ecb)); } + return crypto_seed_rng(1); } return 0; } |