diff options
author | Toke Høiland-Jørgensen <toke@toke.dk> | 2021-04-01 19:20:13 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-06-06 16:26:06 +0200 |
commit | c48ebde5ce6db3da8cd571d213d1a1f265de8983 (patch) | |
tree | e465e1372465923b1123fd3957218eae84432868 /lib/birdlib.h | |
parent | 91d04583891f7a6f4aee612cf3f143cc84a73991 (diff) |
sysdep: Add wrapper to get random bytes
Add a wrapper function in sysdep to get random bytes, and required checks
in configure.ac to select how to do it. The configure script tries, in
order, getrandom(), getentropy() and reading from /dev/urandom.
Diffstat (limited to 'lib/birdlib.h')
-rw-r--r-- | lib/birdlib.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h index 23036c1b..61098f92 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -192,5 +192,8 @@ asm( /* Pseudorandom numbers */ u32 random_u32(void); +int random_bytes(char *buf, size_t size); +void random_close(void); +void random_init(void); #endif |