aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-01-21 15:38:39 +0000
committerNick Mathewson <nickm@torproject.org>2009-01-21 15:38:39 +0000
commit8ebceeb352113839467b7bf26e4d910c1f31308e (patch)
treed4f652ce727802d1b63b54b3fdcc8bed3bcff64b /src/common/crypto.c
parentbf2b71beb86804acc16f98b8a10ffbb9544ff758 (diff)
downloadtor-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.c1
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;
}