aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2014-03-23 00:38:17 -0400
committerRoger Dingledine <arma@torproject.org>2014-03-23 00:38:17 -0400
commitc08b47977ef93ddd3b43cede365a352cc87e16bd (patch)
treed38aeb7aabbafe1dc5aec8b1f57599f78c206f35 /src/common/crypto.c
parentf560eeadc38f3146f17c55b0d00799b3ee7d5acf (diff)
downloadtor-c08b47977ef93ddd3b43cede365a352cc87e16bd.tar
tor-c08b47977ef93ddd3b43cede365a352cc87e16bd.tar.gz
Never run crypto_early_init() more than once
Previously we had set up all the infrastructure to avoid calling it after the first time, but didn't actually use it.
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 12a695b9c..f357934ac 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -282,6 +282,9 @@ int
crypto_early_init(void)
{
if (!crypto_early_initialized_) {
+
+ crypto_early_initialized_ = 1;
+
ERR_load_crypto_strings();
OpenSSL_add_all_algorithms();