diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-07-01 11:56:09 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-07-01 11:56:09 -0400 |
commit | 0317dc2bb2223dd8a51fc8b54a69765764d094d3 (patch) | |
tree | 13a7a80c6cbd2f8833178548f2a5e609c7bf6cad | |
parent | eca982d3eb1e715394b2c67d8f420bcbe4a8486d (diff) | |
download | tor-0317dc2bb2223dd8a51fc8b54a69765764d094d3.tar.gz tor-0317dc2bb2223dd8a51fc8b54a69765764d094d3.zip |
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.
-rw-r--r-- | src/test/test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/test.c b/src/test/test.c index 1db1546639..02d238e26d 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -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(); |