From 85726b6a6d53f6c3a2c18ba3412ee5b14ee4d6f3 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Tue, 4 Jun 2013 13:22:56 +0200 Subject: rnd: add gen_key_bytes to generate key from good entropy source Make this a function and do not have this in curvetun hard coded. Signed-off-by: Daniel Borkmann --- rnd.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rnd.h') diff --git a/rnd.h b/rnd.h index dd128a1..154fccf 100644 --- a/rnd.h +++ b/rnd.h @@ -4,10 +4,11 @@ #define HIG_ENTROPY_SOURCE "/dev/random" #define LOW_ENTROPY_SOURCE "/dev/urandom" -/* Note: it's not really secure, but the name only suggests it's better to use +/* secrand is not really secure, but the name only suggests it's better to use * than rand(3) when transferring bytes over the network in non-security * critical structure members. secrand() is only used to fill up salts actually. */ extern int secrand(void); +extern void gen_key_bytes(unsigned char *area, size_t len); #endif /* RND_H */ -- cgit v1.2.3-54-g00ecf a80561db5549394afb8eef8f7'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-14 17:13:28 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-14 17:13:28 -0800
commitf4d3935e4f4884ba80561db5549394afb8eef8f7 (patch)
treec9bfd0dc1ffdfbcb7f34870eea4848240775e086
parent34241af77b8696120a9735bb2579ec7044199a8b (diff)
parentb9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro. The most notable fix here is probably the fix for a splice regression ("fix a fencepost error in pipe_advance()") noticed by Alan Wylie. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix a fencepost error in pipe_advance() coredump: Ensure proper size of sparse core files aio: fix lock dep warning tmpfs: clear S_ISGID when setting posix ACLs