diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-11-09 11:12:12 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-09 11:12:12 -0500 |
commit | c6336727cac937b4b5ca38c9b49ed3a66ce0b579 (patch) | |
tree | 8735c6509412adbb1e8a2909cd95577e78b18074 /src/lib/crypt_ops | |
parent | e80595f562e199049a41fdf1f3e12baced7e74d5 (diff) | |
download | tor-c6336727cac937b4b5ca38c9b49ed3a66ce0b579.tar.gz tor-c6336727cac937b4b5ca38c9b49ed3a66ce0b579.zip |
Rename subsystem callback functions to make them consistent
Diffstat (limited to 'src/lib/crypt_ops')
-rw-r--r-- | src/lib/crypt_ops/crypto_init.c | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/lib/crypt_ops/crypto_init.c b/src/lib/crypt_ops/crypto_init.c index a03f5eff7c..4c4cc3e43b 100644 --- a/src/lib/crypt_ops/crypto_init.c +++ b/src/lib/crypt_ops/crypto_init.c @@ -207,7 +207,7 @@ tor_is_using_nss(void) } static int -init_crypto_sys(void) +subsys_crypto_initialize(void) { if (crypto_early_init() < 0) return -1; @@ -216,18 +216,36 @@ init_crypto_sys(void) } static void -shutdown_crypto_sys(void) +subsys_crypto_shutdown(void) { crypto_global_cleanup(); } +static void +subsys_crypto_prefork(void) +{ + crypto_prefork(); +} + +static void +subsys_crypto_postfork(void) +{ + crypto_postfork(); +} + +static void +subsys_crypto_thread_cleanup(void) +{ + crypto_thread_cleanup(); +} + const struct subsys_fns_t sys_crypto = { .name = "crypto", .supported = true, .level = -60, - .initialize = init_crypto_sys, - .shutdown = shutdown_crypto_sys, - .prefork = crypto_prefork, - .postfork = crypto_postfork, - .thread_cleanup = crypto_thread_cleanup, + .initialize = subsys_crypto_initialize, + .shutdown = subsys_crypto_shutdown, + .prefork = subsys_crypto_prefork, + .postfork = subsys_crypto_postfork, + .thread_cleanup = subsys_crypto_thread_cleanup, }; |