Check return value of crypto_global_init in test.c

This will let the unit tests fail in a less mystifying way if the
crypto subsystem is b0rken, and will also make Coverity happier.

CID # 429.
This commit is contained in:
Nick Mathewson 2011-07-01 11:56:09 -04:00
parent eca982d3eb
commit 0317dc2bb2

View File

@ -1318,7 +1318,10 @@ main(int c, const char **v)
}
options->command = CMD_RUN_UNITTESTS;
crypto_global_init(0, NULL, NULL);
if (crypto_global_init(0, NULL, NULL)) {
printf("Can't initialize crypto subsystem; exiting.\n");
return 1;
}
rep_hist_init();
network_init();
setup_directory();