[tor-commits] [tor/master] Never run crypto_early_init() more than once

nickm at torproject.org nickm at torproject.org
Sun Mar 23 20:00:38 UTC 2014


commit c08b47977ef93ddd3b43cede365a352cc87e16bd
Author: Roger Dingledine <arma at torproject.org>
Date:   Sun Mar 23 00:38:17 2014 -0400

    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.
---
 src/common/crypto.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/common/crypto.c b/src/common/crypto.c
index 12a695b..f357934 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();
 





More information about the tor-commits mailing list