diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-12-22 17:14:04 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-12-22 17:14:04 +0100 |
commit | 68fd01f42ad8d56c491c755db914cb8894965e9a (patch) | |
tree | 67a4be5b4a9d201aa74c7dc801d65da809e8a1a6 /src/nix-store | |
parent | f696af0fab1d610aa8db767e2c7e610e6b7f0899 (diff) |
Don't ignore sodium_init() return value
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/nix-store.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 14354f86e..b49ebd094 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -1013,7 +1013,8 @@ static void opGenerateBinaryCacheKey(Strings opFlags, Strings opArgs) string publicKeyFile = *i++; #if HAVE_SODIUM - sodium_init(); + if (sodium_init() == -1) + throw Error("could not initialise libsodium"); unsigned char pk[crypto_sign_PUBLICKEYBYTES]; unsigned char sk[crypto_sign_SECRETKEYBYTES]; |