1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

Move sodium_init() call

This commit is contained in:
Eelco Dolstra 2021-01-06 16:43:09 +01:00
parent 3edcb198e5
commit 146af4ee9b
2 changed files with 9 additions and 3 deletions

View file

@ -18,6 +18,10 @@
#include <openssl/crypto.h>
#if HAVE_SODIUM
#include <sodium.h>
#endif
namespace nix {
@ -126,6 +130,11 @@ void initNix()
CRYPTO_set_locking_callback(opensslLockCallback);
#endif
#if HAVE_SODIUM
if (sodium_init() == -1)
throw Error("could not initialise libsodium");
#endif
loadConfFile();
startSignalHandlerThread();