aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 959c41b64..a191d1c61 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2319,6 +2319,13 @@ tor_init(int argc, char *argv[])
/* Have the log set up with our application name. */
tor_snprintf(progname, sizeof(progname), "Tor %s", get_version());
log_set_application_name(progname);
+
+ /* Set up the crypto nice and early */
+ if (crypto_early_init() < 0) {
+ log_err(LD_GENERAL, "Unable to initialize the crypto subsystem!");
+ return 1;
+ }
+
/* Initialize the history structures. */
rep_hist_init();
/* Initialize the service cache. */