mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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:
+4
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user