mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Add crypto module as a subsystem.
This commit is contained in:
@@ -535,12 +535,6 @@ tor_init(int argc, char *argv[])
|
||||
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. */
|
||||
@@ -859,7 +853,6 @@ tor_cleanup(void)
|
||||
later, if it makes shutdown unacceptably slow. But for
|
||||
now, leave it here: it's helped us catch bugs in the
|
||||
past. */
|
||||
crypto_global_cleanup();
|
||||
}
|
||||
|
||||
/** Read/create keys as needed, and echo our fingerprint to stdout. */
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "lib/cc/compat_compiler.h"
|
||||
#include "lib/cc/torint.h"
|
||||
|
||||
#include "lib/crypt_ops/crypto_sys.h"
|
||||
#include "lib/err/torerr_sys.h"
|
||||
#include "lib/log/log_sys.h"
|
||||
#include "lib/net/network_sys.h"
|
||||
@@ -27,6 +28,7 @@ const subsys_fns_t *tor_subsystems[] = {
|
||||
&sys_threads,
|
||||
&sys_logging,
|
||||
&sys_network,
|
||||
&sys_crypto,
|
||||
};
|
||||
|
||||
const unsigned n_tor_subsystems = ARRAY_LENGTH(tor_subsystems);
|
||||
|
||||
Reference in New Issue
Block a user