From 7ea4576392b014490e6308ad82d695cc85a0b8bd Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Tue, 4 Jun 2013 12:01:56 +0200 Subject: rnd: move entropy source definition to rnd It's better off there anyway. Signed-off-by: Daniel Borkmann --- curvetun.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'curvetun.c') diff --git a/curvetun.c b/curvetun.c index 00fcd2e..458bd0c 100644 --- a/curvetun.c +++ b/curvetun.c @@ -43,8 +43,6 @@ #include "crypto_scalarmult_curve25519.h" #include "crypto_auth_hmacsha512256.h" -#define CURVETUN_ENTROPY_SOURCE "/dev/random" - enum working_mode { MODE_UNKNOW, MODE_KEYGEN, @@ -260,14 +258,14 @@ static void create_keypair(char *home) char path[PATH_MAX]; const char * errstr = NULL; - printf("Reading from %s (this may take a while) ...\n", CURVETUN_ENTROPY_SOURCE); + printf("Reading from %s (this may take a while) ...\n", HIG_ENTROPY_SOURCE); - fd = open_or_die(CURVETUN_ENTROPY_SOURCE, O_RDONLY); + fd = open_or_die(HIG_ENTROPY_SOURCE, O_RDONLY); ret = read_exact(fd, secretkey, sizeof(secretkey), 0); if (ret != sizeof(secretkey)) { err = EIO; - errstr = "Cannot read from "CURVETUN_ENTROPY_SOURCE"!\n"; + errstr = "Cannot read from "HIG_ENTROPY_SOURCE"!\n"; goto out; } -- cgit v1.2.3-54-g00ecf