diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-04-04 22:49:41 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-04-04 22:49:41 +0200 |
commit | a15b424cb5bbc7411d30d2e31420375b4167ea9e (patch) | |
tree | 876fc46be1596a4929b222f6a4d5f2285fcf1eb4 | |
parent | aa3b3f27f1dfa5fa970b468a1b797ae42809c134 (diff) | |
download | gnunet-a15b424cb5bbc7411d30d2e31420375b4167ea9e.tar.gz gnunet-a15b424cb5bbc7411d30d2e31420375b4167ea9e.zip |
UTIL: OpenBSD does not implement unsafe srandom
-rw-r--r-- | src/util/crypto_random.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c index 0c5d6fe7e..dc2794554 100644 --- a/src/util/crypto_random.c +++ b/src/util/crypto_random.c | |||
@@ -96,7 +96,11 @@ get_weak_random (void) | |||
96 | void | 96 | void |
97 | GNUNET_CRYPTO_seed_weak_random (int32_t seed) | 97 | GNUNET_CRYPTO_seed_weak_random (int32_t seed) |
98 | { | 98 | { |
99 | #ifdef OPENBSD | ||
100 | srandom_deterministic (seed); | ||
101 | #else | ||
99 | srandom (seed); | 102 | srandom (seed); |
103 | #endif | ||
100 | } | 104 | } |
101 | 105 | ||
102 | 106 | ||