Commit 04065fcd authored by Vladimír Čunát's avatar Vladimír Čunát

don't use kr_crypto_reinit()

We called kr_crypto_init() just before forking and then _reinit() in
all children, but we never did any cryptography in-between - better
initialize after forking.

Note: the function is KR_EXPORT.  It might not be useful anymore, but
its removal would require bumping libkres soname.
parent 9397638d
...@@ -259,7 +259,6 @@ static int fork_workers(fd_array_t *ipc_set, int forks) ...@@ -259,7 +259,6 @@ static int fork_workers(fd_array_t *ipc_set, int forks)
array_clear(*ipc_set); array_clear(*ipc_set);
array_push(*ipc_set, sv[0]); array_push(*ipc_set, sv[0]);
close(sv[1]); close(sv[1]);
kr_crypto_reinit();
return forks; return forks;
/* Parent process */ /* Parent process */
} else { } else {
...@@ -541,8 +540,6 @@ int main(int argc, char **argv) ...@@ -541,8 +540,6 @@ int main(int argc, char **argv)
} }
#endif #endif
kr_crypto_init();
/* Connect forks with local socket */ /* Connect forks with local socket */
fd_array_t ipc_set; fd_array_t ipc_set;
array_init(ipc_set); array_init(ipc_set);
...@@ -552,6 +549,8 @@ int main(int argc, char **argv) ...@@ -552,6 +549,8 @@ int main(int argc, char **argv)
return EXIT_FAILURE; return EXIT_FAILURE;
} }
kr_crypto_init();
/* Create a server engine. */ /* Create a server engine. */
knot_mm_t pool = { knot_mm_t pool = {
.ctx = mp_new (4096), .ctx = mp_new (4096),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment