Don't ignore sodium_init() return value

This commit is contained in:
Eelco Dolstra 2015-12-22 17:14:04 +01:00
parent f696af0fab
commit 68fd01f42a

View file

@ -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];