mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
Make nss get initialized before we fuzz anything.
This commit is contained in:
parent
d811ce2421
commit
27dd2b1f1f
@ -7,8 +7,8 @@
|
||||
#include "app/config/config.h"
|
||||
#include "test/fuzz/fuzzing.h"
|
||||
#include "lib/compress/compress.h"
|
||||
#include "lib/crypt_ops/crypto_cipher.h"
|
||||
#include "lib/crypt_ops/crypto_ed25519.h"
|
||||
#include "lib/crypt_ops/crypto_init.h"
|
||||
|
||||
static or_options_t *mock_options = NULL;
|
||||
static const or_options_t *
|
||||
@ -96,15 +96,20 @@ global_init(void)
|
||||
{
|
||||
tor_threads_init();
|
||||
tor_compress_init();
|
||||
{
|
||||
struct sipkey sipkey = { 1337, 7331 };
|
||||
siphash_set_global_key(&sipkey);
|
||||
}
|
||||
|
||||
/* Initialise logging first */
|
||||
init_logging(1);
|
||||
configure_backtrace_handler(get_version());
|
||||
|
||||
if (crypto_global_init(0, NULL, NULL) < 0)
|
||||
abort();
|
||||
|
||||
{
|
||||
struct sipkey sipkey = { 1337, 7331 };
|
||||
siphash_unset_global_key();
|
||||
siphash_set_global_key(&sipkey);
|
||||
}
|
||||
|
||||
/* set up the options. */
|
||||
mock_options = tor_malloc_zero(sizeof(or_options_t));
|
||||
MOCK(get_options, mock_get_options);
|
||||
|
Loading…
Reference in New Issue
Block a user