Add crypto-initializer functions to those whose return values must be checked

This commit is contained in:
Nick Mathewson
2015-11-25 10:36:34 -05:00
parent dedea28c2e
commit 10fdee6285
3 changed files with 8 additions and 4 deletions
+4 -1
View File
@@ -390,7 +390,10 @@ main(int argc, char **argv)
init_logging(1);
network_init();
crypto_global_init(1, NULL, NULL);
if (crypto_global_init(1, NULL, NULL) < 0) {
printf("Couldn't initialize crypto subsystem; exiting.\n");
return 1;
}
if (crypto_seed_rng() < 0) {
printf("Couldn't seed RNG; exiting.\n");
return 1;