aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilles Chehade <gilles@poolp.org>2019-11-17 20:43:15 +0100
committerGilles Chehade <gilles@poolp.org>2019-11-17 20:43:15 +0100
commit8d46b9f8861bf8a116075371f765a242076d1524 (patch)
treed57487f7d842b379467c40793c1bdd4a67d971f0
parentconditionally build strerror (diff)
downloadOpenSMTPD-8d46b9f8861bf8a116075371f765a242076d1524.tar.xz
OpenSMTPD-8d46b9f8861bf8a116075371f765a242076d1524.zip
fix arc4random.c
-rw-r--r--openbsd-compat/arc4random.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/openbsd-compat/arc4random.c b/openbsd-compat/arc4random.c
index fc744978..f5cda877 100644
--- a/openbsd-compat/arc4random.c
+++ b/openbsd-compat/arc4random.c
@@ -209,23 +209,6 @@ arc4random_buf(void *buf, size_t n)
_ARC4_UNLOCK();
}
-/* arc4random_buf() that uses platform arc4random() */
-void
-arc4random_buf(void *_buf, size_t n)
-{
- size_t i;
- uint32_t r = 0;
- char *buf = (char *)_buf;
-
- for (i = 0; i < n; i++) {
- if (i % 4 == 0)
- r = arc4random();
- buf[i] = r & 0xff;
- r >>= 8;
- }
- explicit_bzero(&r, sizeof(r));
-}
-
/*
* Calculate a uniformly distributed random number less than upper_bound
* avoiding "modulo bias".